1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    53
    Vote Rating
    0
    sandeepmnit35 is on a distinguished road

      0  

    Default Video media event handling

    Video media event handling


    I am using below view to play a video but in Iphone it is showing a black screen then after some seconds it is showing the black screen with play icon and then movind to iphone native video player to play the video. I want to skips the 2 blackscreen and want directly native player once I call below view. If it is not posible , I want to display a loading popup and hide it once it show native player but don't know how to hide that after staring it. What event I need to handle here.

    once video is ended in the native video player it is firing ended event which I am hadnling but if I click on done button without completely play of video player, it is not firing stop event.Which event it will hire in this scenario so I can capture it.

    Please help me in this.

    HTML Code:
    Ext.define('Por.view.Videop', {
    extend: 'Ext.Panel',
    xtype:'videopage',
    
    config:{
        layout:'fit',
        fullscreen: true,
        items:[
         
    {
       xtype : "titlebar",
       docked : "top",
       name : 'detailToolbar',
       
       items : [{
       xtype: 'button',
                    ui : 'back',
              text: 'Back',
              align: 'left',
                    action : 'back'
    
       }]
      },
             {
             xtype    : 'video',
                id: 'videoplay',
             loop: false,
             enableControls: false,    
             preload: true,
                autoPause: true,
                url:'resources/media/a.mp4',
    listeners: {
    
    
    
    stop: {
     element: 'media',
                        fn: function () {
                         alert("in stop");
                 //this.parent.fireEvent("stopmask");
                    
                        }
    
    
    },
    
    
    
    
    ended: {
                        element: 'media',
                        fn: function () {
                  this.parent.fireEvent("videolistpage");
                    
                        }
                    } }
                           
             }
             
        ],
    hide: {
     element: 'component',
                        fn: function () {
                         alert("in hide");
                 //this.parent.fireEvent("stopmask");
                    
                        }
    
    
    }
    }
    
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,011
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can have the poster as a loading image. Once the file is downloaded it will fire the canplaythrough event which you can then play the video.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    53
    Vote Rating
    0
    sandeepmnit35 is on a distinguished road

      0  

    Default


    I want to remove this intermediate screen and play the video automatically in native player. I am okay to show a loading popup untill it load the video and play it. What media event we can use if we are clicking on done button of native player without playing the video fully.

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    53
    Vote Rating
    0
    sandeepmnit35 is on a distinguished road

      0  

    Default


    Is it possible that we open the native player immediately after the video view screen is activated by skiping the poster image loading screen?

    Does sencha handle any media event which is fired after clicking the done button of native player in iphone without playing the full video?

Thread Participants: 1

Tags for this Thread