|
@ -90,6 +90,7 @@ const VideoPlay = ({ |
|
|
const [size, setSize] = useState({ parentWidth: sizeWh?.parentWidth, parentHeight: sizeWh?.parentHeight, width: width || sizeWh?.parentWidth, height: height || sizeWh?.parentHeight }) //视频本身和父级尺寸 |
|
|
const [size, setSize] = useState({ parentWidth: sizeWh?.parentWidth, parentHeight: sizeWh?.parentHeight, width: width || sizeWh?.parentWidth, height: height || sizeWh?.parentHeight }) //视频本身和父级尺寸 |
|
|
const [resolution, setResolution] = useState('sd') // 标清 sd 高清 hd |
|
|
const [resolution, setResolution] = useState('sd') // 标清 sd 高清 hd |
|
|
const [videoMask, setVideoMask] = useState(true) // 视频遮罩 |
|
|
const [videoMask, setVideoMask] = useState(true) // 视频遮罩 |
|
|
|
|
|
const [disappear, setDisappear] = useState(false) // 视频消失 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 标记萤石操作中,等待ifream返回信息后清空 |
|
|
// 标记萤石操作中,等待ifream返回信息后清空 |
|
@ -209,7 +210,8 @@ const VideoPlay = ({ |
|
|
|
|
|
|
|
|
// 全屏状态监听 |
|
|
// 全屏状态监听 |
|
|
screenfull.on('change', (e) => { |
|
|
screenfull.on('change', (e) => { |
|
|
if (e?.path[0]?.id=="vcmp_videoplay"+videoObj.id) { |
|
|
console.log(e?.path[0]?.id); |
|
|
|
|
|
if (e?.path[0]?.id == "vcmp_video" + videoObj.id) { |
|
|
if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { |
|
|
if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { |
|
|
changeSelectState('fullScreen') |
|
|
changeSelectState('fullScreen') |
|
|
} |
|
|
} |
|
@ -338,6 +340,8 @@ const VideoPlay = ({ |
|
|
setRoll(true) |
|
|
setRoll(true) |
|
|
setVideoMask(false) |
|
|
setVideoMask(false) |
|
|
playState.current = true |
|
|
playState.current = true |
|
|
|
|
|
// setDisappear(true) |
|
|
|
|
|
console.log(23154); |
|
|
}, |
|
|
}, |
|
|
handleError: (e) => { //播放失败 |
|
|
handleError: (e) => { //播放失败 |
|
|
console.log(e, '播放失败'); |
|
|
console.log(e, '播放失败'); |
|
@ -469,7 +473,7 @@ const VideoPlay = ({ |
|
|
// style={{ pointerEvents: 'none' }} |
|
|
// style={{ pointerEvents: 'none' }} |
|
|
// /> |
|
|
// /> |
|
|
} |
|
|
} |
|
|
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> |
|
|
{!disappear ? <div id={containerId} style={{ height: '100%', width: '100%', }}></div> : ''} |
|
|
{videoMask ? <div style={{ height: size?.height || '100%', width: size?.width || '100%', minWidth: 400, minHeight: 225, overflow: 'hidden', position: 'absolute', top: '0', left: '0', zIndex: 99, backgroundColor: 'rgba(255,255,255,0.65)' }}></div> : ''} |
|
|
{videoMask ? <div style={{ height: size?.height || '100%', width: size?.width || '100%', minWidth: 400, minHeight: 225, overflow: 'hidden', position: 'absolute', top: '0', left: '0', zIndex: 99, backgroundColor: 'rgba(255,255,255,0.65)' }}></div> : ''} |
|
|
|
|
|
|
|
|
{/* 下方操作栏 */} |
|
|
{/* 下方操作栏 */} |
|
|