Browse Source

ceshi

dev_trial
wenlele 2 years ago
parent
commit
7b40375d89
  1. 4
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  2. 20
      code/VideoAccess-VCMP/web/client/src/sections/openness/components/container.jsx

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

@ -332,7 +332,9 @@ const VideoPlay = ({ dispatch, actions,
if (histroyTime.length) {
setHistroyBegain(histroyTime[0])
Begain.current = histroyTime[0]
document.getElementById('process_point').style.left = 0 + 'px'; //
if(document.getElementById('process_point')){
document.getElementById('process_point').style.left = 0 + 'px'; //
}
if (videoObj.type == 'yingshi') {
// yingshiPrepareRef.current = 'play'
// setYingshiPrepare('play')

20
code/VideoAccess-VCMP/web/client/src/sections/openness/components/container.jsx

@ -12,8 +12,8 @@ const Container = ({ videoObj, pageSize, showHeader, videoPlay, mould }) => {
useEffect(() => {
const resize_ = async () => {
await setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth)
await setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight)
// await setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth)
// await setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight)
}
resize_()
window.addEventListener('resize', resize_); //
@ -23,18 +23,22 @@ const Container = ({ videoObj, pageSize, showHeader, videoPlay, mould }) => {
}, [])
useEffect(() => {
setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth)
setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight)
// setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth)
// setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight)
}, [pageSize, showHeader])
// console.log(videoWidth, videoHeight);
return (
<div style={{ width: videoWidth || '100%', height: videoHeight || '100%', padding: 5 }}>
{videoWidth && videoHeight ? videoPlay ?
<VideoPlay sizeWh={{
width: videoWidth - 10,
height: videoHeight - 30,
parentWidth: videoWidth - 10,
parentHeight: videoHeight - 30,
// width: videoWidth - 10,
// height: videoHeight - 30,
// parentWidth: videoWidth - 10,
// parentHeight: videoHeight - 30,
width: 500,
height: 500,
parentWidth: 500,
parentHeight: 500,
}}
videoObj={videoObj.camera}
videoStyle='true'

Loading…
Cancel
Save