|
1491 | 1491 | iCurrentSplit: playParams.splitBasis || Math.ceil(Math.sqrt(playParams.url.split(",").length)), |
1492 | 1492 | szBasePath: playParams.decoderPath + '/js', |
1493 | 1493 | }); |
| 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 | + }); |
1494 | 1534 | // 注册全屏事件 |
1495 | 1535 | window.onresize = function () { |
1496 | 1536 | _this.jSPlugin.JS_Resize(playParams.width || 600, playParams.height || 400); |
|
0 commit comments