Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
0f6f19da
Commit
0f6f19da
authored
May 17, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 视频修改
parent
6f91d058
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
27 deletions
+26
-27
index.jsx
packages/base-components/VmsVideo/src/index.jsx
+26
-27
No files found.
packages/base-components/VmsVideo/src/index.jsx
View file @
0f6f19da
...
@@ -75,6 +75,7 @@ const Video = (props, ref) => {
...
@@ -75,6 +75,7 @@ const Video = (props, ref) => {
PlayersA
.
pause
=
PlayersA
.
stop
;
PlayersA
.
pause
=
PlayersA
.
stop
;
if
(
ref
)
ref
.
current
=
PlayersA
;
if
(
ref
)
ref
.
current
=
PlayersA
;
})
})
.
catch
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
try
{
try
{
...
@@ -83,9 +84,25 @@ const Video = (props, ref) => {
...
@@ -83,9 +84,25 @@ const Video = (props, ref) => {
});
});
};
};
if
(
VideoInfo
.
protocol
!=
'萤石EZOPEN'
)
{
useImperativeHandle
(
ref
,
()
=>
{
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return
_video
.
current
.
jessibuca
;
// _video&& _video.current&&_video.current.jessibuca
});
}
else
{
getToken
();
}
const
CommonPath
=
const
CommonPath
=
VideoInfo
.
gateway
||
window
?.
globalConfig
?.
hasGateWay
?
'PandaCore/GateWay/Video/'
:
''
;
// 配置了gateway或者pc端web配置中有gateway
VideoInfo
.
gateway
||
window
?.
globalConfig
?.
hasGateWay
?
'PandaCore/GateWay/Video/'
:
''
;
// 配置了gateway或者pc端web配置中有gateway
VideoInfo
.
url
=
VideoInfo
.
useFullUrl
?
VideoInfo
.
fullUrl
:
(
VideoInfo
.
pandavmsHost
||
'ws://'
+
location
.
host
+
'/'
)
+
(
VideoInfo
.
gateway
?
CommonPath
:
''
)
+
'jessica/'
+
VideoInfo
.
id
;
let
operateBtns
=
{
let
operateBtns
=
{
fullscreen
:
true
,
fullscreen
:
true
,
screenshot
:
true
,
screenshot
:
true
,
...
@@ -94,34 +111,16 @@ const Video = (props, ref) => {
...
@@ -94,34 +111,16 @@ const Video = (props, ref) => {
audio
:
true
,
audio
:
true
,
};
};
useEffect
(()
=>
{
_VideoInfo
=
{
...
_VideoInfo
,
...
VideoInfo
};
if
(
VideoInfo
.
protocol
!=
'萤石EZOPEN'
)
{
// eslint-disable-next-line react-hooks/rules-of-hooks
if
(
JessibucaObj
&&
JessibucaObj
.
operateBtns
)
{
useImperativeHandle
(
ref
,
()
=>
{
JessibucaObj
.
operateBtns
=
{
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
...
operateBtns
,
return
_video
.
current
.
jessibuca
;
// _video&& _video.current&&_video.current.jessibuca
...
JessibucaObj
.
operateBtns
,
});
};
}
else
{
}
getToken
();
}
VideoInfo
.
url
=
VideoInfo
.
useFullUrl
?
VideoInfo
.
fullUrl
:
(
VideoInfo
.
pandavmsHost
||
'ws://'
+
location
.
host
+
'/'
)
+
(
VideoInfo
.
gateway
?
CommonPath
:
''
)
+
'jessica/'
+
VideoInfo
.
id
;
// eslint-disable-next-line react-hooks/exhaustive-deps
_VideoInfo
=
{
...
_VideoInfo
,
...
VideoInfo
};
if
(
JessibucaObj
&&
JessibucaObj
.
operateBtns
)
{
JessibucaObj
.
operateBtns
=
{
...
operateBtns
,
...
JessibucaObj
.
operateBtns
,
};
}
useEffect
(()
=>
{
return
()
=>
{
return
()
=>
{
try
{
try
{
PlayersA
&&
PlayersA
.
stop
();
PlayersA
&&
PlayersA
.
stop
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment