Browse Source

ceshi

dev_trial
wenlele 2 years ago
parent
commit
9e7c52f337
  1. 49
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

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

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

Loading…
Cancel
Save