Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
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
baiguangyao
mr-julyedu
Commits
eae3e49f
Commit
eae3e49f
authored
Oct 08, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
只要播放就发送时间和进度
parent
0ab97133
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
src/components/video/index.js
+5
-1
No files found.
src/components/video/index.js
View file @
eae3e49f
...
...
@@ -388,6 +388,7 @@ class Video extends Component {
},
1000
)
}
clearInterval
(
this
.
timer
)
this
.
timer
=
null
;
})
this
.
ws
.
addEventListener
(
'message'
,
e
=>
{
const
data
=
JSON
.
parse
(
e
.
data
);
...
...
@@ -482,7 +483,7 @@ class Video extends Component {
uid
:
this
.
props
.
user
.
data
.
uid
,
token
:
this
.
token
,
platform
:
5
,
position
:
this
.
player
.
currentTime
(
),
position
:
parseInt
(
this
.
player
.
currentTime
()
),
ctype
:
ctype
,
})
}
...
...
@@ -491,6 +492,7 @@ class Video extends Component {
this
.
count
=
0
this
.
watchSec
=
0
clearInterval
(
this
.
timer
)
this
.
timer
=
null
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
player
&&
this
.
player
.
player
())
{
if
(
this
.
count
===
5
)
{
...
...
@@ -561,6 +563,7 @@ class Video extends Component {
this
.
getShareProgressInfo
()
}
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
})
this
.
player
.
on
(
'seeked'
,
()
=>
{
this
.
sendRecord
()
...
...
@@ -578,6 +581,7 @@ class Video extends Component {
this
.
player
&&
this
.
player
.
dispose
()
clearInterval
(
this
.
timer
)
this
.
timer
=
null
;
this
.
ws
&&
this
.
ws
.
close
()
this
.
ws
=
null
...
...
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