Last active
April 7, 2020 16:19
-
-
Save teimur8/57c1dceb32a712253ded5a38900e98e5 to your computer and use it in GitHub Desktop.
Revisions
-
teimur8 revised this gist
Apr 7, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ player.addEventListener('timeupdate', (e)=>{ player.currentTime = options.start; } if(Math.round(player.currentTime) % 5 === 0){ console.log(Math.round(player.currentTime)); } }); -
teimur8 revised this gist
Apr 7, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ player.addEventListener('timeupdate', (e)=>{ if(player.currentTime > options.end){ player.currentTime = options.start; } if(Math.round(player.currentTime) % 5 === 0){ console.log(player.currentTime); } }); -
teimur8 revised this gist
Apr 7, 2020 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,15 @@ var player = document.querySelector('video'); var options = { start:0, end: 10000000, } player.addEventListener('timeupdate', (e)=>{ if(player.currentTime > options.end){ player.currentTime = options.start; } if(player.currentTime % 5){ console.log(player.currentTime); } }); playerSet = (_start,_end) => { -
teimur8 created this gist
Apr 7, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ var player = document.querySelector('video'); var options = { start:0, end: 10000, } player.addEventListener('timeupdate', (e)=>{ if(player.currentTime > options.end){ player.currentTime = options.start; } }); playerSet = (_start,_end) => { player.currentTime = _start; options.end = _end; options.start = _start; player.play(); }