Embed: dynamically load player js only if required

This commit is contained in:
Cat 2017-03-20 10:45:01 +01:00 committed by Thulinma
parent 43d8da036a
commit 8143d6af05
21 changed files with 532 additions and 39724 deletions

View file

@ -1,6 +1,6 @@
mistplayers.img = {
name: 'HTML img tag',
version: '1.0',
version: '1.1',
mimes: ['html5/image/jpeg'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -15,9 +15,9 @@ mistplayers.img = {
};
var p = mistplayers.img.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
var ele = this.getElement('img');
ele.src = options.src;
ele.style.display = 'block';
return ele;
callback(ele);
}