Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default jumping to a scene after h.264 movie stops / user clicks "back"

    jumping to a scene after h.264 movie stops / user clicks "back"


    I have couple of questions:

    1. is there a way to jump to a particular scene after a h.264 movie reaches the end?
    2. i also noticed when I hit back while h.264 movie is playing, i can still hear the audio from the movie. Is this a bug?

    TIA

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

      0  

    Default


    1. Yes I believe you can listen for an event on the video that will tell you when it is done. Google "HTML5 media events". Then you can call "controller.goToNextScene()" once the video is done.

    2. Not sure what you are meaning by 'back'. For animator projects, the video will probably not stop if you switch scenes, you would have to stop it with JS by using a scene end/start handler.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default


    Do I put the js in the "custom JS section" or in an HTML editor?

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

      0  

    Default


    I'd recommend using the custom js feature in Animator.

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Posts
    2
    Vote Rating
    0
    jhill3d is on a distinguished road

      0  

    Default more explanation for noobs

    more explanation for noobs


    I have a single video playing in scene 2. When the video ends, I simply want Animator to jump to the scene 3. Can someone please explain and provide an example or the code to do so? Your time is very much appreciated.

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

      0  

    Default


    You could do something like this. Make sure to give your video element an id of "my-video-id" or change the id in the code to match your video id.

    This, should jump to the next scene when the video is done. However, you'll have to watch out if you change the scene before the video is done, since the video can still be playing in the background and firing the ended event even though it is not visible.

    Code:
    if (!this.videoListener) {
        
        //so we only call this once
        this.videoListener = true;
        
        var videoContainer = controller.getElementById('my-video-id');
        var videoElement = videoContainer.querySelector('video');
        
        videoElement.addEventListener('ended',function(){
            controller.goToNextScene();
        },false);
        
    }

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi