|
@ -8,7 +8,7 @@ import { Button, ToastFactory, } from '@douyinfe/semi-ui'; |
|
|
import VideoHeader from './voiceHeader' |
|
|
import VideoHeader from './voiceHeader' |
|
|
import VideoOperation from './videoOperation' |
|
|
import VideoOperation from './videoOperation' |
|
|
import './videoPlay.less'; |
|
|
import './videoPlay.less'; |
|
|
import EZUIKit, { log } from 'ezuikit-js' |
|
|
import EZUIKit from 'ezuikit-js' |
|
|
import flvjs from 'flv.js' |
|
|
import flvjs from 'flv.js' |
|
|
|
|
|
|
|
|
const timeFormat = 'YYYY-MM-DD HH:mm:ss' |
|
|
const timeFormat = 'YYYY-MM-DD HH:mm:ss' |
|
@ -252,6 +252,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
// }, [quanp.current]) |
|
|
// }, [quanp.current]) |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
|
|
|
console.log(videoObj) |
|
|
createPlay() |
|
|
createPlay() |
|
|
let nextOperationState = {} |
|
|
let nextOperationState = {} |
|
|
for (let p of operation) { |
|
|
for (let p of operation) { |
|
@ -455,27 +456,31 @@ const VideoPlay = ({ dispatch, actions, |
|
|
flvPlayer.current = flv |
|
|
flvPlayer.current = flv |
|
|
} else { |
|
|
} else { |
|
|
videoFront = new moment(); //验证前时间 |
|
|
videoFront = new moment(); //验证前时间 |
|
|
// const player = new EZUIKit.EZUIKitPlayer({ |
|
|
|
|
|
// id: containerId, // 视频容器ID |
|
|
setTimeout(() => { |
|
|
// accessToken: videoObj?.yingshiToken, |
|
|
const player = new EZUIKit.EZUIKitPlayer({ |
|
|
// url: videoObj.playUrlSd, |
|
|
id: containerId, // 视频容器ID |
|
|
// width: -10, |
|
|
accessToken: videoObj?.yingshiToken, |
|
|
// height: -10, |
|
|
url: videoObj.playUrlSd, |
|
|
// handleSuccess: (e) => { //播放成功 |
|
|
width: -10, |
|
|
// setRoll(true) |
|
|
height: -10, |
|
|
// setVideoMask(false) |
|
|
handleSuccess: (e) => { //播放成功 |
|
|
// playState.current = true |
|
|
setRoll(true) |
|
|
// videoAfter = new moment(); //验证后时间 |
|
|
setVideoMask(false) |
|
|
// }, |
|
|
playState.current = true |
|
|
// handleError: (e) => { //播放失败 |
|
|
videoAfter = new moment(); //验证后时间 |
|
|
// console.log(e, '播放失败'); |
|
|
}, |
|
|
// setNumbers(e.retcode) |
|
|
handleError: (e) => { //播放失败 |
|
|
// videoAfter = new moment(); //验证后时间 |
|
|
console.log(e, '播放失败'); |
|
|
// setDisappear(true) |
|
|
setNumbers(e.retcode) |
|
|
// }, |
|
|
videoAfter = new moment(); //验证后时间 |
|
|
// }) |
|
|
setDisappear(true) |
|
|
// setPlayer(player) |
|
|
}, |
|
|
// yingshiPlayer.current = player |
|
|
}) |
|
|
|
|
|
setPlayer(player) |
|
|
|
|
|
yingshiPlayer.current = player |
|
|
|
|
|
}, 3000) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|