equal
deleted
inserted
replaced
128 } |
128 } |
129 } |
129 } |
130 |
130 |
131 IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() { |
131 IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() { |
132 |
132 |
133 /* Getting video URL from metadata if it's not in the player config options */ |
133 /* Setting default media from metadata */ |
134 |
134 |
135 if (typeof this.videoData !== "undefined" && typeof this.config.player.video === "undefined") { |
135 if (typeof this.videoData !== "undefined") { |
136 |
136 |
137 var _media; |
137 var _media; |
138 |
138 |
139 if (typeof this.videoData.mainMedia !== "undefined") { |
139 if (typeof this.videoData.mainMedia !== "undefined") { |
140 _media = this.videoData.getElement(this.videoData.mainMedia); |
140 _media = this.videoData.getElement(this.videoData.mainMedia); |
156 } |
156 } |
157 } |
157 } |
158 |
158 |
159 this.videoData.currentMedia = _media; |
159 this.videoData.currentMedia = _media; |
160 |
160 |
161 if (typeof _media !== "undefined" && typeof _media.video !== "undefined") { |
161 /* Getting video URL from metadata if it's not in the player config options */ |
|
162 |
|
163 if (typeof _media !== "undefined" && typeof _media.video !== "undefined" && typeof this.config.player.video === "undefined") { |
162 this.config.player.video = _media.video; |
164 this.config.player.video = _media.video; |
163 if (typeof _media.streamer !== "undefined") { |
165 if (typeof this.config.player.streamer == "undefined" && typeof _media.streamer !== "undefined") { |
164 this.config.player.streamer = _media.streamer; |
166 this.config.player.streamer = _media.streamer; |
165 this.config.player.video = _media.video.replace(_media.streamer,''); |
|
166 } |
167 } |
167 } |
168 } |
168 |
169 |
169 } |
170 } |
170 |
171 |
233 |
234 |
234 case "jwplayer": |
235 case "jwplayer": |
235 var opts = IriSP.jQuery.extend({}, this.config.player); |
236 var opts = IriSP.jQuery.extend({}, this.config.player); |
236 delete opts.container; |
237 delete opts.container; |
237 delete opts.type; |
238 delete opts.type; |
|
239 if (typeof opts.streamer !== "undefined") { |
|
240 opts.video = opts.video.replace(opts.streamer,""); |
|
241 } |
238 opts.file = opts.video; |
242 opts.file = opts.video; |
239 delete opts.video; |
243 delete opts.video; |
|
244 delete opts.metadata; |
240 |
245 |
241 if(!opts.hasOwnProperty("flashplayer")) { |
246 if(!opts.hasOwnProperty("flashplayer")) { |
242 opts.flashplayer = IriSP.getLib("jwPlayerSWF"); |
247 opts.flashplayer = IriSP.getLib("jwPlayerSWF"); |
243 } |
248 } |
244 |
249 |