3
votes

I'm using Extjs along with PHP (no framework) in one of my projects. I've a requirement to play video on the same panel/tab without opening a new one. I can download videos by clicking on the download button or clicking on the link to video, present on the panel. But I need to play the video on the same page without affecting it's quality. (Generally using .mp4 videos).

I've not found any helpful method/feature with Extjs so far.

2

2 Answers

2
votes

I set up a website with ExtJS 4.2 and included several mp4 videos. It is pretty easy. If you want to place the video into a window, here is some code that might help you.

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();
0
votes

You should use some html5\flash video player (for example flowplayer), then render player (read player docs how to do this) to specific html element.

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"
        }
    }
});

//