Hybrid View

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Location
    São Paulo
    Posts
    3
    Vote Rating
    0
    djgabriell is on a distinguished road

      0  

    Default A video challenge

    A video challenge


    Good Morning
    This is my first posting.
    How to run a video in the same scene in full screen and when you pressed the "done" button (default Ipad2) closed this video back to the same scene?
    This video would run only when pressed any button on the scene.


    Thank you

  2. #2
    Sencha User
    Join Date
    Dec 2012
    Location
    São Paulo
    Posts
    3
    Vote Rating
    0
    djgabriell is on a distinguished road

      0  

    Default


    I can open the video (without player) in the same scene by pressing a button but the video is full screen (like I wanted) but I can not go back to the scene.

  3. #3
    Sencha - Architect Dev Team
    Join Date
    Apr 2012
    Posts
    183
    Vote Rating
    18
    miro.bojic will become famous soon enough miro.bojic will become famous soon enough

      1  

    Default


    Hi djgabriell, and welcome to the forums.

    You need a little bit of custom JavaScript to pull this off - at least for iOS devices. Fullscreen mode API is something that is still not full specified for HTML5 so implementations are very specific for each browser.

    Anyway, to switch scene when you press 'Done' when viewing videos on an iOS device do the following:

    In the scene that contains the video, under Actions -> Start -> Custom JavaScipt
    enter following code:

    Code:
    //get the reference for the video
    var video = document.getElementsByTagName('video')[0]; 
    
    //listen to when the user presses 'Done', and then execute onVideoEndsFullScreen
    video.addEventListener('webkitendfullscreen', onVideoEndsFullScreen, false);
    
    function onVideoEndsFullScreen() {
        //go to next scene when that happens
        controller.goToNextScene();
        //or alternatively, you can call controller.replayScene(); to restart current scene
    }
    For Animator JS API please see the guide here http://docs.sencha.com/animator/1-3/...de/advanced_js

    Hope it helps!

  4. #4
    Sencha User
    Join Date
    Dec 2012
    Location
    São Paulo
    Posts
    3
    Vote Rating
    0
    djgabriell is on a distinguished road

      0  

    Default


    function part. Rather than go back to previous scene he simply pause the video and leave full screen.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar