BigVideo.js
BigVideo.js copied to clipboard
pause video on start
How I pause/stop the video at first? I want to pause/stop the video at first and it's play when clicked on play button.
-
In bigvideojs init update the autoplay var from true to false player = videojs(vidEl.substr(1), { controls:false, autoplay:false, preload:'auto', techOrder:videoTechOrder });
-
In the playVideo function change isPlaying = true; to isPlaying = false;
-
Update the playControl function to the following function playControl() { if(isPlaying) { player.pause(); isPlaying = false; } else { player.play(); isPlaying = true; } }
Hi @kamalcha , Did you solve it without modifying the bigvideo js file. If yes please let me know the changes u did.
Thanks.
big video is automatically pausing when i scroll to a different section, but not resuming when i scroll back to tht section, how do i prevent the video from pausing