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
e750c85e
Commit
e750c85e
authored
May 06, 2024
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 视频回放增加进度条
parent
80ed985d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
index.js
packages/base-components/VmsVideo/src/recVideo/index.js
+11
-6
No files found.
packages/base-components/VmsVideo/src/recVideo/index.js
View file @
e750c85e
...
...
@@ -31,10 +31,11 @@ const RecVideo = (props, ref) => {
useEffect
(()
=>
{
let
current
=
percent
;
if
(
loading
)
timeRef
.
current
=
setInterval
(()
=>
{
current
=
current
+
1
;
setPercent
(
current
>
99
?
99
:
current
);
},
40
);
if
(
loading
)
timeRef
.
current
=
setInterval
(()
=>
{
current
=
current
+
1
;
setPercent
(
current
>
99
?
99
:
current
);
},
20
);
return
()
=>
{
if
(
timeRef
.
current
)
{
...
...
@@ -42,7 +43,7 @@ const RecVideo = (props, ref) => {
timeRef
.
current
=
null
;
setPercent
(
0
);
}
}
}
;
},
[
loading
]);
useImperativeHandle
(
ref
,
()
=>
{
...
...
@@ -143,7 +144,11 @@ const RecVideo = (props, ref) => {
{
loading
?
(
<>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-load`
)}
>
<
Progress
className
=
{
classNames
(
`
${
prefixCls
}
-progress`
)}
strokeWidth
=
{
14
}
percent
=
{
percent
}
/
>
<
Progress
className
=
{
classNames
(
`
${
prefixCls
}
-progress`
)}
strokeWidth
=
{
14
}
percent
=
{
percent
}
/
>
<
span
>
视频回放信息获取中,请稍后
...
<
/span
>
<
/div
>
<
/
>
...
...
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