For modern toolkit: https://docs.sencha.com/extjs/7.3.1/modern/Ext.Video.html
Ext.create({
xtype: 'panel',
renderTo: Ext.getBody(),
width: 800,
height: 600,
shadow: true,
scrollable: true,
title: 'My Video Panel',
layout: 'hbox',
items: [{
xtype: 'video',
onVideoplayerid0Play: function (media, eOpts) {
var video = Ext.get(media.id).select('video:first-of-type ', true).elements[0];
if (video.style.display == 'none') {
video.style.display = '';
}
},
url: 'https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4',
listeners: {
painted: function (video) {
video.play();
},
play: function(video) {
// BUG fix. on auto play the black display is not disappeared.
document.getElementsByClassName('x-video-ghost')[0].style.display = 'none';
}
}
}]
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…