Browse Source

播放修改

release_0.0.2
wenlele 2 years ago
parent
commit
1453d187c4
  1. 4
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  2. 5
      code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx

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

@ -46,7 +46,6 @@ const VideoPlay = ({
// //
iotVideoServer iotVideoServer
}) => { }) => {
console.log(videoObj);
const [jessibuca, setjessibuca] = useState(null) const [jessibuca, setjessibuca] = useState(null)
const [isPlaying, setIsPlaying] = useState(false) const [isPlaying, setIsPlaying] = useState(false)
const [operationState, setoperationState] = useState() const [operationState, setoperationState] = useState()
@ -310,7 +309,7 @@ const VideoPlay = ({
return ( return (
<> <>
<div className="vcmp_videoplay" style={{ height: height || '100%', width: width || '100%', overflow: 'hidden' }}> <div className="vcmp_videoplay" style={{ height: height ? height : '100%', width: width || '100%', overflow: 'hidden' }}>
<div id="vcmp_videoplay" style={{ position: 'relative', display: 'flex', height: '100%', width: '100%' }}> <div id="vcmp_videoplay" style={{ position: 'relative', display: 'flex', height: '100%', width: '100%' }}>
{/* 顶部信息 */} {/* 顶部信息 */}
<VideoHeader <VideoHeader
@ -375,7 +374,6 @@ const VideoPlay = ({
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global } = state; const { auth, global } = state;
console.log('global',global);
return { return {
user: auth.user, user: auth.user,
iotVideoServer: global.iotVideoServer, iotVideoServer: global.iotVideoServer,

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

@ -8,17 +8,19 @@ const VideoPlayCross = (props) => {
const [videoParams, setVideoParams] = useState(null) const [videoParams, setVideoParams] = useState(null)
useEffect(() => { useEffect(() => {
console.log(props);
if (props.location.search) { if (props.location.search) {
const params = qs.parse(props.location.search.slice(1)) const params = qs.parse(props.location.search.slice(1))
if (params.videoObj) { if (params.videoObj) {
console.log(params.videoObj); console.log(params.videoObj);
// params.videoObj = (new Function("return " + params.videoObj))() // params.videoObj = (new Function("return " + params.videoObj))()
params.videoObj = JSON.parse(params.videoObj) params.videoObj = JSON.parse(params.videoObj)
params.height = JSON.parse(params.height)
setVideoParams(params) setVideoParams(params)
return return
} }
} }
console.log(videoParams);
function messageListen (e) { function messageListen (e) {
// //
const { data } = e const { data } = e
@ -34,6 +36,7 @@ const VideoPlayCross = (props) => {
return () => { return () => {
window.removeEventListener('message', messageListen); window.removeEventListener('message', messageListen);
} }
}, []) }, [])
return ( return (
<> <>

Loading…
Cancel
Save