So, I have a video that I'm launching in a floating modal overlay, however when you close the pane the video keeps playing in the background.
I'm not sure whether I need to capture the tap that closes the overlay and create a listener that destroys the pane or if there's an easier way with bubbleEvents
I'm currently declaring the video itself in the overlay function so that once it's destroyed a new version can be created anytime I want, however it might also work to have the video declared outside of the function and simply pause the video when the user closes it. Still I have the same issue with knowing when the overlay is closed.PHP Code:
var videoButton = Ext.get('videoButton');
videoButton.addListener(
'tap',
function(){
var vid = new Ext.Panel({
floating: true,
modal: true,
centered: true,
items: [
{
xtype : 'video',
width : 440,
height : 250,
url : 'movies/test.mov'
}
],
cls: 'overlay'
});
vid.setCentered(true);
vid.show();
}
);
Any help is appreciated. Thanks.