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
62
embed/wrappers/flash_strobe.js
Normal file
62
embed/wrappers/flash_strobe.js
Normal file
|
@ -0,0 +1,62 @@
|
|||
mistplayers.flash_strobe = {
|
||||
name: 'Strobe Flash Media Playback',
|
||||
mimes: ['flash/11','flash/10','flash/7'],
|
||||
priority: Object.keys(mistplayers).length + 1,
|
||||
isMimeSupported: function (mimetype) {
|
||||
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
|
||||
},
|
||||
isBrowserSupported: function (mimetype) {
|
||||
var version = 0;
|
||||
try {
|
||||
// check in the mimeTypes
|
||||
version = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin.description.replace(/([^0-9\.])/g, '').split('.')[0];
|
||||
} catch(e){}
|
||||
try {
|
||||
// for our special friend IE
|
||||
version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable("$version").replace(/([^0-9\,])/g, '').split(',')[0];
|
||||
} catch(e){}
|
||||
|
||||
var mimesplit = mimetype.split('/');
|
||||
|
||||
return Number(version) >= Number(mimesplit[mimesplit.length-1]);
|
||||
},
|
||||
player: function(){}
|
||||
};
|
||||
var p = mistplayers.flash_strobe.player;
|
||||
p.prototype = new MistPlayer();
|
||||
p.prototype.build = function (options) {
|
||||
function createParam(name,value) {
|
||||
var p = document.createElement('param');
|
||||
p.setAttribute('name',name);
|
||||
p.setAttribute('value',value);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
var ele = this.element('object');
|
||||
|
||||
ele.setAttribute('width',options.width);
|
||||
ele.setAttribute('height',options.height);
|
||||
|
||||
ele.appendChild(createParam('movie',options.source.player_url));
|
||||
var flashvars = 'src='+encodeURIComponent(options.src)+'&controlBarMode='+(options.controls ? 'floating' : 'none')+'&initialBufferTime=0.5&expandedBufferTime=5&minContinuousPlaybackTime=3'+(options.live ? '&streamType=live' : '')+(options.autoplay ? '&autoPlay=true' : '' );
|
||||
ele.appendChild(createParam('flashvars',flashvars));
|
||||
ele.appendChild(createParam('allowFullScreen','true'));
|
||||
ele.appendChild(createParam('wmode','direct'));
|
||||
if (options.autoplay) {
|
||||
ele.appendChild(createParam('autoPlay','true'));
|
||||
}
|
||||
|
||||
var e = document.createElement('embed');
|
||||
ele.appendChild(e);
|
||||
e.setAttribute('src',options.source.player_url);
|
||||
e.setAttribute('type','application/x-shockwave-flash');
|
||||
e.setAttribute('allowfullscreen','true');
|
||||
e.setAttribute('width',options.width);
|
||||
e.setAttribute('height',options.height);
|
||||
e.setAttribute('flashvars',flashvars);
|
||||
|
||||
|
||||
this.addlog('Built html');
|
||||
return ele;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue