1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    1
    Vote Rating
    0
    bobo2013 is on a distinguished road

      0  

    Default Video pause and play again...

    Video pause and play again...


    Hello,

    I have a video on the scene 1 . I would like to be able to pause this video when I go to the scene 2 and start it again (at the moment when it paused ) when I come back to the scene 1. Is it possible?
    Thank you for your help.
    Boris.

  2. #2
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    This should be possible in most browser (probably not on iOS).

    So what I would do is:

    At the start action of the first scene I'd add the following custom JS
    Code:
    //note that you need to give the video an id of "myVideo" in Animator
    var videoContainer = controller.getElementById('myVideo');
    var videoEl = videoContainer.querySelector('video');
    videoEl.play();
    Then at the start action of the second scene I'd add the following custom JS
    Code:
    var videoContainer = controller.getElementById('myVideo');
    var videoEl = videoContainer.querySelector('video');
    videoEl.pause();

  3. #3
    Banned
    Join Date
    May 2013
    Posts
    1
    Vote Rating
    0
    jony_blue is on a distinguished road

      0  

    Default thanks

    thanks


    i need thanks you !

Thread Participants: 2