-
18 Jan 2013 4:13 AM #1
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"); } } } });
-
20 Jan 2013 7:44 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
20 Jan 2013 9:40 PM #3
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.
-
21 Jan 2013 4:23 AM #4
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?


Reply With Quote