r51611 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51610‎ | r51611 | r51612 >
Date:22:05, 8 June 2009
Author:dale
Status:deferred
Tags:
Comment:
skip temporal url for timed text query if timed url not provided in src
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/mv_embed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -320,7 +320,7 @@
321321 }
322322 }
323323 //set up the target invocation:
324 - if($j(this.target_invocation).length==0){
 324+ if( $j(this.target_invocation).length==0 ){
325325 js_error("RemoteSearchDriver:: no target invocation provided")
326326 }else{
327327 $j(this.target_invocation).css('cursor','pointer').attr('title', gM('add_media_wizard')).click(function(){
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js
@@ -468,7 +468,7 @@
469469 //should probably be based on if we have a provider api url
470470 if( typeof wgEnableWriteAPI != 'undefined'){
471471 $j( $j.btnHtml('edit', 'editBtn_'+this.id, 'pencil',
472 - {'style':'float:right;font-size:x-small;height:10px;margin-bottom:0;padding-bottom:7px;padding-top:0;'} )
 472+ {'style':'position:absolute;right:0;;font-size:x-small;height:10px;margin-bottom:0;padding-bottom:7px;padding-top:0;'} )
473473 ).click(function(){
474474 _this.doEditor();
475475 }).appendTo('#ptitle_'+this.id);
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js
@@ -581,13 +581,10 @@
582582 });
583583 }else{
584584 doEnableCrop();
585 - }
586 -
 585+ }
587586 }
588587 }
589588
590 -
591 -
592589 // mv_lock_vid_updates defined in mv_stream.js (we need to do some more refactoring )
593590 if(typeof mv_lock_vid_updates == 'undefined')
594591 mv_lock_vid_updates= false;
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css
@@ -79,8 +79,7 @@
8080
8181 .videoPlayer
8282 {
83 - color: #474747;
84 - background: white;
 83+ color: #474747;
8584 }
8685
8786 .videoPlayer a:link {color: #2060c1; text-decoration: underline;}
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -498,9 +498,9 @@
499499 '$j.cookie'
500500 ];
501501 var secReq = new Array();
502 - //IE loads things out of order running j.slider before j.ui is ready
 502+ //IE & safari appear to load things out of order running j.slider before j.ui is ready
503503 //load ui depenent scripts in a second request:
504 - if($j.browser.msie){
 504+ if($j.browser.msie || $j.browser.safari){
505505 secReq.push( '$j.ui.slider' );
506506 //ie6 yay!
507507 if($j.browser.version <= 6){
@@ -737,20 +737,31 @@
738738 loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css');
739739 loadExternalCss( mv_embed_path+'skins/'+mv_skin_name+'/mv_sequence.css');
740740 //make sure we have the required mv_embed libs (they are not loaded when no video element is on the page)
741 - mvJsLoader.embedVideoCheck(function(){
742 - //load playlist object and drag,drop,resize,hoverintent,libs
743 - mvJsLoader.doLoad([
 741+ mvJsLoader.embedVideoCheck(function(){
 742+ var firstLoadSet =[
744743 'mvPlayList',
745 - '$j.ui',
 744+ '$j.ui',
 745+ '$j.contextMenu',
 746+ 'mvSequencer'
 747+ ];
 748+ var secondLoadSet =[];
 749+ var uiDepLibs = ['$j.ui.dialog',
746750 '$j.ui.droppable',
747 - '$j.ui.draggable',
 751+ '$j.ui.draggable',
748752 '$j.ui.sortable',
749753 '$j.ui.resizable',
750754 '$j.ui.slider',
751 - '$j.ui.tabs',
752 - '$j.contextMenu',
753 - 'mvSequencer'
754 - ],function(){
 755+ '$j.ui.tabs'];
 756+ if($j.browser.msie || $j.browser.safari){
 757+ for(var i=0;i<uiDepLibs.length;i++)
 758+ secondLoadSet.push( uiDepLibs[i]);
 759+ }else{
 760+ for(var i=0;i<uiDepLibs.length;i++)
 761+ firstLoadSet.push( uiDepLibs[i]);
 762+ }
 763+ //load playlist object and drag,drop,resize,hoverintent,libs
 764+ mvJsLoader.doLoad(firstLoadSet,function(){
 765+ mvJsLoader.doLoad(secondLoadSet,function(){
755766 js_log('calling new mvSequencer');
756767 //init the sequence object (it will take over from there) no more than one mvSeq obj for now:
757768 if(!_global['mvSeq']){
@@ -758,6 +769,7 @@
759770 }else{
760771 js_log('mvSeq already init');
761772 }
 773+ });
762774 });
763775 });
764776 }
@@ -785,7 +797,7 @@
786798 //IE* ~sometimes~ executes things out of order on DOM inserted scripts
787799 //*(kind of pointless anyway since IE does not support firefogg
788800 // but if you want firefog to drive the "is not supported" msg here you go ;)
789 - if($.browser.msie){
 801+ if($.browser.msie || $j.browser.safari){
790802 secondLoadSet = [
791803 '$j.ui.progressbar',
792804 '$j.ui.dialog'
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -2223,7 +2223,7 @@
22242224 if (window.document[this.pid]){
22252225 return window.document[this.pid];
22262226 }
2227 - if (embedTypes.msie){
 2227+ if ($j.browser.msie){
22282228 return document.getElementById(this.pid );
22292229 }else{
22302230 if (document.embeds && document.embeds[this.pid])
@@ -2658,7 +2658,7 @@
26592659 || typeof HTMLVideoElement == 'function' ) // Opera
26602660 {
26612661 //do another test for safari:
2662 - if( this.safari ){
 2662+ if( $j.browser.safari ){
26632663 try{
26642664 var dummyvid = document.createElement("video");
26652665 if (dummyvid.canPlayType && dummyvid.canPlayType("video/ogg;codecs=\"theora,vorbis\"") == "probably")
Index: branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
@@ -376,6 +376,16 @@
377377 //:: Load transcript range ::
378378
379379 var pcurl = parseUri( _this.getSRC() );
 380+ //check for urls without time keys:
 381+ if( typeof pcurl.queryKey['t'] == 'undefined'){
 382+ //in which case just get the full time req:
 383+ do_request( this.getSRC(), function(data){
 384+ _this.doParse( data );
 385+ _this.loaded=true;
 386+ callback();
 387+ });
 388+ return ;
 389+ }
380390 var req_time = pcurl.queryKey['t'].split('/');
381391 req_time[0]=npt2seconds(req_time[0]);
382392 req_time[1]=npt2seconds(req_time[1]);
@@ -384,7 +394,7 @@
385395 req_time[1] = req_time[0]+_this.request_length;
386396 }
387397 //set up request url:
388 - url = pcurl.protocol+'://'+pcurl.authority+pcurl.path+'?';
 398+ url = pcurl.protocol + '://' + pcurl.authority + pcurl.path +'?';
389399 $j.each(pcurl.queryKey, function(key, val){
390400 if( key != 't'){
391401 url+=key+'='+val+'&';

Status & tagging log