Embed: dynamically load player js only if required
This commit is contained in:
parent
43d8da036a
commit
8143d6af05
21 changed files with 532 additions and 39724 deletions
|
@ -1,6 +1,6 @@
|
|||
mistplayers.theoplayer = {
|
||||
name: 'TheoPlayer',
|
||||
version: '0.1',
|
||||
version: '0.2',
|
||||
mimes: ['html5/application/vnd.apple.mpegurl','dash/video/mp4'],
|
||||
priority: Object.keys(mistplayers).length + 1,
|
||||
isMimeSupported: function (mimetype) {
|
||||
|
@ -17,7 +17,7 @@ mistplayers.theoplayer = {
|
|||
};
|
||||
var p = mistplayers.theoplayer.player;
|
||||
p.prototype = new MistPlayer();
|
||||
p.prototype.build = function (options) {
|
||||
p.prototype.build = function (options,callback) {
|
||||
var ele = this.getElement('video');
|
||||
|
||||
ele.src = options.src;
|
||||
|
@ -40,7 +40,7 @@ p.prototype.build = function (options) {
|
|||
this.theoplayer = theoplayer(ele);
|
||||
|
||||
this.addlog('Built html');
|
||||
return ele;
|
||||
callback(ele);
|
||||
}
|
||||
p.prototype.play = function(){ return this.theoplayer.play(); };
|
||||
p.prototype.pause = function(){ return this.theoplayer.pause(); };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue