Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    groophug is on a distinguished road

      0  

    Default Answered: desperately need help passing data to 'VIDEO' correctly

    Answered: desperately need help passing data to 'VIDEO' correctly


    Please excuse me if this seems like a redundant question, however, i have searched the Sencha Touch QA to no avail. I am a nubee here, so I'm looking for best practice and correct way to do the following. Any specific examples would be ever so greatly appreciated, as i would like to use best practices.

    I am passing data from a list view to a detail panel using the following method:

    Code:
    ...
    itemtap: function (list, index, target, record) {
    ...
      Ext.Viewport.animateActiveItem (
        {xtype: 'page_videoplayer', data: record.data},
        {type:'pop'}
      );
    }
    I am able to access that data partially, however i would like to access that data inside of the 'video' xtype in my detail panel in order to set the 'url' and 'posterUrl' correctly ... see the following code ... again any help here greatly appreciated.

    This is my detail panel: 'page_videoplayer'

    Code:
    Ext.define('myapp.view.panel_VideoPlayer', {
    	extend: 'Ext.Panel',
    	xtype: 'page_videoplayer',
    	
    	requires: [
    		'Ext.Video'
    	],
    	
    	initialize:function (){
    				var panels = this.query('panel[tpl]'),
    				pLen = panels.length,
    				p = 0,
    				panel;
    				for (p=0; p < pLen; p++) {
    					panel = panels[p];
    					panel.setData(this.getData());
    			    }
    	},
    	
    	layout: {
    		type: 'vbox'
    	},
    	
    	config: {
    		title: 'VideoPlayer',
    		cls: 'bluePanel',
    		scrollable: true,
    		styleHtmlContent: true,
    		
    		items: [
    			{
    				items:[
    					{
    		                xtype: 'video',
    						itemId: 'vplayer',
    						title: 'video player',
    						width: '100%',
    						height: 200,
    						listeners: {
    							activate: function(){
    								// HOW WOULD I CORRECTLY ACCESS THE DATA HERE? WHAT I AM TRYING IS NOT WORKING 
    								this.setUrl('http://s3.amazonaws.com/cf-templates-1vy0cxj1zsmok-us-east-1/videos_encoded/'+record.getData('videofile')+'.m4v');
    								this.setPosterUrl('http://s3.amazonaws.com/cf-templates-1vy0cxj1zsmok-us-east-1/videos_encoded/'+record.getData('videofile')+'_0000.png');
    							}
    						}
    		        	}
    				]
    			},
    			{
    		        xtype:'panel',
    				tpl:[
    				// VIA THE INITIALIZE FUNCTION ABOVE I AM ABLE TO ACCESS THE DATA CORRECTLY HERE
    				'Title: {videotitle}</br>',
    				'User: {username}</br>',
    				'Rating: {videorating}</br>',
    				'Views: {videoviews}',
    				'',
    				''
    				].join(''),
    				flex:1
    			},
    			{
    				xtype: 'button',
    				text: 'close',
    				ui: 'confirm',
    				action: 'btn_player_close',
    				cls: 'button_display',
    				height: 40,
    				width: 200
    			}
    		]
    	}
    });

  2. In the initialize method you can go down to the video component and set the url on it.

    Code:
    this.down('video').setUrl('...')l

Thread Participants: 1

Tags for this Thread