PDA

View Full Version : video autoplay not working in iphone



jyotidhote
2 May 2011, 6:20 AM
Hi,

I am new to sencha and creating a app for playing video by selecting the thumbnail from tabpanel, i want that when application launch it will play the first video automatically and other video also get play automatically when selecting on thumbnail, its working fine on my desktop but not in iphone :((.. i need to tap for video play in iphone ....


Code :
Jtb.HomeScreen = Ext.extend( Jtb.TabPanelEasyScroll, {
data : [
{
url : 'video/Why_is_it_w.mp4',
img : 'http://www.jitterbug.tv/Videos/ak4ZyJfwpK.jpg',
artist : 'The Baby Grands',
song : 'What is it W?'
}, {
url : 'video/TheNumberSong.mp4',
img : 'http://www.jitterbug.tv/Videos/TsNwQ8OG0W.jpg',
artist : 'mr. Ray',
song : 'The Number Song'
}, {
url : 'video/supersonicrocket.mp4',
img : 'http://www.jitterbug.tv/Videos/7_paKnVr6T.jpg',
artist : 'The Bazillions',
song : 'Super Sonic Rocket Bike'
}, {
url : 'http://jitter.s3.amazonaws.com/Monsters.mp4',
img : 'http://www.jitterbug.tv/Videos/YNPfjbBdtF.jpg',
artist : 'Playgrounds',
song : 'Monsters'
}
],


initComponent: function() {
this.fullscreen = true;
this.defaults = {
xtype : 'video'
//autoResume :true
//setLoading:true
};

this.tabBar = {
cls : 'jtb_preivewbar',
scroll : {
direction : 'horizontal',
useIndicators: false
}
};

this.items = this.data;
this.dockedItems = [
this.titleBar = new Jtb.TitleBar({
dock : 'bottom'
})
];
this.on('afterrender', this.onAfterRenderPanel, this);
this.on('cardswitch', this.onCardSwitchPanel, this);


Jtb.HomeScreen.superclass.initComponent.call(this);
},


onAdd: function(cmp, idx) {
var tabBar = this.tabBar;

cmp.tab = tabBar.insert(idx, {
xtype: 'previewtab',
card: cmp
});
tabBar.doLayout();
},


//listener
onAfterRenderPanel: function() {
var activeCard = this.getActiveItem();


this.titleBar.updateTitle(activeCard.artist, activeCard.song);
activeCard.play();




onCardSwitchPanel: function(panel, newCard, oldCard, index, animated) {
this.titleBar.updateTitle(newCard.artist, newCard.song);
newCard.play();
}

});



Thanks for the help

Sachin454
17 Mar 2012, 12:08 PM
i am using youtube url to play video in sencha but it is not working even though i have also used embed url still same thing not working ........I think it taking url as page ! Please Help me asap

var panel = new Ext.Panel({
id:'pnlVideo',
listeners:{
show:function(record,eOpts ){
this.removeAll();
this.add({
xtype : 'video',
x : 600,
y : 300,
width : 175,
height : 98,
url : "http://www.youtube.com/watch?v=F6eFFCi12v8"
});
}

}

});