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
55
embed/wrappers/silverlight.js
Normal file
55
embed/wrappers/silverlight.js
Normal file
|
@ -0,0 +1,55 @@
|
|||
mistplayers.silverlight = {
|
||||
name: 'Silverlight',
|
||||
mimes: ['silverlight'],
|
||||
priority: Object.keys(mistplayers).length + 1,
|
||||
isMimeSupported: function (mimetype) {
|
||||
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
|
||||
},
|
||||
isBrowserSupported: function (mimetype) {
|
||||
var plugin;
|
||||
try {
|
||||
// check in the mimeTypes
|
||||
plugin = navigator.plugins["Silverlight Plug-In"];
|
||||
return !!plugin;
|
||||
} catch(e){}
|
||||
try {
|
||||
// for our special friend IE
|
||||
plugin = new ActiveXObject('AgControl.AgControl');
|
||||
return true;
|
||||
} catch(e){}
|
||||
|
||||
return false;
|
||||
},
|
||||
player: function(){}
|
||||
};
|
||||
var p = mistplayers.silverlight.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('data','data:application/x-silverlight,');
|
||||
ele.setAttribute('type','application/x-silverlight');
|
||||
ele.setAttribute('width',options.width);
|
||||
ele.setAttribute('height',options.height);
|
||||
ele.appendChild(createParam('source',encodeURI(options.src)+'/player.xap'));
|
||||
ele.appendChild(createParam('initparams','autoload=false,'+(options.autoplay ? 'autoplay=true' : 'autoplay=false')+',displaytimecode=false,enablecaptions=true,joinLive=true,muted=false'));
|
||||
|
||||
var a = document.createElement('a');
|
||||
ele.appendChild(a);
|
||||
a.setAttribute('href','http://go.microsoft.com/fwlink/?LinkID=124807');
|
||||
a.setAttribute('style','text-decoration: none;');
|
||||
var img = document.createElement('img');
|
||||
a.appendChild(img);
|
||||
img.setAttribute('src','http://go.microsoft.com/fwlink/?LinkId=108181');
|
||||
img.setAttribute('alt','Get Microsoft Silverlight');
|
||||
img.setAttribute('style','border-style: none;')
|
||||
|
||||
this.addlog('Built html');
|
||||
return ele;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue