Results 1 to 3 of 3

Thread: Video pause and play again...

  1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default 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
      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
      0  

    Default thanks

    i need thanks you !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •