Code:
Ext.define('Club.view.SharedVideo', {
extend: 'Ext.Container',
xtype: 'sharedvideo',
requires: [
],
id: 'sharedvideo',
initialize:function(){
this.callParent()
},
load: function(params){
var that = this
this.url = params.url
this.contentid = params.contentid
this.video = Ext.create('Ext.Video',{
cls: Ext.baseCSSPrefix + 'videoshared',
layout:'fit',
width:'100%',
height: '400px',
controls:false,
loop:true,
preload: true,
autoResume: false,
muted: true,
url: that.url,
posterUrl: that.url.replace('.mp4','.jpg')
})
this.video.play()
var videoselector = this.video.element.dom.querySelector('video')
videoselector.setAttribute('webkit-playsinline','')
videoselector.setAttribute('playsinline','')
//that.likes = Ext.Create
var store=Ext.create('Club.store.Action',{
params:{ id: that.contentid },
listeners:{
load: function( store, records, successful, operation, eOpts ){ }
}
})
this.add([
that.video
,
{
xtype: 'label',
style:'margin-left:5px;margin-top:410px',
html: '<b>Curtidas</b>'
},
{
height:'100%',
scrollable: false,
width:'100%',
style:'background:#fff;margin-left:5px;margin-top:430px',
xtype: 'dataview',
itemTpl: '<div>{username}</div>',
store: store
}
])
},
config: {
scrollable:true,
fullscreen: true,
styleHtmlContent: true,
layout: 'fit',
height:'100%',
items:[
{
xtype: 'toolbar',
docked: 'top',
ui: 'clean',
title: 'Video',
items: [
{
xtype: 'button',
text: 'Voltar',
ui: 'back',
handler: function(){
}
}
]
}
]
}
});