Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6a28b5

Browse files
committed
[CHG]支持错误事件回调用
1 parent 1e89bea commit a6a28b5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

ezuikit.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,46 @@
14911491
iCurrentSplit: playParams.splitBasis || Math.ceil(Math.sqrt(playParams.url.split(",").length)),
14921492
szBasePath: playParams.decoderPath + '/js',
14931493
});
1494+
_this.jSPlugin.JS_SetWindowControlCallback({
1495+
windowEventSelect: function (iWndIndex) { //插件选中窗口回调
1496+
iWind = iWndIndex;
1497+
console.log(iWndIndex);
1498+
},
1499+
pluginErrorHandler: function (iWndIndex, iErrorCode, oError) { //插件错误回调
1500+
console.log(iWndIndex, iErrorCode, oError);
1501+
if (playParams && playParams.handleError) {
1502+
playParams.handleError({ retcode: iErrorCode, msg: oError ? oError : '播放失败,请重试' });
1503+
_this.loadingStart();
1504+
_this.loadingSet(0,{text:'播放失败,请重试'});
1505+
}
1506+
},
1507+
windowEventOver: function (iWndIndex) { //鼠标移过回调
1508+
//console.log(iWndIndex);
1509+
},
1510+
windowEventOut: function (iWndIndex) { //鼠标移出回调
1511+
//console.log(iWndIndex);
1512+
},
1513+
windowEventUp: function (iWndIndex) { //鼠标mouseup事件回调
1514+
//console.log(iWndIndex);
1515+
},
1516+
windowFullCcreenChange: function (bFull) { //全屏切换回调
1517+
console.log(bFull);
1518+
},
1519+
firstFrameDisplay: function (iWndIndex, iWidth, iHeight) { //首帧显示回调
1520+
console.log(iWndIndex, iWidth, iHeight);
1521+
},
1522+
performanceLack: function () { //性能不足回调
1523+
1524+
}
1525+
});
1526+
_this.jSPlugin.JS_SetOptions({
1527+
//bSupportSound: false //是否支持音频,默认支持
1528+
bSupporDoubleClickFull: typeof playParams.isSupporDoubleClickFull === 'undefined' ? true : playParams.isSupporDoubleClickFull //是否双击窗口全屏,默认支持
1529+
//bOnlySupportMSE: true //只支持MSE
1530+
//bOnlySupportJSDecoder: true //只支持JSDecoder
1531+
}).then(function () {
1532+
console.log("JS_SetOptions");
1533+
});
14941534
// 注册全屏事件
14951535
window.onresize = function () {
14961536
_this.jSPlugin.JS_Resize(playParams.width || 600, playParams.height || 400);

0 commit comments

Comments
 (0)