diff --git a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx index dc5c34c..345971c 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/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) + } } @@ -581,38 +586,38 @@ const VideoPlay = ({ dispatch, actions, setShowTime={setShowTime} setShowTimeSelect={setShowTimeSelect} /> */} - {/* 视频内容 */} - { - //