Browse Source

fix: 视频播放

tags/PMS_V1.0.0_Alpha5
chenglb 1 year ago
parent
commit
79ad5a7d75
  1. 8
      src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx

8
src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx

@ -208,7 +208,9 @@ function OutMonitorMgm(props) {
if(res.status == 20000 && res.data.url){
setVideoModalVisible(true)
// setOneVideoRealtimeUrlInfo({id: item.id, url: res.data.url})
videoRef.current.setVideoUrl(res.data.url)
setTimeout(() => {
videoRef.current.changeUrl(res.data.url)
}, 300);
startIntervalToPlay()
}else{
message.error(`播放数据暂未对接`);
@ -233,6 +235,10 @@ function OutMonitorMgm(props) {
}
const stopIntervalToClose = ()=>{
if(videoRef.current){
videoRef.current.closeVideo()
videoRef.current = null
}
if(intervalPlayRef.current){
clearInterval(intervalPlayRef.current)
intervalPlayRef.current = null

Loading…
Cancel
Save