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) { if (histroyTime.length) {
setHistroyBegain(histroyTime[0]) setHistroyBegain(histroyTime[0])
Begain.current = 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') { if (videoObj.type == 'yingshi') {
// yingshiPrepareRef.current = 'play' // yingshiPrepareRef.current = 'play'
// setYingshiPrepare('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(() => { useEffect(() => {
const resize_ = async () => { const resize_ = async () => {
await setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth) // await setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth)
await setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight) // await setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight)
} }
resize_() resize_()
window.addEventListener('resize', resize_); // window.addEventListener('resize', resize_); //
@ -23,18 +23,22 @@ const Container = ({ videoObj, pageSize, showHeader, videoPlay, mould }) => {
}, []) }, [])
useEffect(() => { useEffect(() => {
setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth) // setVideoWidth(document.getElementById('video' + videoObj.key).clientWidth)
setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight) // setVideoHeight(document.getElementById('video' + videoObj.key).clientHeight)
}, [pageSize, showHeader]) }, [pageSize, showHeader])
// console.log(videoWidth, videoHeight); // console.log(videoWidth, videoHeight);
return ( return (
<div style={{ width: videoWidth || '100%', height: videoHeight || '100%', padding: 5 }}> <div style={{ width: videoWidth || '100%', height: videoHeight || '100%', padding: 5 }}>
{videoWidth && videoHeight ? videoPlay ? {videoWidth && videoHeight ? videoPlay ?
<VideoPlay sizeWh={{ <VideoPlay sizeWh={{
width: videoWidth - 10, // width: videoWidth - 10,
height: videoHeight - 30, // height: videoHeight - 30,
parentWidth: videoWidth - 10, // parentWidth: videoWidth - 10,
parentHeight: videoHeight - 30, // parentHeight: videoHeight - 30,
width: 500,
height: 500,
parentWidth: 500,
parentHeight: 500,
}} }}
videoObj={videoObj.camera} videoObj={videoObj.camera}
videoStyle='true' videoStyle='true'

Loading…
Cancel
Save