options 支持的参数有:
等同于 JessibucaPro 的 container 参数
number4最大分屏数
number1当前分屏数
number1{string} border 选填 边框颜色 默认:#343434{string} borderSelect 选填 边框选中颜色 默认:#FFCC00{string} background 选填 背景颜色 默认:#000booleanfalse是否支持双击单个播放窗口,使之全屏到container容器大小。
双击切换container内全屏/取消全屏
如果设置为true了,则会影响
supportDblclickFullscreen这个参数的生效。默认会在内部把supportDblclickFullscreen改为false。
其他参数等同于 JessibucaPro 的参数
事件里面的key值
播放器对外的事件
jessibucaPro.on(JessibucaPro.MULTI_EVENTS.blur, () => {
// 窗口不可见
})
播放器对外的事件
等同于 JessibucaPro 的 ERROR
事件error里面的value 的值
播放器对外的事件
等同于 JessibucaPro 的 EVENTS
事件里面的key值
jessibucaPro.on(JessibucaPro.EVENTS.selected, () => {
// 窗口不可见
})
{number} windowIndex 选填 窗口下标(从0开始),如果不传,则销毁目前选中的窗口{Promise}jessibucaPro.destroySingle(0).then(() => {
// 销毁成功
}).catch((error) => {
// 销毁失败
})
{Promise}
jessibucaPro.destroy().then(() => {
// 销毁成功
}).catch((error) => {
// 销毁失败
})
{boolean} flag 必填 是否全屏{Promise}jessibucaPro.setFullscreenMulti(true).then(() => {
// 全屏成功
}).catch((error) => {
// 全屏失败
})
jessibucaPro.setFullscreenMulti(false).then(() => {
// 取消全屏成功
}).catch((error) => {
// 取消全屏失败
})
{number} windowIndex 选填 窗口下标(从0开始),如果不传,则销毁目前选中的窗口{void}{number|string} split 必填 数量 num: 1, 2, 3, 4, 特殊 str: '3-1','4-1'{void}1*1,2*2,3*3,4*4 不规则尺寸3-1,不规则尺寸4-1jessibucaPro.arrangeWindow(1)
jessibucaPro.arrangeWindow(2)
jessibucaPro.arrangeWindow(3)
jessibucaPro.arrangeWindow(4)
jessibucaPro.arrangeWindow('3-1')
jessibucaPro.arrangeWindow('4-1')
{number}const split = jessibucaPro.getCurrentSplit()
console.log(split)
{number}const windowIndex = jessibucaPro.getSelectedWindowIndex()
console.log(windowIndex)
其他方法等同于 JessibucaPro 的方法,只是多了一个参数 index,用来指定操作的第几个播放器窗口,下标从0开始
例如 play 方法
jessibucaProMulti.play(url, options, index).then(() => {
}).catch((error) => {
});
jessibucaProMulti.play(url, index).then(() => {
}).catch((error) => {
});
双击选中事件
jessibucaProMulti.on('dblSelected', (index) => {
console.log('dblSelected', index);
})
单击选中事件
jessibucaProMulti.on('selected', (index) => {
console.log('selected', index);
})
鼠标移入事件
jessibucaProMulti.on('mouseOver', (index) => {
console.log('mouseOver', index);
})
鼠标移出事件
jessibucaProMulti.on('mouseOut', (index) => {
console.log('mouseOut', index);
})
鼠标mouseUp事件
jessibucaProMulti.on('mouseUp', (index) => {
console.log('mouseUp', index);
})
其他事件等同于 JessibucaPro 的事件
事件的第一个参数是index 剩下的参数和JessibucaPro的同等事件一样
jessibucaProMulti.on('xxx', (index, value) => {
console.log('xxx', index, value);
})