|
@ -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) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -581,38 +586,38 @@ const VideoPlay = ({ dispatch, actions, |
|
|
setShowTime={setShowTime} |
|
|
setShowTime={setShowTime} |
|
|
setShowTimeSelect={setShowTimeSelect} |
|
|
setShowTimeSelect={setShowTimeSelect} |
|
|
/> */} |
|
|
/> */} |
|
|
{/* 视频内容 */} |
|
|
{/* 视频内容 */} |
|
|
{ |
|
|
{ |
|
|
// <iframe |
|
|
// <iframe |
|
|
// frameBorder="0" |
|
|
// frameBorder="0" |
|
|
// allowFullScreen='true' |
|
|
// allowFullScreen='true' |
|
|
// id={containerId} |
|
|
// id={containerId} |
|
|
// src={ |
|
|
// src={ |
|
|
// `${yingshiUrl}?audio=${videoObj.audio && operationState && !operationState.histroy.select ? '1' : '0'}&url=${operationState && operationState.histroy.select && histroyBegain ? `${videoObj.replayUrl}?begin=${moment(histroyBegain).format("YYYYMMDDHHmmss")}&end=${moment(histroyTime[1]).format("YYYYMMDDHHmmss")}` : resolution == 'sd' ? videoObj.playUrlSd : videoObj.playUrlHd}&autoplay=${'1'}&accessToken=${videoObj.yingshiToken}` |
|
|
// `${yingshiUrl}?audio=${videoObj.audio && operationState && !operationState.histroy.select ? '1' : '0'}&url=${operationState && operationState.histroy.select && histroyBegain ? `${videoObj.replayUrl}?begin=${moment(histroyBegain).format("YYYYMMDDHHmmss")}&end=${moment(histroyTime[1]).format("YYYYMMDDHHmmss")}` : resolution == 'sd' ? videoObj.playUrlSd : videoObj.playUrlHd}&autoplay=${'1'}&accessToken=${videoObj.yingshiToken}` |
|
|
// } |
|
|
// } |
|
|
// // https://open.ys7.com/doc/zh/book/index/live_proto.html |
|
|
// // https://open.ys7.com/doc/zh/book/index/live_proto.html |
|
|
// // 单个播放器的长宽比例限制最小为{width: 400px;height: 300px;} |
|
|
// // 单个播放器的长宽比例限制最小为{width: 400px;height: 300px;} |
|
|
// width={'100%'} |
|
|
// width={'100%'} |
|
|
// height={'100%'} |
|
|
// height={'100%'} |
|
|
// wmode="transparent" |
|
|
// wmode="transparent" |
|
|
// style={{ pointerEvents: 'none' }} |
|
|
// style={{ pointerEvents: 'none' }} |
|
|
// /> |
|
|
// /> |
|
|
} |
|
|
} |
|
|
{ |
|
|
{ |
|
|
videoObj.type == 'yingshi' ? |
|
|
videoObj.type == 'yingshi' ? |
|
|
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> : |
|
|
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> : |
|
|
<video id={containerId} |
|
|
<video id={containerId} |
|
|
autoplay muted |
|
|
autoplay muted |
|
|
style={{ height: '100%', width: '100%', }}> |
|
|
style={{ height: '100%', width: '100%', }}> |
|
|
|
|
|
|
|
|
</video> |
|
|
</video> |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{/* {videoMask ? <div style={{ height: '100%', width: '100%', position: 'absolute', top: '0', left: '0', backgroundColor: 'black', color: "red", }}><div style={{ position: 'absolute', top: 'calc(60%)', left: 0, zIndex: 99, textAlign: 'center', width: '100%' }}>{written}</div></div> : ''} */} |
|
|
{/* {videoMask ? <div style={{ height: '100%', width: '100%', position: 'absolute', top: '0', left: '0', backgroundColor: 'black', color: "red", }}><div style={{ position: 'absolute', top: 'calc(60%)', left: 0, zIndex: 99, textAlign: 'center', width: '100%' }}>{written}</div></div> : ''} */} |
|
|
|
|
|
|
|
|
{/* 下方操作栏 */} |
|
|
{/* 下方操作栏 */} |
|
|
{/* 显示操作功能条件(宽高) */} |
|
|
{/* 显示操作功能条件(宽高) */} |
|
|
{/* {size?.parentWidth > 479 ? |
|
|
{/* {size?.parentWidth > 479 ? |
|
|
<VideoOperation |
|
|
<VideoOperation |
|
|
operationState={operationState} operation={operation} |
|
|
operationState={operationState} operation={operation} |
|
|
voiceDisY={voiceDisY} setVoiceDisY={setVoiceDisY} |
|
|
voiceDisY={voiceDisY} setVoiceDisY={setVoiceDisY} |
|
@ -639,9 +644,9 @@ const VideoPlay = ({ dispatch, actions, |
|
|
microAppVideo={microAppVideo} |
|
|
microAppVideo={microAppVideo} |
|
|
/> : "" |
|
|
/> : "" |
|
|
} */} |
|
|
} */} |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</> |
|
|
</> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|