Browse Source

视频播放修改

dev_trial
wenlele 2 years ago
parent
commit
e6fe7868ff
  1. 4
      code/VideoAccess-VCMP/api/.vscode/launch.json
  2. 1
      code/VideoAccess-VCMP/api/app/lib/middlewares/authenticator.js
  3. 21
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperation.jsx
  4. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx
  5. 16
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationHistroyTime.jsx
  6. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationTalk.jsx
  7. 14
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  8. 15
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx
  9. 3
      code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx
  10. 30
      code/VideoAccess-VCMP/web/client/src/layout/index.jsx
  11. 6
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx
  12. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrModal.jsx
  13. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx
  14. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx
  15. 129
      code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx
  16. 3
      code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.less
  17. 2
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx
  18. 2
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx
  19. 1
      code/VideoAccess-VCMP/web/client/src/sections/openness/containers/callService.jsx
  20. 2
      code/VideoAccess-VCMP/web/package.json

4
code/VideoAccess-VCMP/api/.vscode/launch.json

@ -15,8 +15,8 @@
"args": [
"-p 4000",
"-f http://localhost:4000",
"-g postgres://postgres:123@10.8.30.166:5432/video-access",
// "-g postgres://postgres:123@10.8.30.166:5432/video_access-dev",
// "-g postgres://postgres:123@10.8.30.166:5432/video-access",
"-g postgres://postgres:123@10.8.30.166:5432/video_access-dev",
"--redisHost 10.8.30.112",
"--redisPort 6379",
"--axyApiUrl http://127.0.0.1:4100",

1
code/VideoAccess-VCMP/api/app/lib/middlewares/authenticator.js

@ -83,6 +83,7 @@ let authorizeToken = async function (ctx, token) {
ctx.fs.api.token = token;
}
} catch (err) {
console.log(11111111111,err);
const { error } = err.response || {};
ctx.fs.logger.log('[anxinyun]', '[AUTH] failed', (error || {}).message || `cannot GET /users/${token}`);
}

21
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperation.jsx

@ -26,14 +26,17 @@ const VideoOperation = ({
isPlaying,
videoObj,
setYingshiPrepare, yingshiPrepareRef,
slideDown,
slideDown, playBackTime,
player,
// setPlayer,
playState,
videoFront,
videoAfter
showTime_,
videoAfter,
showTimeSelect,
setShowTimeSelect
}) => {
const [showTimeSelect, setShowTimeSelect] = useState(false)
const butStyle = {
border: '1px solid #fff', color: '#fff', padding: '0 10px',
@ -64,6 +67,8 @@ const VideoOperation = ({
}
const histroySelected = operationState && operationState.histroy.select
const vcmp_videoplayHeight = document.getElementById("vcmp_videoplay" + videoObj.id)?.clientHeight
const vcmp_videoplaWidth = document.getElementById('vcmp_videoplay' + videoObj.id)?.clientWidth
return (
<>
@ -80,7 +85,7 @@ const VideoOperation = ({
{
showTimeSelect ?
<VideoOperationHistroyTime
close={() => { setShowTimeSelect(false) }} histroyTime={histroyTime} setHistroyTime={setHistroyTime} setProcessDisX={setProcessDisX}
close={() => { setShowTimeSelect(false) }} videoObj={videoObj} setIsAdjustProcess={setIsAdjustProcess} playBackTime={playBackTime} histroyTime={histroyTime} setHistroyTime={setHistroyTime} setProcessDisX={setProcessDisX}
/>
: ''
}
@ -113,7 +118,7 @@ const VideoOperation = ({
: ''
}
<span style={{ marginLeft: 12 }}>
{histroyTime.length ? `${moment(histroyTime[0]).format(timeFormat)} / ${moment(histroyTime[1]).format(timeFormat)}` : ''}
{histroyTime.length ? `${showTime_} / ${moment(histroyTime[1]).format(timeFormat)}` : ''}
</span>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
@ -123,9 +128,9 @@ const VideoOperation = ({
<VideoOperationSpeed butStyle={butStyle} />
: ''
}
<div style={butStyle} onClick={() => {
{vcmp_videoplayHeight > 359 && vcmp_videoplaWidth > 599 ? <div style={butStyle} onClick={() => {
setShowTimeSelect(!showTimeSelect)
}}>时间设置</div>
}}>时间设置</div> : ""}
</div>
</>
:
@ -136,7 +141,7 @@ const VideoOperation = ({
operation.map(p => {
if (p.hide) return null;
return <img
src={`/assets/images/background/video-icon-${p.key}-${operationState[p.key].select ? 'select' : 'unselect'}.png`}
src={`${__webpack_public_path__}assets/images/background/video-icon-${p.key}-${operationState[p.key].select ? 'select' : 'unselect'}.png`}
height={18}
style={{ marginRight: 24, cursor: 'pointer' }}
onClick={(e) => { p.click() }}

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

@ -40,7 +40,7 @@ const VideoOperationCloudControl = ({
}].map((s, i) => {
return (
<img
src="/assets/images/background/up.png"
src={`${__webpack_public_path__}assets/images/background/up.png`}
style={Object.assign({
height: 24, width: 24, display: 'inline-block', transform: `rotate(${i * 90}deg)`,
position: 'absolute'

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

@ -6,7 +6,7 @@ import moment from "moment";
const timeFormat = 'YYYY-MM-DD HH:mm:ss'
const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProcessDisX,videoObj }) => {
const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProcessDisX,playBackTime,setIsAdjustProcess }) => {
const [selectedTimeRange, setSelectedTimeRange] = useState(histroyTime)
useEffect(() => {
@ -21,9 +21,9 @@ const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProc
return (
<div style={{
position: 'absolute', top: 'calc(50% - 90px)', left: 'calc(50% - 260px)',
width: 520, height: 180, backgroundColor: '#000000A5', padding: '40px 30px',
display: 'flex', flexDirection: 'column', justifyContent: 'space-between'
position: 'absolute', top: 'calc(50% - 130px)', left: 'calc(50% - 220px)',
width:440, height: 150, backgroundColor: '#000000A5', padding: 20,
display: 'flex', flexDirection: 'column', justifyContent: 'space-around'
}}>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<DatePicker
@ -32,8 +32,9 @@ const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProc
value={selectedTimeRange}
onChange={(t, timeRange) => {
setSelectedTimeRange(timeRange)
console.log(timeRange);
}}
style={{ width: '100%' }}
style={{ width: 354 }}
// disabledDate={(date, options) => {
// const { rangeStart, rangeEnd } = options;
// // console.log(date, options);
@ -54,7 +55,7 @@ const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProc
</div>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', }}>
<span style={{ color: '#FF7100' }}>
<img src={`/assets/images/background/warning.png`} height={14} style={{ position: 'relative', top: 2, marginRight: 2 }} />
<img src={`${__webpack_public_path__}assets/images/background/warning.png`} height={14} style={{ position: 'relative', top: 2, marginRight: 2 }} />
最长时间跨度不超过72小时
</span>
<span>
@ -76,7 +77,8 @@ const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProc
return ToastInCustomContainer.error('所选时间超过 72 小时')
}
setHistroyTime(selectedTimeRange)
playBackTime.current = selectedTimeRange
playBackTime = selectedTimeRange
setIsAdjustProcess(true)
setProcessDisX(0)
close()
}

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

@ -64,7 +64,7 @@ const VideoOperationTalk = ({
position: 'absolute', top: 'calc(50% - 88px)', left: 'calc(50% - 156px)',
width: 312, height: 186, backgroundColor: '#000000A5', transform: `scale(${vcmpVideo / 400 > 1.5 ? 1.5 : vcmpVideo / 400})`,
}}>
<img src={`/assets/images/background/${recordState == RecordState.START ? 'talking' : 'talk'}.png`} style={{ display: 'block', margin: '12px auto' }} />
<img src={`${__webpack_public_path__}assets/images/background/${recordState == RecordState.START ? 'talking' : 'talk'}.png`} style={{ display: 'block', margin: '12px auto' }} />
<div
style={{
height: 32, width: 88, textAlign: 'center', margin: 'auto', color: '#fff', backgroundColor: '#1859C1',

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

@ -101,6 +101,9 @@ const VideoPlay = ({ dispatch, actions,
const [disappear, setDisappear] = useState(false) //
const [numbers, setNumbers] = useState(false)
const [written, setWritten] = useState('')
const [showTime_, setShowTime] = useState('')
const [showTimeSelect, setShowTimeSelect] = useState(false)
const [hideFullScreenBut, setHideFullScreenBut] = useState(false)
@ -337,6 +340,7 @@ const VideoPlay = ({ dispatch, actions,
}
}, [histroyTime])
useEffect(() => {
// console.log(processDisX);
if (operationState && operationState.histroy.select) {
if (isAdjustProcess) {
//
@ -367,6 +371,7 @@ const VideoPlay = ({ dispatch, actions,
player.stop().then(() => {
player.play({ url: `${videoObj.replayUrl}?begin=${moment(Begain.current).format("YYYYMMDDHHmmss")}&end=${moment(playBackTime.current[1]).format("YYYYMMDDHHmmss")}` })
playState.current = false
setIsAdjustProcess(false)
})
} else {
//
@ -567,6 +572,9 @@ const VideoPlay = ({ dispatch, actions,
playState={playState.current}
videoFront={videoFront}
videoAfter={videoFront}
showTime_={showTime_}
setShowTime={setShowTime}
setShowTimeSelect={setShowTimeSelect}
/>
{/* 视频内容 */}
{
@ -599,7 +607,7 @@ const VideoPlay = ({ dispatch, actions,
{/* 下方操作栏 */}
{/* 显示操作功能条件(宽高) */}
{size?.parentWidth > 480 ?
{size?.parentWidth > 479 ?
<VideoOperation
operationState={operationState} operation={operation}
voiceDisY={voiceDisY} setVoiceDisY={setVoiceDisY}
@ -619,6 +627,10 @@ const VideoPlay = ({ dispatch, actions,
videoFront={videoFront}
videoAfter={videoFront}
playState={playState.current}
showTime_={showTime_}
playBackTime={playBackTime.current}
showTimeSelect={showTimeSelect}
setShowTimeSelect={setShowTimeSelect}
/> : ""
}
</div>

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

@ -8,10 +8,10 @@ import './videoPlay.less';
const timeFormat = 'YYYY-MM-DD HH:mm:ss'
const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name, videoObj, showTime, histroyTime, content, roll, videoStyle, player, resolution, playState }) => {
const VideoHeader = ({ setShowTimeSelect,showTime_, setShowTime, operationState, changeSelectState, setProcessDisX, name, videoObj, showTime, histroyTime, content, roll, videoStyle, player, resolution, playState }) => {
const time = useRef(moment(showTime || undefined))
const upTimeInterval = useRef(null)
const [showTime_, setShowTime] = useState(' ')
const updateTime = () => {
if (!showTime) {
@ -55,6 +55,7 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
const goBack = () => {
changeSelectState('histroy')
setShowTimeSelect(false)
if (playState) {
player.stop().then(() => {
if (resolution == 'sd') {
@ -73,7 +74,7 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
const vcmp_videopla = document.getElementById('vcmp_videoplay' + videoObj.id)?.clientWidth
return (
<div>
vcmp_videopla < 300 ? '' : <div>
<div style={{
height: '12%',
lineHeight: `${vcmp_videoplay * 0.12 > 42 ? 42 : vcmp_videoplay * 0.12 < 30 ? 30 : vcmp_videoplay * 0.12}px`,
@ -86,8 +87,8 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
color: '#fff'
}}>
<Row>
<Col span={videoStyle == 'true' ? histroyTime.length ? 3 : 0 : 9} style={{
backgroundImage: videoStyle == 'true' ? "" : 'url(/assets/images/background/videoPlayBg.png)',
<Col span={videoStyle == 'true' ? (histroyTime.length ? 3 : 0) : (vcmp_videopla < 500 ? 14 : 9)} style={{
backgroundImage: videoStyle == 'true' ? "" : `url(${__webpack_public_path__}assets/images/background/videoPlayBg.png)`,
backgroundSize: '100% 100%',
backgroundRepeat: 'no-repeat',
padding: '0 12px'
@ -103,14 +104,14 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
'' : `${showTime_} ${name || ''}`
}
</Col>
<Col span={videoStyle == 'true' ? histroyTime.length ? 21 : 24 : vcmp_videopla > 480 ? 15 : 10} style={{}}>
<Col span={videoStyle == 'true' ? histroyTime.length ? 21 : 24 : vcmp_videopla < 500 ? 10 : 15} style={{}}>
<div style={{ paddingRight: 12 }}>
{content && content?.length > 0 ? <TextScroll content={content || []} duration={6} videoObj={videoObj} /> : ""}
</div>
</Col>
</Row>
</div>
</div>
</div >
)
}

3
code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx

@ -49,7 +49,6 @@ const LayoutContainer = props => {
useEffect(() => {
NProgress.done();
console.log(user, authCrossLoading, props);
if ((!user || !user.authorized) && !authCrossLoading && props.location.pathname != '/video_play_status') {
history.push('/signin');
}
@ -84,7 +83,7 @@ const LayoutContainer = props => {
// websocket 使
useEffect(() => {
console.log(socket)
// console.log(socket)
if (socket) {
socket.on('CAMERA_ONLINE', function (msg) {
console.info(msg);

30
code/VideoAccess-VCMP/web/client/src/layout/index.jsx

@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
import moment from 'moment';
import configStore from './store';
import { Provider } from 'react-redux';
import { createBrowserHistory } from 'history';
import { createBrowserHistory, push as pushs } from 'history';
import { ConnectedRouter } from 'connected-react-router'
import { Layout, NoMatch } from './containers';
import { BrowserRouter, Switch, Route } from "react-router-dom";
@ -20,7 +20,7 @@ const { initLayout, initApiRoot, resize, initWebSocket } = layoutActions;
const Root = props => {
const { sections, title, copyright, actions } = props;
const [history, setHistory] = useState(null)
const [historys, setHistorys] = useState(null)
const [store, setStore] = useState(null)
const [outerRoutes, setOuterRoutes] = useState([])
const [combineRoutes, setCombineRoutes] = useState([])
@ -135,7 +135,7 @@ const Root = props => {
const combineRoutes = flatRoutes(innerRoutes);
setInnerRoutes(combineRoutes)
setHistory(history)
setHistorys(history)
setStore(store)
setOuterRoutes(outerRoutes.map(route => (
<Route
@ -165,15 +165,13 @@ const Root = props => {
await store.dispatch(actions.auth.logout())
}
}
console.log(data);
setAuthCrossLoading(false)
});
// setAuthCrossLoading(false)
// MicroApp
const microAppListen = async (data) => {
console.log(actions);
console.log('mid:' + data.data.mid);
// console.log('mid' + data.data.mid);
if (data.action == 'initMicro') {
await store.dispatch(actions.auth.initAuth({
@ -183,13 +181,19 @@ const Root = props => {
...(data.data || {})
}))
if (data?.data?.mid) {
console.log(22315348);
await store.dispatch(push('/callService'));
} else {
await store.dispatch(push('/noMatch'));
}
setMicroAppWaiting(false)
} else if (data.action == 'videoImplant') {
history.push({
pathname: '/video_play_cross',
query: {
video: true,
...(data.data || {})
}
})
}
}
if (window.__MICRO_APP_ENVIRONMENT__) {
@ -208,7 +212,7 @@ const Root = props => {
}
}, [])
console.log(authCrossLoading, microAppWaiting);
// console.log(authCrossLoading, microAppWaiting);
return (
<>
@ -217,12 +221,12 @@ const Root = props => {
<ConfigProvider locale={zhCN}>
<Provider store={store}>
<BrowserRouter basename={window.__MICRO_APP_BASE_ROUTE__ || '/'}>
<ConnectedRouter history={history}>
<ConnectedRouter history={historys}>
<Switch>
{outerRoutes}
<Layout
history={history}
history={historys}
routes={innnerRoutes}
authCrossLoading={authCrossLoading}
microAppWaiting={microAppWaiting}
@ -244,8 +248,8 @@ const Root = props => {
{
resourceRoot.iotAuthWeb && !window.__MICRO_APP_ENVIRONMENT__ ?
<iframe id="iotAuth" src={`${resourceRoot.iotAuthWeb}/cross`} style={{ position: 'absolute', top: 0, height: 1, visibility: 'hidden' }} frameBorder={0} >
<p>你的浏览器不支持 iframe</p>
</iframe>
<p p > 你的浏览器不支持 iframe</p >
</iframe >
: ''
}
</>

6
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx

@ -55,7 +55,6 @@ function cameraModal (props) {
cameraData.type == "nvr" || addNvr ? setcameraList(cameraList.slice(1, 4)) : "";
//axyData
if (axyData) {
console.log(axyData)
switch (axyData.openCamera) {
case "nvr":
setcameraList(cameraList.slice(1, 4))
@ -146,7 +145,6 @@ function cameraModal (props) {
if (cameraData.id) {
values.id = cameraData.id;
}
console.log(values);
dispatch(equipmentWarehouse.postCameraIpc(values)).then((res) => {
if (res.success) {
onReset();
@ -159,9 +157,7 @@ function cameraModal (props) {
return { id: v.id, name: v.name, };
});
cascadeRef.current.cascadeCameraForm().then((values) => {
console.log(values);
dispatch(equipmentWarehouse.postAddCascade({ ...values, camera: data })).then((res) => {
console.log(res);
if (res.success) {
onReset();
}
@ -273,7 +269,6 @@ function cameraModal (props) {
.ipcCameraForm()
.then((values) => {
//
console.log(values);
var front = new moment(); //
setloading(true);
dispatch(
@ -304,7 +299,6 @@ function cameraModal (props) {
})
.catch((errors) => {
//
console.log();
});
} else if (clickNum == 4) {
cascadeRef.current

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrModal.jsx

@ -152,7 +152,7 @@ function nvrModal(props) {
labelPosition="left"
labelAlign="left"
labelWidth="90px"
onValueChange={(values) => console.log(values)}
// onValueChange={(values) => console.log(values)}
getFormApi={(formApi) => (form.current = formApi)}
>
<Row>

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

@ -588,7 +588,7 @@ const CameraHeader = (props) => {
</div>
<div style={{ display: "flex" }}>
<Form
onSubmit={(values) => console.log(values)}
// onSubmit={(values) => console.log(values)}
// onValueChange={values=>console.log(values)}
getFormApi={(formApi) => (api.current = formApi)}
layout="horizontal"

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

@ -399,7 +399,7 @@ const NvrHeader = (props) => {
</div>
<div style={{ display: "flex" }}>
<Form
onSubmit={(values) => console.log(values)}
// onSubmit={(values) => console.log(values)}
// onValueChange={values=>console.log(values)}
getFormApi={(formApi) => (api.current = formApi)}
layout="horizontal"

129
code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx

@ -4,63 +4,98 @@ import qs from "qs";
import { VideoPlay } from '$components'
import '../style.less'
import { useRef } from 'react';
import './videoPlayCross.less'
const VideoPlayCross = (props) => {
const [videoParams, setVideoParams] = useState(null)
const [sizeWh, setSizeWh] = useState()
const viideoData = useRef(videoParams)
const { user, history } = props;
const [videoParams, setVideoParams] = useState(null)
const [sizeWh, setSizeWh] = useState()
const viideoData = useRef(videoParams)
useEffect(() => {
// console.log(props);
if (props.location.search) {
decodeURIComponent(props.location.search)
const params = qs.parse(props.location.search.slice(1))
if (params.videoObj) {
// params.videoObj = (new Function("return " + params.videoObj))()
decodeURIComponent(params.videoObj)
params.videoObj = JSON.parse(params.videoObj)
// params.height = JSON.parse(params.height)
setVideoParams(params)
viideoData.current = params
}
}
function messageListen (e) {
//
const { data } = e
if (data && data.action) {
if (data.action == 'init_video' || data.action == 'epidemic_video') {
setVideoParams({ ...(viideoData.current || {}), ...data.params })
}
useEffect(() => {
// iframe
if (props.location.search) {
decodeURIComponent(props.location.search)
const params = qs.parse(props.location.search.slice(1))
if (params.videoObj) {
// params.videoObj = (new Function("return " + params.videoObj))()
decodeURIComponent(params.videoObj)
params.videoObj = JSON.parse(params.videoObj)
// params.height = JSON.parse(params.height)
setVideoParams(params)
viideoData.current = params
}
}
function messageListen (e) {
//
const { data } = e
if (data && data.action) {
if (data.action == 'init_video' || data.action == 'epidemic_video') {
setVideoParams({ ...(viideoData.current || {}), ...data.params })
}
}
const resize_ = () => {
}
}
const resize_ = () => {
if (props.location.search) {
const params = qs.parse(props.location.search.slice(1))
setSizeWh({ parentWidth: document.body.clientWidth, parentHeight: document.body.clientHeight, width: params.width || document.body.clientWidth, height: params.height || document.body.clientHeight })
}
resize_()
if (window.parent) {
window.addEventListener('message', messageListen);
}
window.addEventListener('resize', resize_); //
return () => {
}
}
resize_()
if (window.parent) {
window.addEventListener('message', messageListen);
}
window.addEventListener('resize', resize_) //
return () => {
if (!history?.location?.query?.video) {
window.removeEventListener('message', messageListen);
window.removeEventListener('resize', resize_);
}
}, [])
return (
<>
{
videoParams && <VideoPlay {...videoParams} sizeWh={sizeWh} />
}
</>
)
}
window.removeEventListener('resize', resize_);
}
}, [])
useEffect(() => {
let data = history?.location?.query
console.log(data);
//
const resize = () => {
if (history?.location?.query) {
setSizeWh({
parentWidth: document.getElementById('VcmpApp')?.clientWidth,
parentHeight: document.getElementById('VcmpApp')?.clientHeight,
width: data?.width || document.getElementById('VcmpApp')?.clientWidth,
height: data?.height || document.getElementById('VcmpApp')?.clientHeight
})
}
}
resize()
window.addEventListener('resize', resize)
return () => {
window.removeEventListener('resize', resize);
}
}, [history?.location?.query])
return (
<>
{history?.location?.query?.video ?
<div style={{ width: '100%', height: '100%' }}>
{sizeWh && <VideoPlay videoObj={history?.location?.query?.videoObj || {}} sizeWh={sizeWh} />}
</div>
: videoParams && <VideoPlay {...videoParams} sizeWh={sizeWh} />
}
</>
)
}
function mapStateToProps (state) {
const { auth } = state;
return {
user: auth.user,
};
const { auth } = state;
return {
user: auth.user,
};
}
export default connect(mapStateToProps)(VideoPlayCross);

3
code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.less

@ -0,0 +1,3 @@
semi-portal-inner {
background: white;
}

2
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx

@ -328,7 +328,7 @@ const Carrierpigeon = (props) => {
</div>
<div style={{ display: "flex" }}>
<Form
onSubmit={(values) => console.log(values)}
// onSubmit={(values) => console.log(values)}
// onValueChange={values=>console.log(values)}
getFormApi={(formApi) => (api.current = formApi)}
layout="horizontal"

2
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx

@ -291,7 +291,7 @@ const Statuscode = (props) => {
</div>
<div style={{ display: "flex" }}>
<Form
onSubmit={(values) => console.log(values)}
// onSubmit={(values) => console.log(values)}
// onValueChange={values=>console.log(values)}
getFormApi={(formApi) => (api.current = formApi)}
layout="horizontal"

1
code/VideoAccess-VCMP/web/client/src/sections/openness/containers/callService.jsx

@ -63,7 +63,6 @@ const CallService = (props) => {
function mapStateToProps (state) {
const { auth, global, members } = state;
console.log('ccccccccccc', state)
return {
loading: members.isRequesting,
user: auth.user,

2
code/VideoAccess-VCMP/web/package.json

@ -68,7 +68,7 @@
"moment": "^2.29.3",
"npm": "^7.20.6",
"perfect-scrollbar": "^1.5.5",
"qs": "^6.10.5",
"qs": "^6.11.0",
"screenfull": "5.2.0",
"socket.io-client": "^1.7.4",
"socket.io-parser": "^3.4.1",

Loading…
Cancel
Save