mirror of
https://github.com/status-im/consul.git
synced 2025-02-03 09:24:25 +00:00
Small tweaks to video playback
This commit is contained in:
parent
bdd066425c
commit
45df69cf48
@ -28,7 +28,9 @@ function initialiateVideoChange(index) {
|
|||||||
loadingBar.style.transitionDuration = '0s'
|
loadingBar.style.transitionDuration = '0s'
|
||||||
|
|
||||||
// reset the current video
|
// reset the current video
|
||||||
|
if (!isNaN($$videos[currentIndex].duration)) {
|
||||||
$$videos[currentIndex].currentTime = 0
|
$$videos[currentIndex].currentTime = 0
|
||||||
|
}
|
||||||
$$videoControls[currentIndex].classList.remove('playing')
|
$$videoControls[currentIndex].classList.remove('playing')
|
||||||
|
|
||||||
// stop deactivation
|
// stop deactivation
|
||||||
@ -59,7 +61,8 @@ function playVideo(index, wrapper) {
|
|||||||
|
|
||||||
$$videoControls[index].querySelector(
|
$$videoControls[index].querySelector(
|
||||||
'.progress-bar span'
|
'.progress-bar span'
|
||||||
).style.transitionDuration = `${Math.ceil($$videos[index].duration / playbackRate)}s`
|
).style.transitionDuration =
|
||||||
|
Math.ceil($$videos[index].duration / playbackRate).toString() + 's'
|
||||||
|
|
||||||
// set the currentIndex to be that of the current video's index
|
// set the currentIndex to be that of the current video's index
|
||||||
currentIndex = index
|
currentIndex = index
|
||||||
|
Loading…
x
Reference in New Issue
Block a user