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
1cf21402
Commit
1cf21402
authored
Oct 26, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改视频掉线重连
parent
927e2774
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
App.jsx
packages/base-components/VmsVideo/src/App.jsx
+16
-2
No files found.
packages/base-components/VmsVideo/src/App.jsx
View file @
1cf21402
...
...
@@ -8,6 +8,7 @@ class App extends React.Component {
constructor
(
props
)
{
super
(
props
);
this
.
jessibuca
=
null
;
this
.
outTime
=
null
;
this
.
showOperateBtns
=
true
;
this
.
$container
=
null
;
this
.
forceNoOffscreen
=
false
;
...
...
@@ -75,8 +76,17 @@ class App extends React.Component {
};
if
(
dom
)
{
this
.
jessibuca
=
new
window
.
Jessibuca
(
jsc
);
this
.
jessibuca
.
on
(
"loadingTimeout"
,
function
()
{
console
.
log
(
'timeout'
)
this
.
jessibuca
.
on
(
"error"
,
(
error
)
=>
{
if
(
error
===
'fetchError'
||
error
===
'websocketError'
)
{
// 这里统一的做重连
this
.
outTime
=
setTimeout
(()
=>
{
this
.
jessibuca
.
pause
().
then
(()
=>
{
this
.
jessibuca
.
play
().
then
().
catch
((
e
)
=>
{
// console.log(e)
})
})
},
5000
);
}
})
}
}
...
...
@@ -109,6 +119,10 @@ class App extends React.Component {
isPlaying
:
false
,
});
}
if
(
this
.
outTime
)
{
clearTimeout
(
this
.
outTime
);
this
.
outTime
=
null
;
}
}
renderCheckedArr
()
{
let
{
VideoInfo
}
=
this
.
props
;
...
...
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