equal
deleted
inserted
replaced
25 return 'A Metadataplayer in DIV #' + this.config.gui.container; |
25 return 'A Metadataplayer in DIV #' + this.config.gui.container; |
26 } |
26 } |
27 |
27 |
28 IriSP.Metadataplayer.prototype.loadLibs = function() { |
28 IriSP.Metadataplayer.prototype.loadLibs = function() { |
29 |
29 |
30 var $L = $LAB.script(IriSP.getLib("underscore")).script(IriSP.getLib("Mustache")).script(IriSP.getLib("jQuery")).script(IriSP.getLib("swfObject")).wait().script(IriSP.getLib("jQueryUI")); |
30 var $L = $LAB |
31 |
31 .script(IriSP.getLib("underscore")) |
32 if(this.config.player.type === "jwplayer" || this.config.player.type === "allocine" || this.config.player.type === "dailymotion") { |
32 .script(IriSP.getLib("Mustache")) |
33 // load our popcorn.js lookalike |
33 .script(IriSP.getLib("jQuery")) |
|
34 .script(IriSP.getLib("swfObject")) |
|
35 .wait() |
|
36 .script(IriSP.getLib("jQueryUI")); |
|
37 |
|
38 if (this.config.player.type === "jwplayer" || this.config.player.type === "auto") { |
34 $L.script(IriSP.getLib("jwplayer")); |
39 $L.script(IriSP.getLib("jwplayer")); |
35 } else { |
40 } |
36 // load the real popcorn |
41 |
|
42 if (this.config.player.type !== "jwplayer" && this.config.player.type !== "allocine" && this.config.player.type !== "dailymotion") { |
37 $L.script(IriSP.getLib("popcorn")); |
43 $L.script(IriSP.getLib("popcorn")); |
38 } |
44 } |
39 |
45 |
40 /* widget specific requirements */ |
46 /* widget specific requirements */ |
41 for(var _i = 0; _i < this.config.gui.widgets.length; _i++) { |
47 for(var _i = 0; _i < this.config.gui.widgets.length; _i++) { |
140 |
146 |
141 IriSP.Metadataplayer.prototype.configurePopcorn = function() { |
147 IriSP.Metadataplayer.prototype.configurePopcorn = function() { |
142 var pop, |
148 var pop, |
143 ret = this.layoutDivs("video"), |
149 ret = this.layoutDivs("video"), |
144 containerDiv = ret[0], |
150 containerDiv = ret[0], |
145 spacerDiv = ret[1]; |
151 spacerDiv = ret[1], |
|
152 _this = this, |
|
153 _types = { |
|
154 "html5" : /\.(ogv|webm|mp4)$/, |
|
155 "youtube" : /^(https?:\/\/)?(www\.)?youtube\.com/, |
|
156 "dailymotion" : /^(https?:\/\/)?(www\.)?dailymotion\.com/ |
|
157 }; |
|
158 |
|
159 if (this.config.player.type === "auto") { |
|
160 this.config.player.type = "jwplayer"; |
|
161 IriSP._(_types).each(function(_v, _k) { |
|
162 if (_v.test(_this.config.player.video)) { |
|
163 _this.config.player.type = _k |
|
164 } |
|
165 }); |
|
166 } |
146 |
167 |
147 switch(this.config.player.type) { |
168 switch(this.config.player.type) { |
148 /* |
169 /* |
149 todo : dynamically create the div/video tag which |
170 todo : dynamically create the div/video tag which |
150 will contain the video. |
171 will contain the video. |