128 } |
128 } |
129 } |
129 } |
130 |
130 |
131 IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() { |
131 IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() { |
132 if (typeof this.videoData !== "undefined" && typeof this.config.player.video === "undefined") { |
132 if (typeof this.videoData !== "undefined" && typeof this.config.player.video === "undefined") { |
133 var _media = this.videoData.currentMedia; |
133 |
134 if (typeof _media !== "undefined") { |
134 var _media; |
|
135 |
|
136 if (typeof this.videoData.mainMedia !== "undefined") { |
|
137 _media = this.videoData.getElement(this.videoData.mainMedia); |
|
138 } |
|
139 |
|
140 if (this.config.player.type === "mashup" || this.config.player.type === "mashup-html") { |
|
141 if (typeof _media === "undefined" || _media.elementType !== "mashup") { |
|
142 var _mashups = this.videoData.getMashups(); |
|
143 if (_mashups.length) { |
|
144 _media = _mashups[0]; |
|
145 } |
|
146 } |
|
147 } else { |
|
148 if (typeof _media === "undefined" || _media.elementType !== "media") { |
|
149 var _medias = this.videoData.getMedias(); |
|
150 if (_medias.length) { |
|
151 _media = _medias[0]; |
|
152 } |
|
153 } |
|
154 } |
|
155 |
|
156 this.videoData.currentMedia = _media; |
|
157 |
|
158 if (typeof _media !== "undefined" && typeof _media.video !== "undefined") { |
135 this.config.player.video = _media.video; |
159 this.config.player.video = _media.video; |
136 if (typeof _media.streamer !== "undefined") { |
160 if (typeof _media.streamer !== "undefined") { |
137 this.config.player.streamer = _media.streamer; |
161 this.config.player.streamer = _media.streamer; |
138 this.config.player.video = _media.video.replace(_media.streamer,''); |
162 this.config.player.video = _media.video.replace(_media.streamer,''); |
139 } |
163 } |