equal
deleted
inserted
replaced
45 case "jwplayer": |
45 case "jwplayer": |
46 var opts = IriSP.jQuery.extend({}, options); |
46 var opts = IriSP.jQuery.extend({}, options); |
47 delete opts.container; |
47 delete opts.container; |
48 delete opts.type; |
48 delete opts.type; |
49 |
49 |
50 if (options.provider === "rtmp") { |
50 |
|
51 /* Try to guess options.file and options.streamer only if file and streamer |
|
52 are not already defined in the configuration */ |
|
53 if (options.provider === "rtmp" && !opts.hasOwnProperty("file") && !opts.hasOwnProperty("streamer")) { |
51 /* exit if we can't access the metadata */ |
54 /* exit if we can't access the metadata */ |
52 if (typeof(IriSP.__jsonMetadata) === "undefined") { |
55 if (typeof(IriSP.__jsonMetadata) === "undefined") { |
53 break; |
56 break; |
54 }; |
57 }; |
55 |
58 |
56 |
|
57 |
|
58 // the json format is totally illogical |
59 // the json format is totally illogical |
59 //opts.streamer = IriSP.__jsonMetadata["medias"][0]["meta"]["item"]["value"]; |
60 //opts.streamer = IriSP.__jsonMetadata["medias"][0]["meta"]["item"]["value"]; |
60 //var source = IriSP.__jsonMetadata["medias"][0]["href"]; |
61 //var source = IriSP.__jsonMetadata["medias"][0]["href"]; |
61 |
62 |
62 // the source if a full url but jwplayer wants an url relative to the |
63 // the source if a full url but jwplayer wants an url relative to the |
79 opts.file += pathSplit[i]; |
80 opts.file += pathSplit[i]; |
80 /* omit the last slash if we're on the last element */ |
81 /* omit the last slash if we're on the last element */ |
81 if (i < pathSplit.length - 1) |
82 if (i < pathSplit.length - 1) |
82 opts.file += "/"; |
83 opts.file += "/"; |
83 } |
84 } |
84 } |
85 } |
85 |
|
86 } else { |
86 } else { |
87 /* other providers type, video for instance - |
87 /* other providers type, video for instance - |
88 pass everything as is */ |
88 pass everything as is */ |
89 } |
89 } |
90 |
90 |
112 pop = Popcorn.youtube("#" + containerDiv, opts.video, opts); |
112 pop = Popcorn.youtube("#" + containerDiv, opts.video, opts); |
113 break; |
113 break; |
114 |
114 |
115 case "allocine": |
115 case "allocine": |
116 /* pass the options as-is to the allocine player and let it handle everything */ |
116 /* pass the options as-is to the allocine player and let it handle everything */ |
117 pop = new PopcornReplacement.allocine("#" + containerDiv, options); |
117 pop = new IriSP.PopcornReplacement.allocine("#" + containerDiv, options); |
118 break; |
118 break; |
119 |
119 |
120 default: |
120 default: |
121 pop = undefined; |
121 pop = undefined; |
122 }; |
122 }; |