Browse Source

视频

release_1.1.2
wenlele 3 years ago
parent
commit
464f33ef67
  1. 7
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  2. 4
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlayModal.jsx

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

@ -281,7 +281,6 @@ const VideoPlay = ({
}, [processDisX]) }, [processDisX])
const createPlay = async () => { const createPlay = async () => {
console.log(size);
if (videoObj.type != 'yingshi') { if (videoObj.type != 'yingshi') {
try { try {
// const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { // const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, {
@ -403,16 +402,16 @@ const VideoPlay = ({
videoHeight = (containerWidth / 16) * 9 videoHeight = (containerWidth / 16) * 9
} }
} }
setSize({ parentWidth: containerWidth, parentHeight: containerHeight, width: videoWidth, height: videoHeight })
if (videoObj.type == 'yingshi' && player) { if (videoObj.type == 'yingshi' && player) {
player.reSize(videoWidth, videoHeight) player.reSize(videoWidth, videoHeight)
} }
} else { } else {
setSize({ parentWidth: sizeWh?.parentWidth, parentHeight: sizeWh?.parentHeight, width: width || sizeWh?.parentWidth, height: height || sizeWh?.parentHeight })
if (videoObj.type == 'yingshi' && player) { if (videoObj.type == 'yingshi' && player) {
player.reSize(width || sizeWh?.parentWidth, height || sizeWh?.parentHeight) player.reSize(width || sizeWh?.parentWidth, height || sizeWh?.parentHeight)
} }
} }
setSize({ parentWidth: containerWidth, parentHeight: containerHeight, width: videoWidth, height: videoHeight })
return data == 'width' ? videoWidth : data == 'height' ? videoHeight : '' return data == 'width' ? videoWidth : data == 'height' ? videoHeight : ''
} }
} }
@ -458,7 +457,7 @@ const VideoPlay = ({
// /> // />
} }
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> <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)' }}>hhktyjr6tyr5</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> : ''}
{/* 下方操作栏 */} {/* 下方操作栏 */}
{/* 显示操作功能条件(宽高) */} {/* 显示操作功能条件(宽高) */}

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

@ -20,8 +20,8 @@ const VideoPlayModal = ({ visible, close, videoObj, name }) => {
> >
<div id="video_local" style={{ width: '100%' }}> <div id="video_local" style={{ width: '100%' }}>
<VideoPlay sizeWh={{ <VideoPlay sizeWh={{
width:'', width:918,
height: '', height: 460,
parentWidth: 918, parentWidth: 918,
parentHeight: 460, parentHeight: 460,
}} }}

Loading…
Cancel
Save