-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathSilverlight.js
More file actions
32 lines (26 loc) · 789 Bytes
/
Silverlight.js
File metadata and controls
32 lines (26 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
addKiller("Silverlight", {
"canKill": function(data) {
if(data.type !== "application/x-silverlight-2") return false;
var match = /(?:^|,)\s*(m|fileurl|mediaurl|link)=/.exec(data.params.initparams);
if(match) {data.file = match[1]; return true;}
return false;
},
"process": function(data, callback) {
var SLvars = parseSLVariables(data.params.initparams);
var mediaURL = decodeURIComponent(SLvars[data.file]);
var info = extInfo(getExt(mediaURL));
var audioOnly = false;
var sources = [];
if(info) {
info.url = mediaURL;
sources.push(info);
audioOnly = info.isAudio;
}
var posterURL;
if(SLvars.thumbnail) posterURL = decodeURIComponent(SLvars.thumbnail);
callback({
"playlist": [{"poster": posterURL, "sources": sources}],
"audioOnly": audioOnly
});
}
});