Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js |
— | — | @@ -170,8 +170,8 @@ |
171 | 171 | 'type' : 'select', |
172 | 172 | 'selectVal' : [{'22050':'22 kHz'}, {'44100':'44 khz'}, {'48000':'48 khz'}], |
173 | 173 | 'formatSelect' : function(val){ |
174 | | - return (Math.round(val/100)*10) + ' Hz'; |
175 | | - }, |
| 174 | + return (Math.round(val/100)*10) + ' Hz'; |
| 175 | + }, |
176 | 176 | 'help' : "set output samplerate (in Hz)." |
177 | 177 | }, |
178 | 178 | 'noaudio':{ |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js |
— | — | @@ -456,6 +456,7 @@ |
457 | 457 | this.doSmilActions( single_line = true ); |
458 | 458 | }, |
459 | 459 | updateBaseStatus:function(){ |
| 460 | + var _this = this; |
460 | 461 | js_log('f:updateBaseStatus'); |
461 | 462 | $j('#ptitle_'+this.id).html(''+ |
462 | 463 | '<b>' + this.title + '</b> '+ |
— | — | @@ -465,11 +466,13 @@ |
466 | 467 | //only show the inline edit button if mediaWiki write API is enabled: |
467 | 468 | |
468 | 469 | //should probably be based on if we have a provider api url |
469 | | - if( typeof wgEnableWriteAPI != 'undefined'){ |
470 | | - $j('#ptitle_'+this.id).append( |
471 | | - $j.btnHtml('edit', 'edit_'+this.id, 'pencil', {'style':'float:right;font-size:x-small;height:15px;'} ) |
472 | | - ); |
473 | | - //do binding: |
| 470 | + if( typeof wgEnableWriteAPI != 'undefined'){ |
| 471 | + $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;'} ) |
| 473 | + ).click(function(){ |
| 474 | + _this.doEditor(); |
| 475 | + }).appendTo('#ptitle_'+this.id); |
| 476 | + $j('.editBtn_'+this.id).btnBind(); |
474 | 477 | } |
475 | 478 | //render out the dividers on the timeline: |
476 | 479 | this.colorPlayHead(); |
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -85,45 +85,8 @@ |
86 | 86 | //all default msg in [English] should be overwritten by the CMS language msg system. |
87 | 87 | loadGM({ |
88 | 88 | "loading_txt":"loading <blink>...</blink>", |
89 | | - "loading_title" : "Loading...", |
90 | | - |
91 | | - "loading_plugin" : "loading plugin<blink>...</blink>", |
92 | | - |
93 | | - "select_playback" : "Set Playback Preference", |
94 | | - "link_back" : "Link Back", |
95 | | - "error_load_lib" : "mv_embed: Unable to load required javascript libraries\n insert script via DOM has failed, try reloading? ", |
96 | | - |
97 | | - "error_swap_vid" : "Error:mv_embed was unable to swap the video tag for the mv_embed interface", |
| 89 | + "loading_title" : "Loading...", |
98 | 90 | |
99 | | - "download_segment" : "Download Selection:", |
100 | | - "download_full" : "Download Full Video File:", |
101 | | - "download_right_click": "To download right click and select <i>save target as</i>", |
102 | | - "download_clip" : "Download the Clip", |
103 | | - "download_text" : "Download Text (<a style=\"color:white\" title=\"cmml\" href=\"http://wiki.xiph.org/index.php/CMML\">cmml</a> xml):", |
104 | | - |
105 | | - "clip_linkback" : "Clip Source Page", |
106 | | - |
107 | | - "mv_ogg-player-vlc-mozilla" : "VLC Plugin", |
108 | | - "mv_ogg-player-videoElement" : "Native Ogg Video Support", |
109 | | - "mv_ogg-player-vlc-activex" : "VLC ActiveX", |
110 | | - "mv_ogg-player-oggPlugin" : "Generic Ogg Plugin", |
111 | | - "mv_ogg-player-quicktime-mozilla" : "Quicktime Plugin", |
112 | | - "mv_ogg-player-quicktime-activex" : "Quicktime ActiveX", |
113 | | - "mv_ogg-player-cortado" : "Java Cortado", |
114 | | - "mv_ogg-player-flowplayer" : "Flowplayer", |
115 | | - "mv_ogg-player-selected" : " (selected)", |
116 | | - "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis", |
117 | | - "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>", |
118 | | - |
119 | | - "add_to_end_of_sequence" : "Add to End of Sequence", |
120 | | - |
121 | | - "missing_video_stream" : "The video file for this stream is missing", |
122 | | - |
123 | | - "next_clip_msg" : "Play Next Clip", |
124 | | - "prev_clip_msg" : "Play Previous Clip", |
125 | | - "current_clip_msg" : "Continue Playing this Clip", |
126 | | - "seek_to" : "Seek to", |
127 | | - |
128 | 91 | "size-gigabytes" : "$1 GB", |
129 | 92 | "size-megabytes" : "$1 MB", |
130 | 93 | "size-kilobytes" : "$1 K", |
— | — | @@ -142,8 +105,8 @@ |
143 | 106 | ms = gMsg[ key ]; |
144 | 107 | if(typeof args == 'object' || typeof args == 'array'){ |
145 | 108 | for(var v in args){ |
146 | | - var rep = '\$'+ ( parseInt(v) + 1 ); |
147 | | - //msg test replace arguments start at 1 insted of zero: |
| 109 | + //msg test replace arguments start at 1 insted of zero: |
| 110 | + var rep = '\$'+ ( parseInt(v) + 1 ); |
148 | 111 | ms = ms.replace( rep, args[v]); |
149 | 112 | } |
150 | 113 | }else if(typeof args =='string' || typeof args =='number'){ |
— | — | @@ -268,7 +231,7 @@ |
269 | 232 | } |
270 | 233 | } |
271 | 234 | if( all_libs_loaded ){ |
272 | | - js_log('all libs already loaded skipping...' + libs); |
| 235 | + js_log('all libs already loaded skipping...' + libs); |
273 | 236 | callback(); |
274 | 237 | return ; |
275 | 238 | } |
— | — | @@ -285,7 +248,13 @@ |
286 | 249 | coma=','; |
287 | 250 | } |
288 | 251 | } |
289 | | - var dbug_attr = (parseUri( getMvEmbedURL() ).queryKey['debug'])?'&debug=true':''; |
| 252 | + var puri = parseUri( getMvEmbedURL() ); |
| 253 | + |
| 254 | + if(puri.host != parseUri( document.URL).host){ |
| 255 | + mwSlScript = puri.protocol + '://' + puri.authority + mwSlScript; |
| 256 | + } |
| 257 | + |
| 258 | + var dbug_attr = (puri.queryKey['debug'])?'&debug=true':''; |
290 | 259 | this.libs[ last_class ] = mwSlScript + '?class=' + class_set + |
291 | 260 | '&urid=' + getMvUniqueReqId() + dbug_attr; |
292 | 261 | |
— | — | @@ -987,7 +956,7 @@ |
988 | 957 | } |
989 | 958 | //load external js via dom injection |
990 | 959 | function loadExternalJs( url ){ |
991 | | - js_log('load js: '+ url); |
| 960 | + js_log('load js: '+ url); |
992 | 961 | //if(window['$j']) //use jquery call: |
993 | 962 | /*$j.ajax({ |
994 | 963 | type: "GET", |
— | — | @@ -1088,7 +1057,7 @@ |
1089 | 1058 | mv_embed_path = mv_embed_url.substr(0, mv_embed_url.indexOf('mwScriptLoader.php')) + mediaWiki_mvEmbed_path ; |
1090 | 1059 | }else{ |
1091 | 1060 | mv_embed_path = mv_embed_url.substr(0, mv_embed_url.indexOf('jsScriptLoader.php')); |
1092 | | - } |
| 1061 | + } |
1093 | 1062 | //absolute the url (if relative) (if we don't have mv_embed path) |
1094 | 1063 | if( mv_embed_path.indexOf('://') == -1){ |
1095 | 1064 | var pURL = parseUri( document.URL ); |
— | — | @@ -1100,7 +1069,7 @@ |
1101 | 1070 | mv_embed_path = pURL.protocol + '://' + pURL.authority + pURL.directory + mv_embed_path; |
1102 | 1071 | } |
1103 | 1072 | } |
1104 | | - } |
| 1073 | + } |
1105 | 1074 | return mv_embed_path; |
1106 | 1075 | } |
1107 | 1076 | |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_baseEmbed.js |
— | — | @@ -1,6 +1,46 @@ |
2 | 2 | /* the base video control JSON object with default attributes |
3 | 3 | * for supported attribute details see README |
4 | 4 | */ |
| 5 | + |
| 6 | +loadGM({ |
| 7 | + "loading_plugin" : "loading plugin<blink>...</blink>", |
| 8 | + |
| 9 | + "select_playback" : "Set Playback Preference", |
| 10 | + "link_back" : "Link Back", |
| 11 | + "error_load_lib" : "mv_embed: Unable to load required javascript libraries\n insert script via DOM has failed, try reloading? ", |
| 12 | + |
| 13 | + "error_swap_vid" : "Error:mv_embed was unable to swap the video tag for the mv_embed interface", |
| 14 | + |
| 15 | + "add_to_end_of_sequence" : "Add to End of Sequence", |
| 16 | + |
| 17 | + "missing_video_stream" : "The video file for this stream is missing", |
| 18 | + |
| 19 | + "next_clip_msg" : "Play Next Clip", |
| 20 | + "prev_clip_msg" : "Play Previous Clip", |
| 21 | + "current_clip_msg" : "Continue Playing this Clip", |
| 22 | + "seek_to" : "Seek to", |
| 23 | + |
| 24 | + "download_segment" : "Download Selection:", |
| 25 | + "download_full" : "Download Full Video File:", |
| 26 | + "download_right_click": "To download right click and select <i>save target as</i>", |
| 27 | + "download_clip" : "Download the Clip", |
| 28 | + "download_text" : "Download Text (<a style=\"color:white\" title=\"cmml\" href=\"http://wiki.xiph.org/index.php/CMML\">cmml</a> xml):", |
| 29 | + |
| 30 | + "clip_linkback" : "Clip Source Page", |
| 31 | + |
| 32 | + "mv_ogg-player-vlc-mozilla" : "VLC Plugin", |
| 33 | + "mv_ogg-player-videoElement" : "Native Ogg Video Support", |
| 34 | + "mv_ogg-player-vlc-activex" : "VLC ActiveX", |
| 35 | + "mv_ogg-player-oggPlugin" : "Generic Ogg Plugin", |
| 36 | + "mv_ogg-player-quicktime-mozilla" : "Quicktime Plugin", |
| 37 | + "mv_ogg-player-quicktime-activex" : "Quicktime ActiveX", |
| 38 | + "mv_ogg-player-cortado" : "Java Cortado", |
| 39 | + "mv_ogg-player-flowplayer" : "Flowplayer", |
| 40 | + "mv_ogg-player-selected" : " (selected)", |
| 41 | + "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis", |
| 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 | +}); |
| 44 | + |
5 | 45 | var default_video_attributes = { |
6 | 46 | "id":null, |
7 | 47 | "class":null, |