Add persistent watch time setting. #7547
1 changed files with 5 additions and 1 deletions
|
@ -270,8 +270,12 @@ function VideoViewer(props: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePosition(player) {
|
function handlePosition(player) {
|
||||||
|
const currTime = player.currentTime();
|
||||||
|
const durationInSeconds = claim.value.video && claim.value.video.duration;
|
||||||
|
if (Number(durationInSeconds) > Number(currTime)) {
|
||||||
savePosition(uri, player.currentTime());
|
savePosition(uri, player.currentTime());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function restorePlaybackRate(player) {
|
function restorePlaybackRate(player) {
|
||||||
if (!vjsCallbackDataRef.current.embedded) {
|
if (!vjsCallbackDataRef.current.embedded) {
|
||||||
|
|
Loading…
Reference in a new issue