Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -320,14 +320,18 @@ |
321 | 321 | js_log(" should update: " + _this.target_input_file_name + ' to: ' + _this.fogg.sourceFilename ); |
322 | 322 | $j(_this.target_input_file_name).val(_this.fogg.sourceFilename).show(); |
323 | 323 | |
324 | | - if(_this.new_source_cb){ |
325 | | - var oggExt = (_this.isSourceAudio())?'oga':'ogg'; |
326 | | - oggExt = (_this.isSourceVideo())?'ogv':oggExt; |
327 | | - oggExt = (_this.isUnknown())?'ogg':oggExt; |
328 | | - oggName = _this.fogg.sourceFilename.substr(0, |
329 | | - _this.fogg.sourceFilename.lastIndexOf('.')); |
330 | | - |
331 | | - _this.new_source_cb( _this.fogg.sourceFilename , oggName +'.'+ oggExt); |
| 324 | + if(_this.new_source_cb){ |
| 325 | + if(_this.encoder_settings['passthrough']){ |
| 326 | + var fName = _this.fogg.sourceFilename |
| 327 | + }else{ |
| 328 | + var oggExt = (_this.isSourceAudio())?'oga':'ogg'; |
| 329 | + oggExt = (_this.isSourceVideo())?'ogv':oggExt; |
| 330 | + oggExt = (_this.isUnknown())?'ogg':oggExt; |
| 331 | + oggName = _this.fogg.sourceFilename.substr(0, |
| 332 | + _this.fogg.sourceFilename.lastIndexOf('.')); |
| 333 | + var fName = oggName +'.'+ oggExt |
| 334 | + } |
| 335 | + _this.new_source_cb( _this.fogg.sourceFilename , fName); |
332 | 336 | } |
333 | 337 | } |
334 | 338 | }else{ |
— | — | @@ -354,8 +358,8 @@ |
355 | 359 | ext = sf.substring( sf.lastIndexOf('.')+1 ).toLowerCase(); |
356 | 360 | } |
357 | 361 | |
358 | | - //set to passthrough by default (images, arbitrary files that we want to send with http chunks) |
359 | | - this.encoder_settings['passthrough'] = false; |
| 362 | + //set to passthrough to true by default (images, arbitrary files that we want to send with http chunks) |
| 363 | + this.encoder_settings['passthrough'] = true; |
360 | 364 | |
361 | 365 | //see if we have video or audio: |
362 | 366 | if( _this.isSourceAudio() || _this.isSourceVideo() ){ |
— | — | @@ -420,7 +424,7 @@ |
421 | 425 | if( sf.lastIndexOf('.') != -1){ |
422 | 426 | ext = sf.substring( sf.lastIndexOf('.') ).toLowerCase(); |
423 | 427 | } |
424 | | - if(!_this.passthrough && $j.inArray(ext.substr(1), _this.ogg_extensions) == -1 ){ |
| 428 | + if(!_this.encoder_settings['passthrough'] && $j.inArray(ext.substr(1), _this.ogg_extensions) == -1 ){ |
425 | 429 | var extreg = new RegExp(ext + '$', 'i'); |
426 | 430 | _this.formData['wpDestFile'] = sf.replace(extreg, '.ogg'); |
427 | 431 | } |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -60,8 +60,7 @@ |
61 | 61 | 'cFileNS':'File', //what is the cannonical namespace for images |
62 | 62 | //@@todo (should get that from the api or inpage vars) |
63 | 63 | |
64 | | - 'enable_upload_tab':true, // if we want to enable an uploads tab: |
65 | | - |
| 64 | + 'enable_upload_tab':true // if we want to enable an uploads tab: |
66 | 65 | } |
67 | 66 | if(typeof wgServer == 'undefined') |
68 | 67 | wgServer = ''; |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js |
— | — | @@ -189,6 +189,10 @@ |
190 | 190 | } |
191 | 191 | } |
192 | 192 | }, |
| 193 | + doNativeWarningCheck:function(){ |
| 194 | + var clip = this.default_track.clips[0]; |
| 195 | + return clip.embed.doNativeWarningCheck(); |
| 196 | + }, |
193 | 197 | doWhenParseDone:function(){ |
194 | 198 | js_log('f:doWhenParseDone'); |
195 | 199 | //do additional init for clips: |
— | — | @@ -1212,8 +1216,7 @@ |
1213 | 1217 | //string -> boolean: |
1214 | 1218 | if(this[method]=="false")this[method]=false; |
1215 | 1219 | if(this[method]=="true")this[method]=true; |
1216 | | - } |
1217 | | - debugger; |
| 1220 | + } |
1218 | 1221 | }, |
1219 | 1222 | onClipDone:function(){ |
1220 | 1223 | js_log('pl onClipDone (should go to next)'); |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/htmlEmbed.js |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | library:"html" |
72 | 72 | }, |
73 | 73 | selected_source:{ |
74 | | - URLTimeEncoding:false, |
| 74 | + URLTimeEncoding:false |
75 | 75 | }, |
76 | 76 | timedTextSources:function(){ |
77 | 77 | return false; |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis", |
42 | 42 | "mv_generic_missing_plugin" : "You browser does not appear to support playback type: <b>$1</b><br> visit the <a href=\"http://commons.wikimedia.org/wiki/Commons:Media_help\">Playback Methods</a> page to download a player<br>", |
43 | 43 | |
44 | | - "mv_for_best_experience": "For best video playback experience we recomend <a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed\">Firefox 3.5</a>", |
| 44 | + "mv_for_best_experience": "For best video playback experience we recomend <b><a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed\">Firefox 3.5</a></b>", |
45 | 45 | "mv_do_not_warn_again": "Do not warn me again." |
46 | 46 | |
47 | 47 | }); |
— | — | @@ -325,10 +325,10 @@ |
326 | 326 | $j('#' + embedObj.id).get(0).play(); |
327 | 327 | }); |
328 | 328 | |
329 | | - //add recomend firefox if non-native playback: |
330 | | - if( embedObj.doNativeWarningCheck() ){ |
| 329 | + //add recomend firefox if non-native playback: |
| 330 | + if( embedObj.doNativeWarningCheck() ){ |
331 | 331 | $j('#dc_'+ embedObj.id).hover( |
332 | | - function(){ |
| 332 | + function(){ |
333 | 333 | if($j('#gnp_' + embedObj.id).length==0){ |
334 | 334 | $j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all" ' + |
335 | 335 | 'style="position:absolute;display:none;background:#FFF;top:10px;left:10px;right:10px;height:60px;">' + |
— | — | @@ -1277,14 +1277,16 @@ |
1278 | 1278 | } |
1279 | 1279 | } |
1280 | 1280 | //see if we are using a fallback (in which case it does not matter) |
1281 | | - var playable_sources = this.media_element.getPlayableSources(); |
1282 | | - for(var source=0; source <playable_sources.length; source++){ |
1283 | | - var mime_type = playable_sources[source].mime_type; |
1284 | | - if( mime_type=='video/h264' || mime_type=='video/x-flv'){ |
1285 | | - //they have flash / h.264 fallback no need to push firefox :( |
1286 | | - return false; |
1287 | | - } |
1288 | | - } |
| 1281 | + if(this.media_element && this.media_element.sources){ |
| 1282 | + var playable_sources = this.media_element.getPlayableSources(); |
| 1283 | + for(var sInx=0; sInx < playable_sources.length; sInx++){ |
| 1284 | + var mime_type = playable_sources[sInx].mime_type; |
| 1285 | + if( mime_type=='video/h264' || mime_type=='video/x-flv'){ |
| 1286 | + //they have flash / h.264 fallback no need to push firefox :( |
| 1287 | + return false; |
| 1288 | + } |
| 1289 | + } |
| 1290 | + } |
1289 | 1291 | } |
1290 | 1292 | return true; |
1291 | 1293 | }, |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/nativeEmbed.js |
— | — | @@ -228,12 +228,12 @@ |
229 | 229 | updateVolumen:function(perc){ |
230 | 230 | this.getVID(); |
231 | 231 | if(this.vid) |
232 | | - this.vid.volume(perc); |
| 232 | + this.vid.volume = perc; |
233 | 233 | }, |
234 | 234 | getVolumen:function(){ |
235 | 235 | this.getVID(); |
236 | 236 | if(this.vid) |
237 | | - return this.vid.volume(); |
| 237 | + return this.vid.volume; |
238 | 238 | }, |
239 | 239 | load:function(){ |
240 | 240 | this.getVID(); |