-
28 Sep 2010 3:22 AM #1
Button to show video
Button to show video
Hi all,
To be able to handle video support for any mobile, I go for native mp4 video for iphone and youtube for android.
I noticed that people were happy to
1. just touch the launch video button on the android version,
2 rather than waiting for the video to load and display a preview image and then touch the video and wait for the full screen view on iphone.
Is there a way to make a button, that could just launch mp4 video ? I try with a a href link but it runs safari
I would prefere to stay in the sencha touch environment...
Thank you
-
3 Oct 2010 4:16 PM #2
Thanks !
Thanks !
Ok !
So using the video item is working great
Thank you to sencha touch team.
Using an HTML container with html content is also working (see code under).
But, how to make a simple button that would run the video like if you clicked on the thumbnail video ??
Code:Ext.ns('Ext.ux'); Ext.ux.videoDisplay = Ext.extend(Ext.Panel, { layout: 'card', style:'padding:0 8px', initComponent : function() { this.t_container = new Ext.Container({ scroll: 'vertical', html: '<div class="box">Video en chargement...<br></div>', }); this.items = [this.t_container]; this.addListener("beforeactivate",this.onDisplayWin); Ext.ux.winnerDisplay.superclass.initComponent.call(this); }, onDisplayWin : function(pComponent) { var htmlStr = "<div class='spacer'></div>"+ "<div class='box' style='text-align:center'>"+ "<video width='200px' height='100px' controls autobuffer><source src='"+video.url+"' type='video/mp4' /></video>"+ "</div>"; if (Ext.is.Android) { var htmlStr = "<div class='spacer'></div>"+ "<div class='box' style='text-align:center'>"+ "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='200px' height='100px' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'><param name='src' value='http://www.youtube.com/v/qZSIxZjEujg' /><embed type='application/x-shockwave-flash' width='425' height='350' src='http://www.youtube.com/v/qZSIxZjEujg'></embed></object>"+ "</div>"; } this.t_container.update(htmlStr); } });
-
27 Oct 2010 1:05 AM #3
I end up, using phoneGap + native code.
Thanks.
g
-
3 Jan 2011 3:21 AM #4
Details
Details
Could you detail the native+phonegap solution ? I've got a lot of issues with the sencha video object.
-
3 Jan 2011 5:47 AM #5
Here, I've posted about this on the phoneGap list :
http://groups.google.com/group/phone...98c32b1a863dda
-
6 Jan 2011 2:33 AM #6
Similar Threads
-
Show the button up when mouse over
By thiner in forum Ext 2.x: Help & DiscussionReplies: 9Last Post: 22 Sep 2011, 9:12 AM -
Can I play a YouTube video in Ext.Video component?
By eDissideNT in forum Sencha Touch 1.x: DiscussionReplies: 7Last Post: 27 Sep 2010, 11:00 AM -
Can't get icon to show for button?
By bu123 in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 17 Jul 2010, 11:23 AM -
how to show button tooltip
By lalit_ce in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 12 Jun 2009, 6:55 AM -
hide button first, then show, button does not appear
By iloveext in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 3 Jun 2007, 5:48 PM


Reply With Quote