Browse Source

视频播放修改

release_1.3.0
deartibers 3 years ago
parent
commit
254072137c
  1. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx
  2. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationHistroyTime.jsx
  3. 4
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationTalk.jsx
  4. 8
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  5. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.less
  6. 4
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx

2
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx

@ -14,7 +14,7 @@ const VideoOperationCloudControl = ({
gbptz(ac, videoObj, iotVideoServer) gbptz(ac, videoObj, iotVideoServer)
} }
} }
const vcmpVideo = document.getElementsByClassName('vcmp_video'+videoObj.id)?.offsetHeight; const vcmpVideo = document.getElementById('vcmp_videoplay')?.offsetHeight;
console.log(vcmpVideo); console.log(vcmpVideo);
return ( return (
<div style={{ <div style={{

2
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationHistroyTime.jsx

@ -16,7 +16,7 @@ const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProc
}, []) }, [])
const ToastInCustomContainer = ToastFactory.create({ const ToastInCustomContainer = ToastFactory.create({
getPopupContainer: () => document.getElementsByClassName('vcmp_video'+videoObj.id), getPopupContainer: () => document.getElementById('vcmp_videoplay'),
}); });
return ( return (

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

@ -15,7 +15,7 @@ const VideoOperationTalk = ({
const [recordState, setRecordState] = useState(RecordState.NONE) const [recordState, setRecordState] = useState(RecordState.NONE)
const ToastInCustomContainer = ToastFactory.create({ const ToastInCustomContainer = ToastFactory.create({
getPopupContainer: () => document.getElementsByClassName('vcmp_video'+videoObj.id), getPopupContainer: () => document.getElementById('vcmp_videoplay'),
}); });
useEffect(() => { useEffect(() => {
@ -57,7 +57,7 @@ const VideoOperationTalk = ({
} }
} }
} }
const vcmpVideo = document.getElementsByClassName('vcmp_video'+videoObj.id)?.offsetHeight; const vcmpVideo = document.getElementById('vcmp_videoplay')?.offsetHeight;
return ( return (
<div style={{ <div style={{

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

@ -164,7 +164,7 @@ const VideoPlay = ({
key: 'fullScreen', key: 'fullScreen',
click: () => { click: () => {
changeSelectState('fullScreen') changeSelectState('fullScreen')
let videoplay = document.getElementsByClassName('vcmp_video'+videoObj.id) let videoplay = document.getElementById('vcmp_videoplay')
if (screenfull.isEnabled) { if (screenfull.isEnabled) {
screenfull.toggle(videoplay); screenfull.toggle(videoplay);
if (videoObj?.type == 'yingshi' && player) { if (videoObj?.type == 'yingshi' && player) {
@ -209,7 +209,7 @@ const VideoPlay = ({
// //
screenfull.on('change', (e) => { screenfull.on('change', (e) => {
if (e?.path[0]?.id=="vcmp_videoplay"+videoObj.id) { if (e?.path[0]?.id=="vcmp_videoplay") {
if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) {
changeSelectState('fullScreen') changeSelectState('fullScreen')
} }
@ -436,8 +436,8 @@ const VideoPlay = ({
return ( return (
<> <>
<div className={'vcmp_videoplay'+videoObj.id+" my_vcmp_videoplay"} style={{ width: size?.parentWidth || '100%', height: size?.parentHeight || '100%', backgroundColor: 'black', overflow: 'hidden', display: 'flex', alignItems: 'center', justifyContent: 'center', }}> <div className="vcmp_videoplay " style={{ width: size?.parentWidth || '100%', height: size?.parentHeight || '100%', backgroundColor: 'black', overflow: 'hidden', display: 'flex', alignItems: 'center', justifyContent: 'center', }}>
<div id="vcmp_videoplay" className={'vcmp_video'+videoObj.id} style={{ position: 'relative', height: size?.height || '100%', width: size?.width || '100%', minWidth: 240, minHeight: 135, overflow: 'hidden' }}> {/* 顶部信息 */} <div id="vcmp_videoplay" style={{ position: 'relative', height: size?.height || '100%', width: size?.width || '100%', minWidth: 240, minHeight: 135, overflow: 'hidden' }}>
<VideoHeader <VideoHeader
operationState={operationState} changeSelectState={changeSelectState} operationState={operationState} changeSelectState={changeSelectState}
histroyTime={histroyTime} histroyTime={histroyTime}

2
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.less

@ -1,4 +1,4 @@
.my_vcmp_videoplay { .vcmp_videoplay {
.semi-datepicker { .semi-datepicker {
background-color: #fff; background-color: #fff;
} }

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

@ -54,8 +54,8 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
updateTime() updateTime()
}, [showTime]) }, [showTime])
const vcmp_videoplay = document.getElementsByClassName('vcmp_video'+videoObj.id)?.clientHeight const vcmp_videoplay = document.getElementById('vcmp_videoplay')?.clientHeight
const vcmp_videopla = document.getElementsByClassName('vcmp_video'+videoObj.id)?.clientWidth const vcmp_videopla = document.getElementById('vcmp_videoplay')?.clientWidth
return ( return (
<div> <div>

Loading…
Cancel
Save