2013-07-01 171 views
3

我在其中一個項目中使用了Extjs和PHP(無框架)。我有要求在同一面板/選項卡上播放視頻而無需打開新視頻。我可以點擊下載按鈕或點擊面板上的視頻鏈接下載視頻。但是我需要在同一頁面上播放視頻而不影響其質量。 (通常使用.mp4視頻)。在Extjs中播放視頻

到目前爲止我還沒有找到任何有用的方法/功能與Extjs。

回答

0

你應該使用一些HTML5 \ Flash視頻播放器(例如flowplayer),然後渲染播放器(讀播放器的文檔如何做到這一點),以特定的html元素。

container.add({ 
    xtype: "panel", 
    html: '<div id="place-for-video"></div>', 
    listeners: { 
     show: function() { 
      // Create your player instance and render him to html element with id "place-for-video" 
     } 
    } 
}); 

//

1

我成立了一個網站,ExtJS的4.2和包括幾個MP4視頻。這很容易。如果你想把視頻放到一個窗口中,這裏有一些代碼可以幫助你。

window = Ext.widget('window',{ 
      x:5, 
      y:5, 
      renderTo: Ext.getBody(), 
      width: 410, 
      height: 265, 
      html: '<video width="400" controls><source src="test.mp4" type="video/mp4"><source src="test.ogg" type="video/ogg"></video>' 
    }).show();