Browse Source

Merge branch 'dev_trial' of https://gitea.anxinyun.cn/free-sun/FS-IOT into dev_trial

release_1.1.2
巴林闲侠 3 years ago
parent
commit
d3333029a0
  1. 23
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

23
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

@ -65,7 +65,6 @@ const VideoPlay = ({
iotVideoServer, iotVideoServer,
local, // local, //
}) => { }) => {
console.log(sizeWh);
const [jessibuca, setjessibuca] = useState(null) const [jessibuca, setjessibuca] = useState(null)
const [player, setPlayer] = useState(null) const [player, setPlayer] = useState(null)
const [isPlaying, setIsPlaying] = useState(false) const [isPlaying, setIsPlaying] = useState(false)
@ -264,7 +263,6 @@ const VideoPlay = ({
// setYingshiPrepare('play') // setYingshiPrepare('play')
} }
}, 300) }, 300)
player.stop().then(() => { player.stop().then(() => {
player.play({ url: `${videoObj.replayUrl}?begin=${moment(Begain.current).format("YYYYMMDDHHmmss")}&end=${moment(playBackTime.current[1]).format("YYYYMMDDHHmmss")}` }) player.play({ url: `${videoObj.replayUrl}?begin=${moment(Begain.current).format("YYYYMMDDHHmmss")}&end=${moment(playBackTime.current[1]).format("YYYYMMDDHHmmss")}` })
playState.current = false playState.current = false
@ -273,7 +271,6 @@ const VideoPlay = ({
// //
document.getElementById('process_point').style.left = processDisX - 4.5 + 'px' document.getElementById('process_point').style.left = processDisX - 4.5 + 'px'
} }
} }
}, [processDisX]) }, [processDisX])
@ -371,17 +368,17 @@ const VideoPlay = ({
} }
} }
useEffect(() => { useEffect(async () => {
if (!operationRef.current?.fullScreen.select) { if (!operationRef.current?.fullScreen.select && player) {
setSize({ parentWidth: sizeWh?.parentWidth, parentHeight: sizeWh?.parentHeight, width: width || sizeWh?.parentWidth, height: height || sizeWh?.parentHeight }) if (videoObj.type == 'yingshi' && IsSize == 'true') {
if (videoObj.type == 'yingshi' && player && IsSize == !'true') {
} else {
console.log(11111111111); console.log(11111111111);
player.stop().then(() => { console.log(sizeWh);
player.play().then(() => {
player.reSize(width || sizeWh?.parentWidth, height || sizeWh?.parentHeight) await setSize({ parentWidth: sizeWh?.parentWidth, parentHeight: sizeWh?.parentHeight, width: width || sizeWh?.parentWidth, height: height || sizeWh?.parentHeight })
}) player.reSize(width || sizeWh?.parentWidth, height || sizeWh?.parentHeight)
})
} }
} }
@ -449,7 +446,7 @@ const VideoPlay = ({
// /> // />
} }
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> <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: 'red' }}>hhktyjr6tyr5</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)' }}>hhktyjr6tyr5</div> : ''}
{/* 下方操作栏 */} {/* 下方操作栏 */}

Loading…
Cancel
Save