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
4b3be60e
Commit
4b3be60e
authored
Sep 22, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改
parent
c9c04c74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
index.jsx
packages/base-components/VmsVideo/src/index.jsx
+7
-4
No files found.
packages/base-components/VmsVideo/src/index.jsx
View file @
4b3be60e
...
@@ -84,7 +84,7 @@ const Video = (props, ref) => {
...
@@ -84,7 +84,7 @@ const Video = (props, ref) => {
})
})
.
catch
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
//
console.log(error);
try
{
try
{
PlayersA
&&
PlayersA
.
stop
();
PlayersA
&&
PlayersA
.
stop
();
}
catch
(
e
)
{}
}
catch
(
e
)
{}
...
@@ -104,16 +104,19 @@ const Video = (props, ref) => {
...
@@ -104,16 +104,19 @@ const Video = (props, ref) => {
getToken
();
getToken
();
}
}
const
resizeObserver
=
new
ResizeObserver
((
entries
)
=>
{
const
resizeObserver
=
new
ResizeObserver
(()
=>
{
PlayersA
&&
PlayersA
&&
PlayersA
.
reSize
(
refs
?.
current
?.
offsetWidth
||
952
,
refs
?.
current
?.
offsetHeight
||
500
);
PlayersA
.
reSize
(
refs
?.
current
?.
offsetWidth
||
952
,
refs
?.
current
?.
offsetHeight
||
500
);
});
});
refs
.
current
&&
resizeObserver
.
observe
(
refs
.
current
);
refs
?.
current
&&
resizeObserver
.
observe
(
refs
.
current
);
return
()
=>
{
return
()
=>
{
try
{
try
{
try
{
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
resizeObserver
.
unobserve
(
refs
?.
current
);
refs
?.
current
&&
resizeObserver
.
unobserve
(
refs
.
current
);
}
catch
(
e
)
{}
try
{
try
{
PlayersA
&&
PlayersA
.
stop
();
PlayersA
&&
PlayersA
.
stop
();
PlayersA
&&
PlayersA
.
destroy
();
PlayersA
&&
PlayersA
.
destroy
();
...
...
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