Meta player, new embed code, new LSP style
This commit is contained in:
parent
5501c67b49
commit
d4be01474d
50 changed files with 6288 additions and 970 deletions
39
embed/wrappers/jwplayer.js
Normal file
39
embed/wrappers/jwplayer.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
mistplayers.jwplayer = {
|
||||
name: 'JWPlayer',
|
||||
mimes: ['html5/video/mp4','html5/video/webm','dash/video/mp4','flash/10','flash/7','html5/application/vnd.apple.mpegurl','html5/audio/mp3','html5/audio/aac'],
|
||||
priority: Object.keys(mistplayers).length + 1,
|
||||
isMimeSupported: function (mimetype) {
|
||||
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
|
||||
},
|
||||
isBrowserSupported: function (mimetype) {
|
||||
//TODO like, actually check the browser or something?
|
||||
if (typeof jwplayer == 'function') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
player: function(){}
|
||||
};
|
||||
var p = mistplayers.jwplayer.player;
|
||||
p.prototype = new MistPlayer();
|
||||
p.prototype.build = function (options) {
|
||||
var ele = this.element('div');
|
||||
|
||||
this.jw = jwplayer(ele).setup({
|
||||
file: options.src,
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
autostart: options.autoplay,
|
||||
image: options.poster,
|
||||
controls: options.controls
|
||||
});
|
||||
|
||||
this.addlog('Built html');
|
||||
return ele;
|
||||
}
|
||||
p.prototype.play = function(){ return this.jw.play(); };
|
||||
p.prototype.pause = function(){ return this.jw.pause(); };
|
||||
p.prototype.volume = function(level){
|
||||
if (typeof level == 'undefined' ) { return this.jw.getVolume/100; }
|
||||
return this.jw.setVolume(level*100);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue