-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathany.js
30 lines (27 loc) · 859 Bytes
/
any.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { players, counter } = this.props;
const id = "_id12903u1udnp93n9d7nd";
const high = filteredHighlights.filter( h => { return h._id === id });
const { start, stop, video } = high;
players[video].seekTo(start);
const setTime = setInterval( () => {
if (players[video].getCurrentTime().toFixed(1) === start) {
this.seeking(highlight, counter);
}
}, 10);
seeking(highlight, count){
const { start, stop, video } = highlight;
const timer = setInterval( () => {
const { dispatch, counter, players, playList } = this.props;
if (counter !== count) {
clearInterval(timer);
} else {
if (players[video].getCurrentTime().toFixed(1) === stop) {
if (playList === true) {
const { filteredHighlights } = this.props;
} else {
dispatch({ type: PP });
}
}
}
}, 10);
}