Browse Source

拉取

release_1.3.0
wenlele 3 years ago
parent
commit
3aac22db88
  1. 14
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  2. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx

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

@ -90,6 +90,7 @@ const VideoPlay = ({
const [size, setSize] = useState({ parentWidth: sizeWh?.parentWidth, parentHeight: sizeWh?.parentHeight, width: width || sizeWh?.parentWidth, height: height || sizeWh?.parentHeight }) //
const [resolution, setResolution] = useState('sd') // sd hd
const [videoMask, setVideoMask] = useState(true) //
const [disappear, setDisappear] = useState(false) //
// ifream
@ -164,7 +165,7 @@ const VideoPlay = ({
key: 'fullScreen',
click: () => {
changeSelectState('fullScreen')
let videoplay = document.getElementsByClassName('vcmp_video'+videoObj.id)
let videoplay = document.getElementsByClassName('vcmp_video' + videoObj.id)
if (screenfull.isEnabled) {
screenfull.toggle(videoplay);
if (videoObj?.type == 'yingshi' && player) {
@ -209,7 +210,8 @@ const VideoPlay = ({
//
screenfull.on('change', (e) => {
if (e?.path[0]?.id=="vcmp_videoplay"+videoObj.id) {
console.log(e?.path[0]?.id);
if (e?.path[0]?.id == "vcmp_video" + videoObj.id) {
if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) {
changeSelectState('fullScreen')
}
@ -338,6 +340,8 @@ const VideoPlay = ({
setRoll(true)
setVideoMask(false)
playState.current = true
// setDisappear(true)
console.log(23154);
},
handleError: (e) => { //
console.log(e, '播放失败');
@ -436,8 +440,8 @@ const VideoPlay = ({
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 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 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 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' }}> {/* 顶部信息 */}
<VideoHeader
operationState={operationState} changeSelectState={changeSelectState}
histroyTime={histroyTime}
@ -469,7 +473,7 @@ const VideoPlay = ({
// style={{ pointerEvents: 'none' }}
// />
}
<div id={containerId} style={{ height: '100%', width: '100%', }}></div>
{!disappear ? <div id={containerId} style={{ height: '100%', width: '100%', }}></div> : ''}
{videoMask ? <div style={{ height: size?.height || '100%', width: size?.width || '100%', minWidth: 400, minHeight: 225, overflow: 'hidden', position: 'absolute', top: '0', left: '0', zIndex: 99, backgroundColor: 'rgba(255,255,255,0.65)' }}></div> : ''}
{/* 下方操作栏 */}

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

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

Loading…
Cancel
Save