View Full Version : Button to show video

28 Sep 2010, 3:22 AM
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
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 ??


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];


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>"+
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>"+

27 Oct 2010, 1:05 AM
I end up, using phoneGap + native code.



3 Jan 2011, 3:21 AM
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
Here, I've posted about this on the phoneGap list :


6 Jan 2011, 2:33 AM
Could you detail the native+phonegap solution ? I've got a lot of issues with the sencha video object.

So did it help ?