|
@ -183,21 +183,22 @@ const VideoPlay = ({ |
|
|
key: 'talk', |
|
|
key: 'talk', |
|
|
hide: !(videoObj.type == 'yingshi'), |
|
|
hide: !(videoObj.type == 'yingshi'), |
|
|
click: (e) => { |
|
|
click: (e) => { |
|
|
console.log(e); |
|
|
|
|
|
changeSelectState('talk') |
|
|
changeSelectState('talk') |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, { |
|
|
key: 'fullScreen', |
|
|
key: 'fullScreen', |
|
|
click: () => { |
|
|
click: (fullNoChange = false) => { |
|
|
changeSelectState('fullScreen') |
|
|
changeSelectState('fullScreen') |
|
|
let videoplay = document.getElementById("vcmp_videoplay" + videoObj.id) |
|
|
let videoplay = document.getElementById("vcmp_videoplay" + videoObj.id) |
|
|
if (screenfull.isEnabled) { |
|
|
if (screenfull.isEnabled) { |
|
|
|
|
|
if (!fullNoChange) { |
|
|
screenfull.toggle(videoplay); |
|
|
screenfull.toggle(videoplay); |
|
|
if (videoObj?.type == 'yingshi' && player) { |
|
|
} |
|
|
|
|
|
if (videoObj?.type == 'yingshi' && (player || yingshiPlayer.current)) { |
|
|
if (operationRef.current?.fullScreen.select) { |
|
|
if (operationRef.current?.fullScreen.select) { |
|
|
player.reSize(screen.width, screen.height); |
|
|
(player || yingshiPlayer.current).reSize(screen.width, screen.height); |
|
|
} else { |
|
|
} else { |
|
|
player.reSize(size?.width, size?.height); |
|
|
(player || yingshiPlayer.current).reSize(size?.width, size?.height); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -235,20 +236,33 @@ const VideoPlay = ({ |
|
|
|
|
|
|
|
|
// 全屏状态监听 |
|
|
// 全屏状态监听 |
|
|
screenfull.on('change', (e) => { |
|
|
screenfull.on('change', (e) => { |
|
|
|
|
|
let curFullElement = screenfull.element |
|
|
|
|
|
if (curFullElement && curFullElement.id == 'vcmp_videoplay' + videoObj.id) { |
|
|
if (e?.path[0]?.id?.includes("vcmp_videoplay")) { |
|
|
if (e?.path[0]?.id?.includes("vcmp_videoplay")) { |
|
|
if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { |
|
|
if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { |
|
|
changeSelectState('fullScreen') |
|
|
changeSelectState('fullScreen') |
|
|
} |
|
|
} |
|
|
if (!screenfull.isFullscreen && operationRef.current && operationRef.current['fullScreen'].select) { |
|
|
if (!screenfull.isFullscreen && operationRef.current && operationRef.current['fullScreen'].select) { |
|
|
changeSelectState('fullScreen') |
|
|
changeSelectState('fullScreen') |
|
|
console.log(yingshiPlayer.current); |
|
|
|
|
|
if (yingshiPlayer.current) { |
|
|
if (yingshiPlayer.current) { |
|
|
console.log(45648641); |
|
|
console.log(45648641); |
|
|
// yingshiPlayer.current.reSize(size?.width, size?.height); |
|
|
// yingshiPlayer.current.reSize(size?.width, size?.height); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
if (operationRef.current.fullScreen.select) { |
|
|
|
|
|
operation.find(cf => cf.key == 'fullScreen').click(true) |
|
|
|
|
|
} |
|
|
|
|
|
}, 0) |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
document.onkeydown = (e) => { |
|
|
|
|
|
console.log(e.key); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// const resize_ = () => { |
|
|
// const resize_ = () => { |
|
|
// const VideoLocal = document.getElementById('vcmp_videoplay') |
|
|
// const VideoLocal = document.getElementById('vcmp_videoplay') |
|
|
// setSize({ parentWidth: VideoLocal?.clientWidth, parentHeight: VideoLocal?.clientHeight, width: VideoLocal?.clientWidth, height: VideoLocal?.clientHeight }) |
|
|
// setSize({ parentWidth: VideoLocal?.clientWidth, parentHeight: VideoLocal?.clientHeight, width: VideoLocal?.clientWidth, height: VideoLocal?.clientHeight }) |
|
@ -257,6 +271,7 @@ const VideoPlay = ({ |
|
|
// if (local) { |
|
|
// if (local) { |
|
|
// window.addEventListener('resize', resize_); //只要窗口殴大小发生像素变化就会触发 |
|
|
// window.addEventListener('resize', resize_); //只要窗口殴大小发生像素变化就会触发 |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
return () => { |
|
|
return () => { |
|
|
if (jessibuca) { |
|
|
if (jessibuca) { |
|
|
jessibuca.destroy() |
|
|
jessibuca.destroy() |
|
|