Skip to main content
Participant
November 30, 2022
Question

I can't pause video while playing

  • November 30, 2022
  • 1 reply
  • 337 views

I wanted to pause video while it plays. 

For example after video started playing it has to be stopped at 21st second.

After it stopped, some button will show up.

If I click on the button, It will start playing from 30th second etc. 

 

PS: I want to use it on the web.

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    November 30, 2022

    and how are you playing the video?  in a video component?

     

    if yes, what's the component's instance name?

    Participant
    December 1, 2022

    Yes, instance name is mainVideoId

    If I click on the video, it will start playing. 

    So it should be paused or stopped at 21 seconds. 

    $('#dom_overlay_container').on('click', '#MainVideoId', function() {
    	$('#MainVideoId')[0].play();
    }.bind(_this));

     

    kglad
    Community Expert
    Community Expert
    December 1, 2022

    $('#dom_overlay_container').on('click', '#MainVideoId', function() {
    $('#MainVideoId')[0].play();

    setTimeout(stopVideoF,21000);
    }.bind(_this));

     

    function stopVideoF(){

     

    }$('#MainVideoId')[0].stop();