r55475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55474‎ | r55475 | r55476 >
Date:12:12, 22 August 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* added missing message "mwe-no_text_tracks_found"
* harmonise message prefix
* fix typos in message keys
* fix typos in messages
* remove trailing whitespace

Should be almost done now. Next step is to get a proper mwEmbed.i18n.php, verify and fix that, and give it to the translators.
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/baseRemoteSearch.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/metavidSearch.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/simpleUploadForm.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libSequencer/mvTimedEffectsEdit.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/mv_embed.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
@@ -1,9 +1,10 @@
22
33 loadGM({
4 - "select_transcript_set" : "Select layers",
5 - "auto_scroll" : "auto scroll",
6 - "close" : "close",
7 - "improve_transcript" : "Improve"
 4+ "mwe-select_transcript_set" : "Select layers",
 5+ "mwe-auto_scroll" : "auto scroll",
 6+ "mwe-close" : "close",
 7+ "mwe-improve_transcript" : "Improve",
 8+ "mwe-no_text_tracks_found" : "No text tracks were found"
89 })
910 // text interface object (for inline display captions)
1011 var mvTextInterface = function( parentEmbed ){
@@ -94,7 +95,7 @@
9596
9697 //if nothing found anywhere update the loading icon to say no tracks found
9798 if(!default_found)
98 - $j('#mv_txt_load_'+_this.pe.id).html( gM('no_text_tracks_found') );
 99+ $j('#mv_txt_load_'+_this.pe.id).html( gM('mwe-no_text_tracks_found') );
99100
100101
101102 },
@@ -229,7 +230,7 @@
230231 var _this = this;
231232 js_log('getTsSelect');
232233 var selHTML = '<div id="mvtsel_' + this.pe.id + '" style="position:absolute;background:#FFF;top:30px;left:0px;right:0px;bottom:0px;overflow:auto;">';
233 - selHTML+='<b>' + gM('select_transcript_set') + '</b><ul>';
 234+ selHTML+='<b>' + gM('mwe-select_transcript_set') + '</b><ul>';
234235 //debugger;
235236 for(var i in _this.availableTracks){ //for in loop ok on object
236237 var checked = ( _this.availableTracks[i].display ) ? 'checked' : '';
@@ -237,7 +238,7 @@
238239 _this.availableTracks[i].getTitle() + '</li>';
239240 }
240241 selHTML+='</ul>' +
241 - '<a href="#" onClick="document.getElementById(\'' + this.pe.id + '\').textInterface.applyTsSelect();return false;">'+gM('close')+'</a>'+
 242+ '<a href="#" onClick="document.getElementById(\'' + this.pe.id + '\').textInterface.applyTsSelect();return false;">'+gM('mwe-close')+'</a>'+
242243 '</div>';
243244 $j('#metaBox_'+_this.pe.id).append( selHTML );
244245 },
@@ -342,13 +343,13 @@
343344 //add in loading icon:
344345 var as_checked = (this.autoscroll)?'checked':'';
345346 out+= '<div id="tt_mmenu_'+this.pe.id+'" class="ui-widget-header" style="font-size:.6em;position:absolute;top:0;height:30px;left:0px;right:0px;">' +
346 - $j.btnHtml(gM('select_transcript_set'), 'tt-select', 'shuffle');
 347+ $j.btnHtml(gM('mwe-select_transcript_set'), 'tt-select', 'shuffle');
347348 if(this.pe.media_element.linkback){
348 - out+=' ' + $j.btnHtml(gM('improve_transcript'), 'tt-improve', 'document', {href:this.pe.media_element.linkback, target:'_new'});
 349+ out+=' ' + $j.btnHtml(gM('mwe-improve_transcript'), 'tt-improve', 'document', {href:this.pe.media_element.linkback, target:'_new'});
349350 }
350351 out+='<input onClick="document.getElementById(\''+this.pe.id+'\').textInterface.setAutoScroll(this.checked);return false;" ' +
351 - 'type="checkbox" '+as_checked +'>'+gM('auto_scroll') + ' ' +
352 - $j.btnHtml(gM('close'), 'tt-close', 'circle-close');
 352+ 'type="checkbox" '+as_checked +'>'+gM('mwe-auto_scroll') + ' ' +
 353+ $j.btnHtml(gM('mwe-close'), 'tt-close', 'circle-close');
353354 out+='</div>';
354355 return out;
355356 },
Index: trunk/phase3/js2/mwEmbed/libAddMedia/simpleUploadForm.js
@@ -5,14 +5,14 @@
66 */
77
88 loadGM({
9 - "select_file" : "Select file",
10 - "more_licence_options" : "For more licence options, view the <a href=\"$1\">normal upload page<\/a>",
11 - "select_ownwork" : "I am uploading entirely my own work, and licencing it under : ",
12 - "licence_cc-by-sa" : "Creative Commons Share Alike (3.0)",
13 - "upload" : "Upload file",
14 - "destfilename" : "Destination filename : ",
15 - "summary" : "Summary",
16 - "error_not_loggedin" : "You do not appear to be logged in or do not have upload privlages."
 9+ "mwe-select_file" : "Select file",
 10+ "mwe-more_licence_options" : "For more licence options, view the <a href=\"$1\">normal upload page<\/a>",
 11+ "mwe-select_ownwork" : "I am uploading entirely my own work, and licencing it under:",
 12+ "mwe-licence_cc-by-sa" : "Creative Commons Share Alike (3.0)",
 13+ "mwe-upload" : "Upload file",
 14+ "mwe-destfilename" : "Destination filename:",
 15+ "mwe-summary" : "Summary",
 16+ "mwe-error_not_loggedin" : "You do not appear to be logged in or do not have upload privileges."
1717 });
1818
1919 var default_form_options = {
@@ -41,7 +41,7 @@
4242 //much todo to improved this web form
4343 get_mw_token('File:MyRandomFileTokenCheck', opt.api_target, function(eToken){
4444 if( !eToken || eToken == '+\\' ){
45 - $(this.selector).html( gM('error_not_loggedin') );
 45+ $(this.selector).html( gM('mwe-error_not_loggedin') );
4646 return false;
4747 }
4848
@@ -54,22 +54,22 @@
5555 '<input type="hidden" name="token" value="'+ eToken +'">' +
5656
5757 //form name set:
58 - '<label for="wpUploadFile">' + gM('select_file') + '</label><br>'+
 58+ '<label for="wpUploadFile">' + gM('mwe-select_file') + '</label><br>'+
5959 '<input type="file" style="display: inline;" name="wpUploadFile" size="15"/><br>' +
6060
61 - '<label for="wpDestFile">' +gM('destfilename') + '</label><br>'+
62 - '<input type="text" name="wpDestFile" size="30" /><br>'+
 61+ '<label for="wpDestFile">' +gM('mwe-destfilename') + '</label><br>'+
 62+ '<input type="text" name="wpDestFile" size="30" /><br>'+
6363
64 - '<label for="wpUploadDescription">' + gM('summary') + ':</label><br>' +
 64+ '<label for="wpUploadDescription">' + gM('mwe-summary') + ':</label><br>' +
6565 '<textarea cols="30" rows="3" name="wpUploadDescription" tabindex="3"/><br>'+
66 -
 66+
6767 '<div id="wpDestFile-warning"></div>' +
6868 '<div style="clear:both;"></div>' +
69 -
70 - gM('select_ownwork') + '<br>' +
71 - '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('licence_cc-by-sa') + '<br>' +
7269
73 - '<input type="submit" accesskey="s" value="' + gM('upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' +
 70+ gM('mwe-select_ownwork') + '<br>' +
 71+ '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('mwe-licence_cc-by-sa') + '<br>' +
 72+
 73+ '<input type="submit" accesskey="s" value="' + gM('mwe-upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' +
7474 //close the form and div
7575 '</form>';
7676
@@ -109,15 +109,15 @@
110110 'warn_target':'#wpDestFile-warning'
111111 });
112112 });
113 -
114 -
 113+
 114+
115115 //do destination check:
116 - $j("[name='wpDestFile']").change(function(){
 116+ $j("[name='wpDestFile']").change(function(){
117117 $j(this).doDestCheck({
118118 'warn_target':'#wpDestFile-warning'
119119 });
120120 });
121 -
 121+
122122 if(typeof opt.ondone_cb == 'undefined')
123123 opt.ondone_cb = false;
124124
@@ -129,13 +129,13 @@
130130 'form_rewrite': true,
131131 'target_edit_from' : '#suf-upload',
132132 'new_source_cb' : function( orgFilename, oggName ){
133 - $j("#suf-upload [name='wpDestFile']").val( oggName ).doDestCheck({
134 - warn_target: "#wpDestFile-warning"
135 - });
 133+ $j("#suf-upload [name='wpDestFile']").val( oggName ).doDestCheck({
 134+ warn_target: "#wpDestFile-warning"
 135+ });
136136 },
137137 'done_upload_cb' : opt.ondone_cb
138138 });
139139 }
140140 });
141141 }
142 -})(jQuery);
\ No newline at end of file
 142+})(jQuery);
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -1,7 +1,9 @@
22 /**
33 * the base Upload Interface for uploading.
44 *
5 - * this base uploader is optionally extended by firefogg
 5+ * this base uploader is optionally extended by Firefogg
 6+ *
 7+ * @@todo: checkme: gM 'thumbnail-more' is used; only defined in MediaWiki core. Will that work properly?
68 */
79 loadGM({
810 "mwe-upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)",
@@ -670,7 +672,7 @@
671673 )
672674 //just display an empty progress window
673675 $j('#upProgressDialog').dialog('open');
674 -
 676+
675677 //setup progress bar:
676678 $j('#up-progressbar').progressbar({
677679 value:0
@@ -703,15 +705,15 @@
704706 * doDestCheck checks the destination
705707 */
706708 $.fn.doDestCheck = function( opt ){
707 - var _this = this;
708 - var destFile = this.selector;
709 - //set up option defaults;
 709+ var _this = this;
 710+ var destFile = this.selector;
 711+ //set up option defaults;
710712 if(!opt.warn_target)
711713 opt.warn_target = '#wpDestFile-warning';
712 -
713 - //empty target warn:
 714+
 715+ //empty target warn:
714716 $j(opt.warn_target).empty();
715 -
 717+
716718 //show loading
717719 $j(destFile).after('<img id = "mw-spinner-wpDestFile" src ="'+ stylepath + '/common/images/spinner.gif" />');
718720 //try and get a thumb of the current file (check its destination)
@@ -730,7 +732,7 @@
731733 //all good no file there
732734 }else{
733735 for(var page_id in data.query.pages){
734 - var ntitle = ( data.query.normalized)? data.query.normalized[0].to : data.query.pages[ page_id ].title
 736+ var ntitle = ( data.query.normalized)? data.query.normalized[0].to : data.query.pages[ page_id ].title
735737 var img = data.query.pages[ page_id ].imageinfo[0];
736738 $j('#wpDestFile-warning').html(
737739 '<ul>' +
@@ -761,6 +763,5 @@
762764 }
763765 }
764766 });
765 - }
 767+ }
766768 })(jQuery);
767 -
Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/baseRemoteSearch.js
@@ -1,7 +1,7 @@
22 //base remote search obj
33
44 loadGM({
5 - "imported_from" : "$1 imported from [$2 $3]. See the original [$4 resource page] for more information."
 5+ "mwe-imported_from" : "$1 imported from [$2 $3]. See the original [$4 resource page] for more information."
66 })
77 // @key is name of rObj variable
88 // @value is where to find the value in the item xml
@@ -171,7 +171,7 @@
172172
173173 },
174174 getImportResourceDescWiki:function(rObj){
175 - return gM('imported_from', [rObj.title, this.cp.homepage, this.cp.title, rObj.link]);
 175+ return gM('mwe-imported_from', [rObj.title, this.cp.homepage, this.cp.title, rObj.link]);
176176 },
177177 //for thigns like categories and the like
178178 getExtraResourceDescWiki:function( rObj ){
Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/metavidSearch.js
@@ -1,8 +1,8 @@
22 /*
3 -* api modes (implementations should call these objects which inherit the mvBaseRemoteSearch
 3+* API modes (implementations should call these objects which inherit the mvBaseRemoteSearch
44 */
55 loadGM({
6 - "mv_stream_title" : "$1 $2 to $3"
 6+ "mwe-stream_title" : "$1 $2 to $3"
77 });
88 var metavidSearch = function(iObj) {
99 return this.init(iObj);
@@ -10,10 +10,10 @@
1111 metavidSearch.prototype = {
1212 reqObj:{ //set up the default request paramaters
1313 'order':'recent',
14 - 'feed_format':'rss'
 14+ 'feed_format':'rss'
1515 },
1616 init:function( iObj ){
17 - //init base class and inherit:
 17+ //init base class and inherit:
1818 var baseSearch = new baseRemoteSearch( iObj );
1919 for(var i in baseSearch){
2020 if(typeof this[i] =='undefined'){
@@ -22,11 +22,11 @@
2323 this['parent_'+i] = baseSearch[i];
2424 }
2525 }
26 - },
 26+ },
2727 getSearchResults:function(){
28 - //call parent:
 28+ //call parent:
2929 this.parent_getSearchResults();
30 -
 30+
3131 var _this = this;
3232 //start loading:
3333 _this.loading= 1;
@@ -36,127 +36,127 @@
3737 //add on the req_param
3838 for(var i in this.reqObj){
3939 url += '&' + i + '=' + this.reqObj[i];
40 - }
 40+ }
4141 url += '&f[0][t]=match&f[0][v]=' + $j('#rsd_q').val();
42 - //add offset limit:
 42+ //add offset limit:
4343 url+='&limit=' + this.cp.limit;
44 - url+='&offset=' + this.cp.offset;
45 -
 44+ url+='&offset=' + this.cp.offset;
 45+
4646 do_request(url, function(data){
47 -
48 - js_log('mvSearch: got data response');
 47+
 48+ js_log('mvSearch: got data response');
4949 //should have an xml rss data object:
5050 _this.addRSSData( data , url );
51 -
 51+
5252 //do some metavid specific pos processing on the rObj data:
53 - for(var i in _this.resultsObj){
54 - var rObj = _this.resultsObj[i];
55 - var proe = parseUri( rObj['roe_url'] );
 53+ for(var i in _this.resultsObj){
 54+ var rObj = _this.resultsObj[i];
 55+ var proe = parseUri( rObj['roe_url'] );
5656 rObj['start_time'] = proe.queryKey['t'].split('/')[0];
57 - rObj['end_time'] = proe.queryKey['t'].split('/')[1];
 57+ rObj['end_time'] = proe.queryKey['t'].split('/')[1];
5858 rObj['stream_name'] = proe.queryKey['stream_name'];
59 -
60 - //all metavid content is public domain:
 59+
 60+ //all metavid content is public domain:
6161 rObj['license'] = _this.rsd.getLicenceFromKey( 'pd' );
62 -
63 - //transform the title into a wiki_safe title:
 62+
 63+ //transform the title into a wiki_safe title:
6464 //rObj['titleKey'] = proe.queryKey['stream_name'] + '_' + rObj['start_time'].replace(/:/g,'.') + '_' + rObj['end_time'].replace(/:/g,'.') + '.ogg';
6565 rObj['titleKey'] = _this.getTitleKey( rObj );
66 -
67 - //default width of metavid clips:
68 - rObj['target_width'] = 400;
69 - }
70 - //done loading:
 66+
 67+ //default width of metavid clips:
 68+ rObj['target_width'] = 400;
 69+ }
 70+ //done loading:
7171 _this.loading=0;
7272 });
7373 },
7474 getTitleKey:function( rObj ){
75 - return rObj['stream_name'] + '_start-' + rObj['start_time'].replace(/:/g,'.') + '_end-' + rObj['end_time'].replace(/:/g,'.') + '.ogg';
76 - },
 75+ return rObj['stream_name'] + '_start-' + rObj['start_time'].replace(/:/g,'.') + '_end-' + rObj['end_time'].replace(/:/g,'.') + '.ogg';
 76+ },
7777 getTitle:function( rObj ){
7878 var sn = rObj['stream_name'].replace(/_/g, ' ');
79 - sn = sn.charAt(0).toUpperCase() + sn.substr(1);
80 - return gM('mv_stream_title', [ sn, rObj.start_time, rObj.end_time ]);
81 - },
82 - //metavid descption tied to public domain license key (government produced content)
 79+ sn = sn.charAt(0).toUpperCase() + sn.substr(1);
 80+ return gM('mwe-stream_title', [ sn, rObj.start_time, rObj.end_time ]);
 81+ },
 82+ //metavid descption tied to public domain license key (government produced content)
8383 getPermissionWikiTag:function( rObj ){
8484 return '{{PD-USGov}}';
85 - },
 85+ },
8686 getExtraResourceDescWiki:function( rObj ){
8787 var o = "\n";
88 - //check for person
 88+ //check for person
8989 if( rObj.person && rObj.person['label'])
9090 o += '* featuring [[' + rObj.person['label'] + ']]' + "\n";
91 -
 91+
9292 if( rObj.parent_clip )
9393 o += '* part of longer [' + rObj.parent_clip + ' video clip]'+ "\n";
94 -
 94+
9595 if( rObj.person && rObj.person['url'] && rObj.person['label'] )
9696 o += '* also see speeches by [' + $j.trim( rObj.person.url ) + ' ' + rObj.person['label'] + ']'+ "\n";
97 -
 97+
9898 //check for bill:
9999 if( rObj.bill && rObj.bill['label'] && rObj.bill['url'])
100 - o += '* related to bill: [[' + rObj.bill['label'] + ']] more bill [' + rObj.bill['url'] + ' video clips]'+ "\n";
 100+ o += '* related to bill: [[' + rObj.bill['label'] + ']] more bill [' + rObj.bill['url'] + ' video clips]'+ "\n";
101101 return o;
102 - },
 102+ },
103103 //format is "quote" followed by [[name of person]]
104 - getInlineDescWiki:function( rObj ){
105 - var o = this.parent_getInlineDescWiki( rObj );
 104+ getInlineDescWiki:function( rObj ){
 105+ var o = this.parent_getInlineDescWiki( rObj );
106106 //add in person if found
107107 if( rObj.person && rObj.person['label'] ){
108108 o = $j.trim( o.replace(rObj.person['label'], '') );
109 - //trim leading :
 109+ //trim leading :
110110 if(o.substr(0,1)==':')
111 - o = o.substr(1);
112 - //add quotes and person at the end:
 111+ o = o.substr(1);
 112+ //add quotes and person at the end:
113113 var d = this.getDateFromLink( rObj.link );
114114 o ='"' + o + '" [[' + rObj.person['label'] + ']] on ' + d.toDateString();
115 - }
116 - //could do ref or direct link:
117 - o += ' \'\'[' + $j.trim( rObj.link ) + ' source clip]\'\' ';
118 -
 115+ }
 116+ //could do ref or direct link:
 117+ o += ' \'\'[' + $j.trim( rObj.link ) + ' source clip]\'\' ';
 118+
119119 //var o= '"' + o + '" by [[' + rObj.person['label'] + ']] '+
120 - // '<ref>[' + rObj.link + ' Metavid Source Page] for ' + rObj.title +'</ref>';
121 - return o;
 120+ // '<ref>[' + rObj.link + ' Metavid Source Page] for ' + rObj.title +'</ref>';
 121+ return o;
122122 },
123123 //give an updated start and end time updates the title and url
124124 applyVideoAdj: function( rObj ){
125 - js_log('mv ApplyVideoAdj::');
126 - //update the titleKey:
127 - rObj['titleKey'] = this.getTitleKey( rObj );
128 -
129 - //update the title:
130 - rObj['title'] = this.getTitle( rObj );
131 -
132 - //update the interface:
 125+ js_log('mv ApplyVideoAdj::');
 126+ //update the titleKey:
 127+ rObj['titleKey'] = this.getTitleKey( rObj );
 128+
 129+ //update the title:
 130+ rObj['title'] = this.getTitle( rObj );
 131+
 132+ //update the interface:
133133 js_log('update title to: ' + rObj['title']);
134134 $j('#rsd_resource_title').html( gM('rsd_resource_edit', rObj['title'] ) );
135 -
136 - //if the video is "roe" based select the ogg stream
137 - if( rObj.roe_url && rObj.pSobj.cp.stream_import_key){
 135+
 136+ //if the video is "roe" based select the ogg stream
 137+ if( rObj.roe_url && rObj.pSobj.cp.stream_import_key){
138138 var source = $j('#embed_vid').get(0).media_element.getSourceById( rObj.pSobj.cp.stream_import_key );
139139 if(!source){
140 - js_error('Error::could not find source: ' + rObj.pSobj.cp.stream_import_key);
 140+ js_error('Error::could not find source: ' + rObj.pSobj.cp.stream_import_key);
141141 }else{
142142 rObj['src'] = source.getURI();
143143 js_log("g src_key: " + rObj.pSobj.cp.stream_import_key + ' src:' + rObj['src']) ;
144144 return true;
145145 }
146 - }
 146+ }
147147 },
148148 getEmbedHTML:function( rObj , options ){
149149 if(!options)
150150 options={};
151151 var id_attr = (options['id'])?' id = "' + options['id'] +'" ': '';
152 - var style_attr = (options['max_width'])?' style="width:'+options['max_width']+'px;"':'';
153 - //@@maybe check type here ?
 152+ var style_attr = (options['max_width'])?' style="width:'+options['max_width']+'px;"':'';
 153+ //@@maybe check type here ?
154154 if(options['only_poster']){
155 - return '<img ' + id_attr + ' src="' + rObj['poster']+'" ' + style_attr + '>';
 155+ return '<img ' + id_attr + ' src="' + rObj['poster']+'" ' + style_attr + '>';
156156 }else{
157157 return '<video ' + id_attr + ' roe="' + rObj['roe_url'] + '"></video>';
158158 }
159 - },
160 - getImageTransform:function( rObj, opt ){
 159+ },
 160+ getImageTransform:function( rObj, opt ){
161161 if( opt.width <= 80 ){
162162 return getURLParamReplace( rObj.poster, { 'size' : "icon" } )
163163 }else if( opt.width <= 160 ){
@@ -167,38 +167,38 @@
168168 return getURLParamReplace( rObj.poster, { 'size' : 'large' } )
169169 }else{
170170 return getURLParamReplace( rObj.poster, { 'size' : 'full' } )
171 - }
 171+ }
172172 },
173173 getEmbedObjParsedInfo:function(rObj, eb_id){
174174 var sources = $j('#'+eb_id).get(0).media_element.getSources();
175175 rObj.other_versions ='*[' + rObj['roe_url'] + ' XML of all Video Formats and Timed Text]'+"\n";
176176 for(var i in sources){
177177 var cur_source = sources[i];
178 - //rObj.other_versions += '*['+cur_source.getURI() +' ' + cur_source.title +']' + "\n";
 178+ //rObj.other_versions += '*['+cur_source.getURI() +' ' + cur_source.title +']' + "\n";
179179 if( cur_source.id == this.cp.target_source_id)
180180 rObj['url'] = cur_source.getURI();
181181 }
182182 //js_log('set url to: ' + rObj['url']);
183 - return rObj;
 183+ return rObj;
184184 },
185185 //update rObj for import:
186186 updateDataForImport:function( rObj ){
187187 rObj['author']='US Government';
188188 //convert data to UTC type date:
189189 var d = this.getDateFromLink( rObj.link );
190 - rObj['date'] = d.toDateString();
191 - rObj['license_template_tag']='PD-USGov';
192 - //update based on new start time:
193 - js_log('url is: ' + rObj.src + ' ns: ' + rObj.start_time + ' ne:' + rObj.end_time);
194 -
 190+ rObj['date'] = d.toDateString();
 191+ rObj['license_template_tag']='PD-USGov';
 192+ //update based on new start time:
 193+ js_log('url is: ' + rObj.src + ' ns: ' + rObj.start_time + ' ne:' + rObj.end_time);
 194+
195195 return rObj;
196196 },
197197 getDateFromLink:function( link ){
198 - var dateExp = new RegExp(/_([0-9]+)\-([0-9]+)\-([0-9]+)/);
 198+ var dateExp = new RegExp(/_([0-9]+)\-([0-9]+)\-([0-9]+)/);
199199 var dParts = link.match (dateExp);
200200 var d = new Date();
201201 var year_full = (dParts[3].length==2)?'20'+dParts[3].toString():dParts[3];
202 - d.setFullYear(year_full, dParts[1]-1, dParts[2]);
 202+ d.setFullYear(year_full, dParts[1]-1, dParts[2]);
203203 return d;
204204 }
205 -}
\ No newline at end of file
 205+}
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js
@@ -5,7 +5,7 @@
66 //@@todo put all msg text into loadGM json
77
88 loadGM({
9 - "help-sticky" : "Help (click to stick)",
 9+ "fogg-help-sticky" : "Help (click to stick)",
1010 "fogg-cg-preset" : "Preset : <strong>$1<\/strong>",
1111 "fogg-cg-quality" : "Basic quality and resolution control",
1212 "fogg-cg-meta" : "Metadata for the clip",
@@ -37,48 +37,48 @@
3838 config_groups : [ 'preset', 'range', 'quality', 'meta', 'advVideo', 'advAudio'],
3939 //list of pre-sets:
4040 //local instance encoder config:
41 - default_local_settings:{
42 - 'd' : 'webvideo',
43 - 'type' : 'select',
44 - 'selectVal': ['webvideo'],
45 - 'group' : "preset",
46 - 'pSet' : {
47 - 'custom':{
48 - 'descKey': 'fogg-preset-custom',
49 - 'conf': {}
50 - },
51 - 'webvideo': {
52 - 'desc': "Web Video Theora, Vorbis 400kbs & 400px max width",
53 - 'conf': {
54 - 'maxSize' : 400,
55 - 'videoBitrate' : 544,
56 - 'audioBitrate' : 96,
57 - 'noUpscaling' : true,
58 - }
59 - },
60 - 'savebandwith': {
61 - 'desc': "Low Bandwith Theora, Vorbis 164kbs & 200px max size",
62 - 'conf': {
63 - 'maxSize' : 200,
64 - 'videoBitrate' : 164,
65 - 'audioBitrate' : 32,
66 - 'samplerate' : 22050,
67 - 'framerate' : 15,
68 - 'channels' : 1,
69 - 'noUpscaling' : true
70 - }
71 - },
72 - 'hqstream':{
73 - 'desc': "High Quality Theora, Vorbis 1080px max width",
74 - 'conf': {
75 - 'maxSize' : 1080,
76 - 'videoQuality' : 6,
77 - 'audioQuality' : 3,
78 - 'noUpscaling' : true,
79 - }
80 - },
81 - }
82 - },
 41+default_local_settings:{
 42+ 'd' : 'webvideo',
 43+ 'type' : 'select',
 44+ 'selectVal': ['webvideo'],
 45+ 'group' : "preset",
 46+ 'pSet' : {
 47+ 'custom':{
 48+ 'descKey': 'fogg-preset-custom',
 49+ 'conf': {}
 50+ },
 51+ 'webvideo': {
 52+ 'desc': "Web Video Theora, Vorbis 400kbs & 400px max width",
 53+ 'conf': {
 54+ 'maxSize' : 400,
 55+ 'videoBitrate' : 544,
 56+ 'audioBitrate' : 96,
 57+ 'noUpscaling' : true,
 58+ }
 59+ },
 60+ 'savebandwith': {
 61+ 'desc': "Low Bandwith Theora, Vorbis 164kbs & 200px max size",
 62+ 'conf': {
 63+ 'maxSize' : 200,
 64+ 'videoBitrate' : 164,
 65+ 'audioBitrate' : 32,
 66+ 'samplerate' : 22050,
 67+ 'framerate' : 15,
 68+ 'channels' : 1,
 69+ 'noUpscaling' : true
 70+ }
 71+ },
 72+ 'hqstream':{
 73+ 'desc': "High Quality Theora, Vorbis 1080px max width",
 74+ 'conf': {
 75+ 'maxSize' : 1080,
 76+ 'videoQuality' : 6,
 77+ 'audioQuality' : 3,
 78+ 'noUpscaling' : true,
 79+ }
 80+ },
 81+ }
 82+},
8383 local_settings: {},
8484
8585 //core firefogg default encoder configuration
@@ -86,18 +86,18 @@
8787 default_encoder_config : {
8888 //base quality settings:
8989 'videoQuality': {
90 - 'd' : 5,
91 - 't' : 'Video Quality',
92 - 'range' : {'min':0,'max':10},
93 - 'type' : 'slider',
94 - 'group' : 'quality',
95 - 'help' : "Used to set the <i>Visual Quality</i> of the encoded video. (not used if you set bitrate in advanced controls below)"
 90+ 'd' : 5,
 91+ 't' : 'Video Quality',
 92+ 'range' : {'min':0,'max':10},
 93+ 'type' : 'slider',
 94+ 'group' : 'quality',
 95+ 'help' : "Used to set the <i>Visual Quality</i> of the encoded video. (not used if you set bitrate in advanced controls below)"
9696 },
9797 'twopass':{
98 - 't' : "Two Pass Encoding",
99 - 'type' : "boolean",
100 - 'group' : "quality",
101 - 'help' : "Two Pass Encoding enables more consitant quality by making two passes over the video file"
 98+ 't' : "Two Pass Encoding",
 99+ 'type' : "boolean",
 100+ 'group' : "quality",
 101+ 'help' : "Two Pass Encoding enables more consitant quality by making two passes over the video file"
102102 },
103103 'starttime':{
104104 't' : "Start Second",
@@ -210,8 +210,8 @@
211211 'type' : 'select',
212212 'selectVal' : [{'22050':'22 kHz'}, {'44100':'44 khz'}, {'48000':'48 khz'}],
213213 'formatSelect' : function(val){
214 - return (Math.round(val/100)*10) + ' Hz';
215 - },
 214+ return (Math.round(val/100)*10) + ' Hz';
 215+ },
216216 'help' : "set output samplerate (in Hz)."
217217 },
218218 'noaudio':{
@@ -393,7 +393,7 @@
394394 out+='<tr><td valign="top">'+
395395 '<label for="_' + cK + '">' +
396396 cConf.t + ':' +
397 - '<span title="' + gM('help-sticky') + '" class="help_'+ cK + ' ui-icon ui-icon-info" style="float:left"></span>'+
 397+ '<span title="' + gM('fogg-help-sticky') + '" class="help_'+ cK + ' ui-icon ui-icon-info" style="float:left"></span>'+
398398 '</label></td><td valign="top">';
399399 //if we don't value for this:
400400 var dv = ( this.default_encoder_config[cK].d ) ? this.default_encoder_config[cK].d : '';
Index: trunk/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js
@@ -10,15 +10,15 @@
1111 init:function( this_seq ){
1212 var _this = this;
1313 js_log("init:seqRemoteSearchDriver");
14 - //setup remote search driver with a seq parent:
 14+ //setup remote search driver with a seq parent:
1515 this.pSeq = this_seq;
16 - var iObj = {
 16+ var iObj = {
1717 'target_container' : '#cliplib_ic',
18 - 'local_wiki_api_url': this_seq.getLocalApiUrl(),
19 - 'instance_name' : this_seq.instance_name + '.mySearch',
20 - 'default_query' : this.pSeq.plObj.title
21 - }
22 - //inherit the remoteSearchDriver properties:n
 18+ 'local_wiki_api_url': this_seq.getLocalApiUrl(),
 19+ 'instance_name' : this_seq.instance_name + '.mySearch',
 20+ 'default_query' : this.pSeq.plObj.title
 21+ }
 22+ //inherit the remoteSearchDriver properties:n
2323 var tmpRSD = new remoteSearchDriver( iObj );
2424 for(var i in tmpRSD){
2525 if(this[i]){
@@ -34,100 +34,100 @@
3535 js_log("seqRemoteSearchDriver::" + _this.pSeq.disp_menu_item);
3636 //call the parent
3737 _this.pSeq.parent_do_refresh_timeline();
38 - //add our local bindings
39 - _this.addResultBindings();
 38+ //add our local bindings
 39+ _this.addResultBindings();
4040 return true;
4141 }
4242 }
43 - },
 43+ },
4444 resourceEdit:function(){
45 - var _this = this;
46 -
47 - },
 45+ var _this = this;
 46+
 47+ },
4848 addResultBindings:function(){
49 - //set up seq:
 49+ //set up seq:
5050 var _this = this;
5151 //setup parent bindings:
5252 this.parent_addResultBindings();
53 -
 53+
5454 //add an aditional click binding
5555 $j('.rsd_res_item').click(function(){
5656 js_log('SeqRemoteSearch: rsd_res_item: click (remove sequence_add_target)');
5757 _this.sequence_add_target =false;
5858 });
59 -
60 - //add an additional drag binding
 59+
 60+ //add an additional drag binding
6161 $j( '.rsd_res_item' ).draggable('destroy').draggable({
6262 helper:function(){
6363 return $j( this ).clone().appendTo('body').css({'z-index':9999}).get(0);
64 - },
65 - revert:'invalid',
 64+ },
 65+ revert:'invalid',
6666 start:function(){
6767 js_log('start drag');
68 - }
69 - });
 68+ }
 69+ });
7070 $j(".mv_clip_drag").droppable( 'destroy' ).droppable({
7171 accept: '.rsd_res_item',
7272 over:function(event, ui){
7373 //js_log("over : mv_clip_drag: " + $j(this).attr('id') );
74 - $j(this).css('border-right', 'solid thick red');
 74+ $j(this).css('border-right', 'solid thick red');
7575 },
7676 out:function(event, ui){
77 - $j(this).css('border-right', 'solid thin white');
 77+ $j(this).css('border-right', 'solid thin white');
7878 },
7979 drop: function(event, ui) {
8080 $j(this).css('border-right', 'solid thin white');
8181 js_log("Droped: "+ $j(ui.draggable).attr('id') +' on ' + $j(this).attr('id') );
8282 _this.sequence_add_target = $j(this).attr('id');
8383 //load the orginal draged item
84 - var rObj = _this.getResourceFromId( $j(ui.draggable).attr('id') );
85 - _this.resourceEdit(rObj, ui.draggable);
 84+ var rObj = _this.getResourceFromId( $j(ui.draggable).attr('id') );
 85+ _this.resourceEdit(rObj, ui.draggable);
8686 }
87 - });
88 -
 87+ });
 88+
8989 },
9090 insertResource:function(rObj){
9191 var _this = this;
9292 js_log("SEQ insert resource after:" + _this.sequence_add_target + ' of type: ' + rObj.mime);
9393 if(_this.sequence_add_target ){
94 - var tClip = _this.pSeq.getClipFromSeqID( _this.sequence_add_target );
 94+ var tClip = _this.pSeq.getClipFromSeqID( _this.sequence_add_target );
9595 var target_order = false;
9696 if(tClip)
9797 var target_order = tClip.order;
98 - }
99 - //@@todo show watting of sorts.
100 -
 98+ }
 99+ //@@todo show watting of sorts.
 100+
101101 //get target order:
102 - var cat = rObj;
 102+ var cat = rObj;
103103 //check for target insert path
104 - this.checkImportResource( rObj, function(){
105 -
106 - var clipConfig = {
 104+ this.checkImportResource( rObj, function(){
 105+
 106+ var clipConfig = {
107107 'type' : rObj.mime,
108 - 'uri' : _this.cFileNS + ':' + rObj.target_resource_title,
109 - 'title' : rObj.title
110 - };
111 - //set via local properites if avaliable
 108+ 'uri' : _this.cFileNS + ':' + rObj.target_resource_title,
 109+ 'title' : rObj.title
 110+ };
 111+ //set via local properites if avaliable
112112 clipConfig['src'] = (rObj.local_src) ? rObj.local_src : rObj.src;
113113 clipConfig['poster'] = ( rObj.local_poster ) ? rObj.local_poster : rObj.poster;
114 -
 114+
115115 if(rObj.start_time && rObj.end_time){
116116 clipConfig['dur'] = npt2seconds( rObj.end_time ) - npt2seconds( rObj.start_time );
117117 }else{
118 - //provide a default duration if none set
 118+ //provide a default duration if none set
119119 clipConfig['dur'] = 4;
120 - }
121 -
122 - //create the media element (target order+1 (since we insert (after)
123 - _this.pSeq.plObj.tryAddMediaObj( clipConfig, (parseInt(target_order) + 1) );
124 - //refresh the timeline:
 120+ }
 121+
 122+ //create the media element (target order+1 (since we insert (after)
 123+ _this.pSeq.plObj.tryAddMediaObj( clipConfig, (parseInt(target_order) + 1) );
 124+ //refresh the timeline:
125125 _this.pSeq.do_refresh_timeline();
126 - js_log("run close all: ");
 126+ js_log("run close all: ");
127127 _this.closeAll();
128128 });
129129 },
130130 getClipEditControlActions:function(){
131 - var _this = this;
 131+ var _this = this;
132132 return {
133133 'insert_seq':function(rObj){
134134 _this.insertResource( rObj )
@@ -139,26 +139,26 @@
140140 },
141141 resourceEdit:function(rObj, rsdElement){
142142 var _this = this;
143 - //don't resize to default (full screen behavior)
 143+ //don't resize to default (full screen behavior)
144144 _this.dmodalCss = {};
145 - //open up a new target_contaienr:
 145+ //open up a new target_contaienr:
146146 if($j('#seq_resource_import').length == 0)
147147 $j('body').append('<div id="seq_resource_import" style="position:relative"></div>');
148 -
 148+
149149 $j('#seq_resource_import').dialog('destroy').dialog({
150150 bgiframe: true,
151151 width:750,
152152 height:480,
153153 modal: true,
154 - buttons: {
155 - "Cancel": function() {
156 - $j(this).dialog("close");
157 - }
 154+ buttons: {
 155+ "Cancel": function() {
 156+ $j(this).dialog("close");
 157+ }
158158 }
159159 });
160 - _this.target_container = '#seq_resource_import';
 160+ _this.target_container = '#seq_resource_import';
161161 //do parent resource edit (with updated target)
162 - this.parent_resourceEdit(rObj, rsdElement);
 162+ this.parent_resourceEdit(rObj, rsdElement);
163163 },
164164 closeAll:function(){
165165 js_log( 'should close: seq_resource_import');
@@ -174,6 +174,6 @@
175175 },
176176 cancelClipEditCB:function(){
177177 js_log('seqRSD:cancelClipEditCB');
178 - $j('#seq_resource_import').dialog('close').dialog('destroy').remove();
 178+ $j('#seq_resource_import').dialog('close').dialog('destroy').remove();
179179 }
180 -};
\ No newline at end of file
 180+};
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -723,7 +723,7 @@
724724 form_txt = res.form_txt;
725725 }
726726 js_log( 'error text is: ' + result_txt );
727 - $j( '#dlbox-centered' ).html( '<h3>' + gM('mv_upload_completed') + '</h3>' + result_txt + '<br>' + form_txt);
 727+ $j( '#dlbox-centered' ).html( '<h3>' + gM('mwe-upload_completed') + '</h3>' + result_txt + '<br>' + form_txt);
728728 }
729729 }
730730 };
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -8,45 +8,44 @@
99 and archive.org
1010 */
1111 loadGM({
12 - "add_media_wizard" : "Add media wizard",
13 - "mv_media_search" : "Media search",
 12+ "mwe-add_media_wizard" : "Add media wizard",
 13+ "mwe-media_search" : "Media search",
1414 "rsd_box_layout" : "Box layout",
1515 "rsd_list_layout" : "List layout",
1616 "rsd_results_desc" : "Results",
1717 "rsd_results_next" : "next",
1818 "rsd_results_prev" : "previous",
1919 "rsd_no_results" : "No search results for <b>$1<\/b>",
20 - "upload_tab" : "Upload",
 20+ "mwe-upload_tab" : "Upload",
2121 "rsd_layout" : "Layout : ",
2222 "rsd_resource_edit" : "Edit resource : $1",
23 - "resource_description_page" : "Resource description page",
 23+ "mwe-resource_description_page" : "Resource description page",
2424 "rsd_local_resource_title" : "Local resource title",
2525 "rsd_do_insert" : "Do insert",
26 - "cc_title" : "Creative Commons",
27 - "cc_by_title" : "Attribution",
28 - "cc_nc_title" : "Noncommercial",
29 - "cc_nd_title" : "No Derivative Works",
30 - "cc_sa_title" : "Share Alike",
31 - "cc_pd_title" : "Public Domain",
32 - "unknown_license" : "Unknown license",
33 - "no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<\/p><p>Do you need to login?<\/p><p>If permissions are set, you may have to enable $wgAllowCopyUploads (<a href=\"http : \/\/www.mediawiki.org\/wiki\/Manual : $wgAllowCopyUploads\">more information<\/a>).<\/p>",
34 - "results_from" : "Results from <a href=\"$1\" target=\"_new\" >$2<\/a>",
35 - "missing_desc_see_soruce" : "This asset is missing a description. Please see the [$1 orginal source] and help describe it.",
 26+ "mwe-cc_title" : "Creative Commons",
 27+ "mwe-cc_by_title" : "Attribution",
 28+ "mwe-cc_nc_title" : "Noncommercial",
 29+ "mwe-cc_nd_title" : "No Derivative Works",
 30+ "mwe-cc_sa_title" : "Share Alike",
 31+ "mwe-cc_pd_title" : "Public Domain",
 32+ "mwe-unknown_license" : "Unknown license",
 33+ "mwe-no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<\/p><p>Do you need to login?<\/p><p>If permissions are set, you may have to enable $wgAllowCopyUploads (<a href=\"http : \/\/www.mediawiki.org\/wiki\/Manual : $wgAllowCopyUploads\">more information<\/a>).<\/p>",
 34+ "mwe-results_from" : "Results from <a href=\"$1\" target=\"_new\" >$2<\/a>",
 35+ "mwe-missing_desc_see_source" : "This asset is missing a description. Please see the [$1 orginal source] and help describe it.",
3636 "rsd_config_error" : "Add media wizard configuration error : $1",
37 - "uploaded_itmes" : "Uploaded Items:",
38 -
39 - "your_recent_uploads" : "Your Recent Uploads",
40 - "upload_a_file": "Upload a New File",
41 -
42 - "resource_page_desc":"Resource Page Description:",
43 - "edit_resource_desc": "Edit WikiText Resource Description:",
44 - "local_resource_title": "Local Resource Title:",
45 - "watch_this_page": "Watch this page",
46 - "do_import_resource": "Do Import Resource",
47 - "update_preview": "Update Preview",
48 - "cancel_import": "Cancel Import",
49 - "importing_asset" : "Importing Asset",
50 - "preview_insert_resource": "Preview Insert of Resource: $1"
 37+
 38+ "mwe-your_recent_uploads" : "Your recent uploads",
 39+ "mwe-upload_a_file": "Upload a new file",
 40+
 41+ "mwe-resource_page_desc":"Resource page description:",
 42+ "mwe-edit_resource_desc": "Edit wiki text resource description:",
 43+ "mwe-local_resource_title": "Local resource title:",
 44+ "mwe-watch_this_page": "Watch this page",
 45+ "mwe-do_import_resource": "Import resource",
 46+ "mwe-update_preview": "Update preview",
 47+ "mwe-cancel_import": "Cancel import",
 48+ "mwe-importing_asset" : "Importing asset",
 49+ "mwe-preview_insert_resource": "Preview insert of resource: $1"
5150 });
5251 var default_remote_search_options = {
5352 'profile':'mediawiki_edit',
@@ -111,7 +110,7 @@
112111 *
113112 * (should be note that special tabs like "upload" and "combined" don't go into the content proviers list:
114113 * @note do not use double underscore in content providers names (used for id lookup)
115 - *
 114+ *
116115 * @@todo we will want to load more per user-preference and per category lookup
117116 */
118117 content_providers:{
@@ -147,7 +146,7 @@
148147 'lib' : 'mediaWiki',
149148 'local' : true,
150149 'tab_img': false
151 - },
 150+ },
152151 'wiki_commons':{
153152 'enabled': 1,
154153 'checked': 1,
@@ -271,12 +270,12 @@
272271 return js_error('could not find:' + license_key);
273272 //set the current license pointer:
274273 var cl = this.licenses.cc;
275 - var title = gM('cc_title');
 274+ var title = gM('mwe-cc_title');
276275 var imgs = '';
277276 var license_set = license_key.split('-');
278277 for(var i=0;i < license_set.length; i++){
279278 lkey = license_set[i];
280 - title += ' ' + gM( 'cc_' + lkey + '_title');
 279+ title += ' ' + gM( 'mwe-cc_' + lkey + '_title');
281280 imgs +='<img class="license_desc" width="20" src="' + cl.base_img_url +
282281 cl.license_img[ lkey ].im + '">';
283282 }
@@ -302,10 +301,10 @@
303302 return this.getLicenceFromKey( i , license_url);
304303 }
305304 }
306 - //could not find it return unknown_license
 305+ //could not find it return mwe-unknown_license
307306 return {
308 - 'title' : gM('unknown_license'),
309 - 'img_html' : '<span>' + gM('unknown_license') + '</span>',
 307+ 'title' : gM('mwe-unknown_license'),
 308+ 'img_html' : '<span>' + gM('mwe-unknown_license') + '</span>',
310309 'lurl' : license_url
311310 };
312311 },
@@ -372,7 +371,7 @@
373372 js_log("RemoteSearchDriver:: no target invocation provided (will have to run your own doInitDisplay() )");
374373 }else{
375374 if(this.target_invocation){
376 - $j(this.target_invocation).css('cursor','pointer').attr('title', gM('add_media_wizard')).click(function(){
 375+ $j(this.target_invocation).css('cursor','pointer').attr('title', gM('mwe-add_media_wizard')).click(function(){
377376 _this.doInitDisplay();
378377 });
379378 }
@@ -443,7 +442,7 @@
444443 var _this = this;
445444 //add the parent target_container if not provided or missing
446445 if(!_this.target_container || $j(_this.target_container).length==0){
447 - $j('body').append('<div id="rsd_modal_target" style="position:absolute;top:30px;left:0px;bottom:45px;right:0px;" title="' + gM('add_media_wizard') + '" ></div>');
 446+ $j('body').append('<div id="rsd_modal_target" style="position:absolute;top:30px;left:0px;bottom:45px;right:0px;" title="' + gM('mwe-add_media_wizard') + '" ></div>');
448447 _this.target_container = '#rsd_modal_target';
449448 //js_log('appended: #rsd_modal_target' + $j(_this.target_container).attr('id'));
450449 //js_log('added target id:' + $j(_this.target_container).attr('id'));
@@ -521,7 +520,7 @@
522521 '<form id="rsd_form" action="javascript:return false;" method="GET">'+
523522 '<input class="ui-widget-content ui-corner-all" type="text" tabindex="1" value="' + dq + '" maxlength="512" id="rsd_q" name="rsd_q" '+
524523 'size="20" autocomplete="off"/> '+
525 - $j.btnHtml( gM('mv_media_search'), 'rms_search_button', 'search') +
 524+ $j.btnHtml( gM('mwe-media_search'), 'rms_search_button', 'search') +
526525 '</form>';
527526 //close up the control container:
528527 o+='</div>';
@@ -574,7 +573,7 @@
575574 //set it to loading:
576575 mv_set_loading('#tab-upload');
577576 //do things async to keep interface snapy
578 - setTimeout(function(){
 577+ setTimeout(function(){
579578 //do config variable reality checks:
580579 if( _this.upload_api_target == 'local' ){
581580 if( ! _this.local_wiki_api_url ){
@@ -593,46 +592,46 @@
594593 //set the form action based on domain:
595594 if( parseUri( document.URL ).host == parseUri( _this.upload_api_target ).host ){
596595 mvJsLoader.doLoad(['$j.fn.simpleUploadForm'],function(){
597 -
 596+
598597 //get extened info about the file
599598 var cp = _this.content_providers['this_wiki'];
600599 //check for "this_wiki" enabled
601600 if(!cp.enabled){
602601 $j('#tab-upload').html('error this_wiki not enabled (can\'t get uploaded file info)');
603602 return false;
604 - }
605 -
 603+ }
 604+
606605 //load this_wiki search system to grab the rObj
607606 _this.loadSearchLib(cp, function(){
608607 //do basic layout form on left upload "bin" on right
609608 $j('#tab-upload').html('<table cellspacing="10">' +
610609 '<tr>' +
611610 '<td valign="top" style="width:350px;">' +
612 - '<h4>' + gM('upload_a_file') + '</h4>' +
613 - '<div id="upload_form">' +
 611+ '<h4>' + gM('mwe-upload_a_file') + '</h4>' +
 612+ '<div id="upload_form">' +
614613 mv_get_loading_img() +
615614 '</div>' +
616615 '</td>' +
617616 '<td valign="top" id="upload_bin_cnt">' +
618 - '<h4>' + gM('your_recent_uploads') + '</h4>' +
 617+ '<h4>' + gM('mwe-your_recent_uploads') + '</h4>' +
619618 '<div id="upload_bin">' +
620619 mv_get_loading_img() +
621620 '</div>'+
622621 '</td>' +
623622 '</tr>' +
624623 '</table>');
625 -
626 -
 624+
 625+
627626 //fill in the user page:
628627 if(typeof wgUserName != 'undefined' && wgUserName){
629 - //load the upload bin with anything the current user has uploaded
 628+ //load the upload bin with anything the current user has uploaded
630629 cp.sObj.getUserRecentUploads( wgUserName, function(){
631630 _this.drawOutputResults();
632 - });
633 - }else{
634 - $j('#upload_bin_cnt').empty();
635 - }
636 -
 631+ });
 632+ }else{
 633+ $j('#upload_bin_cnt').empty();
 634+ }
 635+
637636 //deal with the api form upload form directly:
638637 $j('#upload_form').simpleUploadForm({
639638 "api_target" : _this.upload_api_target ,
@@ -642,14 +641,14 @@
643642 $j( _this.target_container ).append('<div id="temp_edit_loader" '+
644643 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
645644 mv_get_loading_img('position:absolute;top:30px;left:30px') +
646 - '</div>');
 645+ '</div>');
647646 cp.sObj.addByTitle( wTitle, function( rObj ){
648647 $j( _this.target_container ).find('#temp_edit_loader').remove();
649 - //redraw (with added result if new)
650 - _this.drawOutputResults();
651 - //pull up recource editor:
 648+ //redraw (with added result if new)
 649+ _this.drawOutputResults();
 650+ //pull up recource editor:
652651 _this.resourceEdit( rObj, $j('#res_upload_' + rObj.id).get(0) );
653 - });
 652+ });
654653 //return false to close progress window:
655654 return false;
656655 }
@@ -807,18 +806,18 @@
808807 //combined results are harder to error handle just ignore that repo
809808 cp.sObj.loading = false;
810809 }else{
811 - $j('#tab-' + this.disp_item).html( '<div style="padding:10px">'+ gM('no_import_by_url') +'</div>');
 810+ $j('#tab-' + this.disp_item).html( '<div style="padding:10px">'+ gM('mwe-no_import_by_url') +'</div>');
812811 }
813812 return false;
814 - }
 813+ }
815814 _this.loadSearchLib(cp, function(){
816815 //do search
817816 cp.sObj.getSearchResults();
818817 _this.checkResultsDone();
819 - });
 818+ });
820819 },
821820 loadSearchLib:function(cp, callback){
822 - var _this = this;
 821+ var _this = this;
823822 //set up the library req:
824823 mvJsLoader.doLoad( [
825824 'baseRemoteSearch',
@@ -891,7 +890,7 @@
892891 }
893892 //do an upload tab if enabled:
894893 if( this.enable_upload_tab ){
895 - o+='<li class="rsd_cp_tab" ><a id="rsd_tab_upload" href="#tab-upload">' + gM('upload_tab') + '</a></li>';
 894+ o+='<li class="rsd_cp_tab" ><a id="rsd_tab_upload" href="#tab-upload">' + gM('mwe-upload_tab') + '</a></li>';
896895 tabc+='<div id="tab-upload" />';
897896 if(this.disp_item == 'upload')
898897 selected_tab = inx++;
@@ -945,20 +944,20 @@
946945 //@@todo we could load the id with the content provider id to find the object faster...
947946 getResourceFromId:function( rid ){
948947 js_log('getResourceFromId:' + rid );
949 - //strip out /res/ if preset:
 948+ //strip out /res/ if preset:
950949 rid = rid.replace(/res_/, '');
951950 //js_log("looking at: " + rid);
952 - p = rid.split('__');
 951+ p = rid.split('__');
953952 var cp_id = p[0];
954 - var rid = p[1];
955 -
 953+ var rid = p[1];
 954+
956955 if(cp_id == 'upload')
957956 cp_id = 'this_wiki';
958 -
 957+
959958 var cp = this.content_providers[cp_id];
960959 if(cp && cp['sObj'] && cp.sObj.resultsObj[rid]){
961960 return cp.sObj.resultsObj[rid];
962 - }
 961+ }
963962 js_log("ERROR: could not find " + rid);
964963 return false;
965964 },
@@ -966,15 +965,15 @@
967966 js_log('f:drawOutputResults::' + this.disp_item);
968967 var _this = this;
969968 var o='';
970 -
 969+
971970 var cp_id = this.disp_item;
972971 var tab_target = '';
973972 if(this.disp_item == 'upload'){
974973 tab_target = '#upload_bin';
975974 var cp = this.content_providers['this_wiki'];
976 - }else{
 975+ }else{
977976 var cp = this.content_providers[this.disp_item];
978 - tab_target = '#tab-' + cp_id;
 977+ tab_target = '#tab-' + cp_id;
979978 }
980979 //empty the existing results:
981980 $j(tab_target).empty();
@@ -1002,7 +1001,7 @@
10031002 //add a linkback to resource page in upper right:
10041003 if( rItem.link )
10051004 o+='<a target="_new" style="position:absolute;top:0px;right:0px" title="' +
1006 - gM('resource_description_page') +
 1005+ gM('mwe-resource_description_page') +
10071006 '" href="' + rItem.link + '"><img src="http://upload.wikimedia.org/wikipedia/commons/6/6b/Magnify-clip.png"></a>';
10081007 //add license icons if present
10091008 if( rItem.license )
@@ -1064,10 +1063,10 @@
10651064 addResourceEditLoader:function(maxWidth, overflow_style){
10661065 var _this = this;
10671066 if(!maxWidth)maxWidth=400;
1068 - if(!overflow_style)overflow_style='overflow:auto;';
1069 - //remove any old instance:
 1067+ if(!overflow_style)overflow_style='overflow:auto;';
 1068+ //remove any old instance:
10701069 $j( _this.target_container ).find('#rsd_resource_edit').remove();
1071 - //add the edit layout window with loading place holders
 1070+ //add the edit layout window with loading place holders
10721071 $j( _this.target_container ).append('<div id="rsd_resource_edit" '+
10731072 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
10741073 '<div id="clip_edit_disp" style="position:absolute;' + overflow_style + 'width:100%;height:100%;padding:5px;'+
@@ -1103,7 +1102,7 @@
11041103 //append to the top level of model window:
11051104 _this.addResourceEditLoader(maxWidth, overflow_style);
11061105 //update add media wizard title:
1107 - $j( _this.target_container ).dialog( 'option', 'title', gM('add_media_wizard')+': '+ gM('rsd_resource_edit', rObj.title ) );
 1106+ $j( _this.target_container ).dialog( 'option', 'title', gM('mwe-add_media_wizard')+': '+ gM('rsd_resource_edit', rObj.title ) );
11081107 js_log('did append to: '+ _this.target_container );
11091108
11101109 $j('#rsd_resource_edit').css('opacity',0);
@@ -1133,8 +1132,8 @@
11341133 'left':'5px',
11351134 'width': maxWidth + 'px',
11361135 'height': parseInt( tRatio * maxWidth) + 'px'
1137 - }, "slow"); // do it slow to give it a chance to finish loading the HQ version
1138 -
 1136+ }, "slow"); // do it slow to give it a chance to finish loading the HQ version
 1137+
11391138 if( mediaType == 'image' ){
11401139 _this.loadHQImg(rObj, {'width':maxWidth}, 'rsd_edit_img', function(){
11411140 $j('.mv_loading_img').remove();
@@ -1160,7 +1159,7 @@
11611160 rObj['width'] = imObj.width;
11621161 rObj['height'] = imObj.height;
11631162
1164 - //see if we need to animate some transition
 1163+ //see if we need to animate some transition
11651164 if( size.width != imObj.width ){
11661165 js_log('loadHQImg:size mismatch: ' + size.width + ' != ' + imObj.width );
11671166 //set the target id to the new size:
@@ -1188,10 +1187,10 @@
11891188 var _this = this;
11901189 var b_target = _this.target_container + '~ .ui-dialog-buttonpane';
11911190 $j('#rsd_resource_edit').remove();
1192 - //restore the resource container:
 1191+ //restore the resource container:
11931192 $j('#rsd_results_container').show();
11941193 //restore the title:
1195 - $j( _this.target_container ).dialog( 'option', 'title', gM('add_media_wizard'));
 1194+ $j( _this.target_container ).dialog( 'option', 'title', gM('mwe-add_media_wizard'));
11961195 js_log("should update: " + b_target + ' with: cancel');
11971196 //restore the buttons:
11981197 $j(b_target).html( $j.btnHtml( 'Cancel' , 'mv_cancel_rsd', 'close'))
@@ -1346,7 +1345,7 @@
13471346 if( rObj.desc ){
13481347 wt += '|Description= ' + rObj.desc + "\n";
13491348 }else{
1350 - wt += '|Description= ' + gM('missing_desc_see_soruce', rObj.link ) + "\n";
 1349+ wt += '|Description= ' + gM('mwe-missing_desc_see_source', rObj.link ) + "\n";
13511350 }
13521351
13531352 //output search specific info
@@ -1365,13 +1364,13 @@
13661365 wt+='|other_versions=' + rObj.other_versions + "\n";
13671366
13681367 wt+='}}';
1369 -
 1368+
13701369 //get any extra categories or helpful links
13711370 wt+= rObj.pSobj.getExtraResourceDescWiki( rObj );
13721371
13731372
13741373 $j('#rsd_resource_import').remove();//remove any old resource imports
1375 -
 1374+
13761375 //@@ show user dialog to import the resource
13771376 $j( _this.target_container ).append('<div id="rsd_resource_import" '+
13781377 'class="ui-state-highlight ui-widget-content ui-state-error" ' +
@@ -1380,27 +1379,27 @@
13811380 '<div id="rsd_preview_import_container" style="position:absolute;width:50%;bottom:0px;left:0px;overflow:auto;top:30px;">' +
13821381 rObj.pSobj.getEmbedHTML( rObj, {'id': _this.target_container + '_rsd_pv_vid', 'max_height':'200','only_poster':true} )+ //get embedHTML with small thumb:
13831382 '<br style="clear both">'+
1384 - '<strong>'+gM('resource_page_desc') +'</strong>'+
 1383+ '<strong>'+gM('mwe-resource_page_desc') +'</strong>'+
13851384 '<div id="rsd_import_desc" syle="display:inline;">'+
13861385 mv_get_loading_img('position:absolute;top:5px;left:5px') +
13871386 '</div>'+
13881387 '</div>'+
13891388 '<div id="rds_edit_import_container" style="position:absolute;left:50%;' +
13901389 'bottom:0px;top:30px;right:0px;overflow:auto;">'+
1391 - '<strong>' + gM('local_resource_title') + '</strong><br>'+
 1390+ '<strong>' + gM('mwe-local_resource_title') + '</strong><br>'+
13921391 '<input type="text" size="30" value="' + rObj.target_resource_title + '" readonly="true"><br>'+
1393 - '<strong>' + gM('edit_resource_desc') + '</strong>' +
 1392+ '<strong>' + gM('mwe-edit_resource_desc') + '</strong>' +
13941393 '<textarea id="rsd_import_ta" id="mv_img_desc" style="width:90%;" rows="8" cols="50">' +
13951394 wt +
13961395 '</textarea><br>' +
13971396 '<input type="checkbox" value="true" id="wpWatchthis" name="wpWatchthis" tabindex="7"/>' +
1398 - '<label for="wpWatchthis">'+gM('watch_this_page')+'</label><br><br><br>' +
 1397+ '<label for="wpWatchthis">'+gM('mwe-watch_this_page')+'</label><br><br><br>' +
13991398
1400 - $j.btnHtml(gM('do_import_resource'), 'rsd_import_doimport', 'check' ) + ' ' +
 1399+ $j.btnHtml(gM('mwe-do_import_resource'), 'rsd_import_doimport', 'check' ) + ' ' +
14011400
1402 - $j.btnHtml(gM('update_preview'), 'rsd_import_apreview', 'refresh' ) + '<div style="clear:both;height:20px;"/>' +
 1401+ $j.btnHtml(gM('mwe-update_preview'), 'rsd_import_apreview', 'refresh' ) + '<div style="clear:both;height:20px;"/>' +
14031402
1404 - $j.btnHtml(gM('cancel_import'), 'rsd_import_acancel', 'close' ) + ' ' +
 1403+ $j.btnHtml(gM('mwe-cancel_import'), 'rsd_import_acancel', 'close' ) + ' ' +
14051404
14061405 '</div>'+
14071406 //output the rendered and non-renderd version of description for easy swiching:
@@ -1536,7 +1535,7 @@
15371536 'style="position:absolute;top:0px;'+
15381537 'left:0px;width:100%;height:100%;'+
15391538 'z-index:5;background:#FFF;overflow:auto;">'+
1540 - '<div style="position:absolute;left:30%;right:30%"><h3>'+gM('importing_asset')+'</h3><br>' +
 1539+ '<div style="position:absolute;left:30%;right:30%"><h3>'+gM('mwe-importing_asset')+'</h3><br>' +
15411540 mv_get_loading_img('','mv_loading_bar_img') +
15421541 '</div>'+
15431542 '</div>'
@@ -1568,7 +1567,7 @@
15691568 js_log( 'error text is: ' + error_txt );
15701569 $j( '#rsd_resource_import' ).html( '<h3>Error</h3>' + error_txt + '<br>' + form_txt +
15711570 '<br>'+
1572 - '<a href="#" id="rsd_import_error" >' + gM('cancel_import') + '</a>'
 1571+ '<a href="#" id="rsd_import_error" >' + gM('mwe-cancel_import') + '</a>'
15731572 );
15741573 //set up cancel action:
15751574 $j('#rsd_import_error').click(function(){
@@ -1591,12 +1590,12 @@
15921591 'style="position:absolute;overflow:hidden;z-index:4;top:0px;bottom:75px;right:0px;left:0px;background-color:#FFF;">' +
15931592 mv_get_loading_img('top:30px;left:30px') +
15941593 '</div>');
1595 -
 1594+
15961595 var bPlaneTarget = _this.target_container +'~ .ui-dialog-buttonpane';
15971596 var pTitle = $j( _this.target_container ).dialog('option', 'title');
15981597
15991598 //update title:
1600 - $j( _this.target_container ).dialog('option', 'title', gM('preview_insert_resource', rObj.title) );
 1599+ $j( _this.target_container ).dialog('option', 'title', gM('mwe-preview_insert_resource', rObj.title) );
16011600
16021601 //update buttons preview:
16031602 $j(bPlaneTarget).html( $j.btnHtml( gM('rsd_do_insert'), 'preview_do_insert', 'check') + ' ' )
@@ -1675,7 +1674,7 @@
16761675 //update if its video or audio:
16771676 if( rObj.mime.indexOf('audio')!=-1 ||
16781677 rObj.mime.indexOf('video')!=-1 ||
1679 - rObj.mime.indexOf('/ogg') !=-1){
 1678+ rObj.mime.indexOf('/ogg') !=-1){
16801679 mvJsLoader.embedVideoCheck(function(){
16811680 mv_video_embed();
16821681 });
@@ -1701,7 +1700,7 @@
17021701 if( this.content_providers[this.disp_item] ){
17031702 var cp = this.content_providers[this.disp_item];
17041703 about_desc ='<span style="position:relative;top:0px;font-style:italic;">' +
1705 - '<i>' + gM('results_from', [cp.homepage, cp.title]) + '</i></span>';
 1704+ '<i>' + gM('mwe-results_from', [cp.homepage, cp.title]) + '</i></span>';
17061705 $j('#tab-'+this.disp_item).append( '<div id="rds_results_bar">'+
17071706 '<span style="float:left;top:0px;font-style:italic;">'+
17081707 gM('rsd_layout')+' '+
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvTimedEffectsEdit.js
@@ -7,15 +7,14 @@
88
99 //add our local msgs
1010 loadGM({
11 - "transition_in" : "Transition in",
12 - "transition_out" : "Transition out",
13 - "effects" : "Effects stack",
14 - "remove_transition" : "Remove transition",
15 - "edit_transin" : "Edit transition into clip",
16 - "edit_transout" : "Edit transition out of clip"
 11+ "mwe-transition_in" : "Transition in",
 12+ "mwe-transition_out" : "Transition out",
 13+ "mwe-effects" : "Effects stack",
 14+ "mwe-remove_transition" : "Remove transition",
 15+ "mwe-edit_transin" : "Edit transition into clip",
 16+ "mwe-edit_transout" : "Edit transition out of clip"
1717 });
1818
19 -
2019 var default_timed_effect_values = {
2120 'rObj': null, // the resource object
2221 'clip_disp_ct':null, //target clip disp
@@ -35,21 +34,21 @@
3635 //the menu_items Object contains: default html, js setup/loader functions
3736 menu_items : {
3837 'transin':{
39 - 'title':gM('transition_in'),
 38+ 'title':gM('mwe-transition_in'),
4039 'clip_attr':'transIn',
4140 'doEdit':function(_this){
4241 _this.doTransitionDisplayEdit('transin');
4342 }
4443 },
4544 'transout':{
46 - 'title':gM('transition_out'),
 45+ 'title':gM('mwe-transition_out'),
4746 'clip_attr':'transOut',
4847 'doEdit':function(_this){
4948 _this.doTransitionDisplayEdit('transout');
5049 }
5150 },
5251 'effects':{
53 - 'title':gM('effects'),
 52+ 'title':gM('mwe-effects'),
5453 'clip_attr':'Effects',
5554 'doEdit':function(_this){
5655 //display
@@ -126,7 +125,7 @@
127126 var _this = this;
128127 var appendTarget = '#te_effects';
129128 js_log('type:' + _this.rObj['type']);
130 - $j(appendTarget).html(gM('loading_txt'));
 129+ $j(appendTarget).html(gM('mwe-loading_txt'));
131130 //@@todo integrate into core and loading system:
132131 loadExternalJs(mv_embed_path + 'libClipEdit/pixastic-editor/editor.js?' + getMvUniqueReqId() );
133132 loadExternalJs(mv_embed_path + 'libClipEdit/pixastic-editor/pixastic.all.js?' + getMvUniqueReqId() );
@@ -159,7 +158,7 @@
160159 return ;
161160 }
162161 var cTran = this.rObj[ this.menu_items[ target_item ].clip_attr ];
163 - var o='<h3>' + gM('edit_'+target_item ) + '</h3>';
 162+ var o='<h3>' + gM('mwe-edit_'+target_item ) + '</h3>';
164163 o+='Type: ' +
165164 '<select class="te_select_type">';
166165 for(var typeKey in mvTransLib.type){
@@ -180,7 +179,7 @@
181180 _this.getSubTypeControl( target_item, cTran.type, apendTarget + ' .te_subtype_container' );
182181
183182 //add remove transition button:
184 - $j(apendTarget).append( '<br><br>' + $j.btnHtml(gM('remove_transition'), 'te_remove_transition', 'close' ) )
 183+ $j(apendTarget).append( '<br><br>' + $j.btnHtml(gM('mwe-remove_transition'), 'te_remove_transition', 'close' ) )
185184 .children('.te_remove_transition')
186185 .click(function(){
187186 //remove the transtion from the playlist
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -19,40 +19,40 @@
2020 */
2121
2222 loadGM({
23 - "menu_clipedit" : "Edit media",
24 - "menu_transition" : "Transitions and effects",
25 - "menu_cliplib" : "Add media",
26 - "menu_resource_overview" : "Resource overview",
27 - "menu_options" : "Options",
28 - "loading_timeline" : "Loading timeline <blink>...<\/blink>",
29 - "loading_user_rights" : "Loading user rights <blink>...<\/blink>",
30 - "no_edit_permissions" : "You do not have permissions to save changes to this sequence",
31 - "edit_clip" : "Edit clip",
32 - "edit_save" : "Save sequence changes",
33 - "saving_wait" : "Save in progress (please wait)",
34 - "save_done" : "Save complete",
35 - "edit_cancel" : "Cancel sequence edit",
36 - "edit_cancel_confirm" : "Are you sure you want to cancel your edit? Changes will be lost.",
37 - "zoom_in" : "Zoom in",
38 - "zoom_out" : "Zoom out",
39 - "cut_clip" : "Cut clips",
40 - "expand_track" : "Expand track",
41 - "colapse_track" : "Collapse track",
42 - "play_from_position" : "Play from playline position",
43 - "pixle2sec" : "pixles to seconds",
44 - "rmclip" : "Remove clip",
45 - "clip_in" : "clip in",
46 - "clip_out" : "clip out",
47 - "mv_welcome_to_sequencer" : "<h3>Welcome to the sequencer demo<\/h3> Very <b>limited<\/b> functionality right now. Not much documentation yet either.",
48 - "no_selected_resource" : "<h3>No resource selected<\/h3> Select a clip to enable editing.",
49 - "error_edit_multiple" : "<h3>Multiple resources selected<\/h3> Select a single clip to edit it.",
50 - "mv_editor_options" : "Editor options",
51 - "mv_editor_mode" : "Editor mode",
52 - "mv_simple_editor_desc" : "simple editor (iMovie style)",
53 - "mv_advanced_editor_desc" : "advanced editor (Final Cut style)",
54 - "mv_other_options" : "Other options",
55 - "mv_contextmenu_opt" : "Enable context menus",
56 - "mv_sequencer_credit_line" : "Developed by <a href=\"http:\/\/kaltura.com\">Kaltura, Inc.<\/a> in partnership with the <a href=\"http:\/\/wikimediafoundation.org\/wiki\/Home\">Wikimedia Foundation<\/a> (<a href=\"#\">more information<\/a>)."
 23+ "mwe-menu_clipedit" : "Edit media",
 24+ "mwe-menu_transition" : "Transitions and effects",
 25+ "mwe-menu_cliplib" : "Add media",
 26+ "mwe-menu_resource_overview" : "Resource overview",
 27+ "mwe-menu_options" : "Options",
 28+ "mwe-loading_timeline" : "Loading timeline <blink>...<\/blink>",
 29+ "mwe-loading_user_rights" : "Loading user rights <blink>...<\/blink>",
 30+ "mwe-no_edit_permissions" : "You do not have permissions to save changes to this sequence",
 31+ "mwe-edit_clip" : "Edit clip",
 32+ "mwe-edit_save" : "Save sequence changes",
 33+ "mwe-saving_wait" : "Save in progress (please wait)",
 34+ "mwe-save_done" : "Save complete",
 35+ "mwe-edit_cancel" : "Cancel sequence edit",
 36+ "mwe-edit_cancel_confirm" : "Are you sure you want to cancel your edit? Changes will be lost.",
 37+ "mwe-zoom_in" : "Zoom in",
 38+ "mwe-zoom_out" : "Zoom out",
 39+ "mwe-cut_clip" : "Cut clips",
 40+ "mwe-expand_track" : "Expand track",
 41+ "mwe-collapse_track" : "Collapse track",
 42+ "mwe-play_from_position" : "Play from playline position",
 43+ "mwe-pixle2sec" : "pixels to seconds",
 44+ "mwe-rmclip" : "Remove clip",
 45+ "mwe-clip_in" : "clip in",
 46+ "mwe-clip_out" : "clip out",
 47+ "mwe-welcome_to_sequencer" : "<h3>Welcome to the sequencer demo<\/h3> Very <b>limited<\/b> functionality right now. Not much documentation yet either.",
 48+ "mwe-no_selected_resource" : "<h3>No resource selected<\/h3> Select a clip to enable editing.",
 49+ "mwe-error_edit_multiple" : "<h3>Multiple resources selected<\/h3> Select a single clip to edit it.",
 50+ "mwe-editor_options" : "Editor options",
 51+ "mwe-editor_mode" : "Editor mode",
 52+ "mwe-simple_editor_desc" : "simple editor (iMovie style)",
 53+ "mwe-advanced_editor_desc" : "advanced editor (Final Cut style)",
 54+ "mwe-other_options" : "Other options",
 55+ "mwe-contextmenu_opt" : "Enable context menus",
 56+ "mwe-sequencer_credit_line" : "Developed by <a href=\"http:\/\/kaltura.com\">Kaltura, Inc.<\/a> in partnership with the <a href=\"http:\/\/wikimediafoundation.org\/wiki\/Home\">Wikimedia Foundation<\/a> (<a href=\"#\">more information<\/a>)."
5757 });
5858 //used to set default values and validate the passed init object
5959 var sequencerDefaultValues = {
@@ -131,7 +131,7 @@
132132 },
133133 'transition':{
134134 'd':0,
135 - 'html' : '<h3>' + gM('menu_transition') + '</h3>',
 135+ 'html' : '<h3>' + gM('mwe-menu_transition') + '</h3>',
136136 'js':function(this_seq){
137137 this_seq.doEditTransitionSelectedClip();
138138 },
@@ -156,15 +156,15 @@
157157 },
158158 'options':{
159159 'd':0,
160 - 'html' : '<h3>' + gM('menu_options') + '</h3>' +
161 - gM('mv_editor_mode') + '<br> ' +
 160+ 'html' : '<h3>' + gM('mwe-menu_options') + '</h3>' +
 161+ gM('mwe-editor_mode') + '<br> ' +
162162 '<blockquote><input type="radio" value="simple_editor" name="opt_editor">' +
163 - gM('mv_simple_editor_desc') + ' </blockquote>' +
 163+ gM('mwe-simple_editor_desc') + ' </blockquote>' +
164164 '<blockquote><input type="radio" value="advanced_editor" name="opt_editor">' +
165 - gM('mv_advanced_editor_desc') + ' </blockquote>'+
166 - gM('mv_other_options') + '<br>' +
 165+ gM('mwe-advanced_editor_desc') + ' </blockquote>'+
 166+ gM('mwe-other_options') + '<br>' +
167167 '<blockquote><input type="checkbox" value="contextmenu_opt" name="contextmenu_opt">' +
168 - gM('mv_contextmenu_opt') + ' </blockquote>',
 168+ gM('mwe-contextmenu_opt') + ' </blockquote>',
169169 'js':function(this_seq){
170170 $j('#options_ic input[value=\'simple_editor\']').attr({
171171 'checked':(this_seq.timeline_mode=='storyboard')?true:false
@@ -216,14 +216,14 @@
217217 'width:' + this.video_width + 'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+
218218 '<div id="' + this.timeline_id + '" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;' +
219219 'left:0px;right:0px;top:'+(this.video_height+34)+'px;bottom:35px;overflow:auto;">'+
220 - gM('loading_timeline')+ '</div>'+
 220+ gM('mwe-loading_timeline')+ '</div>'+
221221 '<div class="seq_status" style="position:absolute;left:0px;width:300px;"></div>'+
222222 '<div class="seq_save_cancel" style="position:absolute;'+
223223 'left:5px;bottom:0px;height:25px;">'+
224 - gM('loading_user_rights') +
 224+ gM('mwe-loading_user_rights') +
225225 '</div>'+
226226 '<div class="about_editor" style="position:absolute;right:5px;bottom:7px;">' +
227 - gM('mv_sequencer_credit_line') +
 227+ gM('mwe-sequencer_credit_line') +
228228 '</div>'+
229229 '<div id="'+this.sequence_tools_id+'" style="position:absolute;' +
230230 'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>'
@@ -266,15 +266,15 @@
267267 var _this = this;
268268 if( this.sequenceEditToken ){
269269 $j(this.target_sequence_container+' .seq_save_cancel').html(
270 - $j.btnHtml( gM('edit_save'), 'seq_edit_save', 'close') + ' ' +
271 - $j.btnHtml( gM('edit_cancel'), 'seq_edit_cancel', 'close')
 270+ $j.btnHtml( gM('mwe-edit_save'), 'seq_edit_save', 'close') + ' ' +
 271+ $j.btnHtml( gM('mwe-edit_cancel'), 'seq_edit_cancel', 'close')
272272 );
273273 }else{
274 - $j(this.target_sequence_container+' .seq_save_cancel').html( cancel_button + gM('no_edit_permissions') );
 274+ $j(this.target_sequence_container+' .seq_save_cancel').html( cancel_button + gM('mwe-no_edit_permissions') );
275275 }
276276 //assing bindings
277277 $j(this.target_sequence_container +' .seq_edit_cancel').unbind().click(function(){
278 - var x = window.confirm( gM('edit_cancel_confirm') );
 278+ var x = window.confirm( gM('mwe-edit_cancel_confirm') );
279279 if( x ){
280280 _this.closeModEditor();
281281 }else{
@@ -285,7 +285,7 @@
286286 //pop up progress dialog ~requesting edit line summary~
287287 //remove any other save dialog
288288 $j('#seq_save_dialog').remove();
289 - $j('body').append('<div id="seq_save_dialog" title="'+ gM('edit_save') +'">' +
 289+ $j('body').append('<div id="seq_save_dialog" title="'+ gM('mwe-edit_save') +'">' +
290290 '<span class="mw-summary">'+
291291 '<label for="seq_save_summary">Edit summary: </label>' +
292292 '</span>'+
@@ -309,7 +309,7 @@
310310 };
311311 //change to progress bar and save:
312312 $j('#seq_save_dialog').html('<div class="progress" /><br>' +
313 - gM('saving_wait')
 313+ gM('mwe-saving_wait')
314314 )
315315 $j('#seq_save_dialog .progress').progressbar({
316316 value: 100
@@ -319,7 +319,7 @@
320320 'data': saveReq,
321321 'url' : _this.getLocalApiUrl()
322322 },function(data){
323 - $j('#seq_save_dialog').html( gM('save_done') );
 323+ $j('#seq_save_dialog').html( gM('mwe-save_done') );
324324 $j('#seq_save_dialog').dialog('option',
325325 'buttons', {
326326 "Done":function(){
@@ -373,16 +373,16 @@
374374 $j('#'+this.timeline_id).html(''+
375375 '<div id="'+this.timeline_id+'_left_cnt" class="mv_tl_left_cnt">'+
376376 '<div id="'+this.timeline_id+'_head_control" style="position:absolute;top:0px;left:0px;right:0px;height:30px;">' +
377 - '<a title="'+gM('play_from_position')+'" href="javascript:'+this.instance_name+'.play_jt()">'+
 377+ '<a title="'+gM('mwe-play_from_position')+'" href="javascript:'+this.instance_name+'.play_jt()">'+
378378 '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/control_play_blue.png">'+
379379 '</a>'+
380 - '<a title="'+gM('zoom_in')+'" href="javascript:'+this.instance_name+'.zoom_in()">'+
 380+ '<a title="'+gM('mwe-zoom_in')+'" href="javascript:'+this.instance_name+'.zoom_in()">'+
381381 '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/zoom_in.png">'+
382382 '</a>'+
383 - '<a title="'+gM('zoom_out')+'" href="javascript:'+this.instance_name+'.zoom_out()">'+
 383+ '<a title="'+gM('mwe-zoom_out')+'" href="javascript:'+this.instance_name+'.zoom_out()">'+
384384 '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/zoom_out.png">'+
385385 '</a>'+
386 - '<a title="'+gM('cut_clip')+'" href="javascript:'+this.instance_name+'.cut_mode()">'+
 386+ '<a title="'+gM('mwe-cut_clip')+'" href="javascript:'+this.instance_name+'.cut_mode()">'+
387387 '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/cut.png">'+
388388 '</a>'+
389389 '</div>' +
@@ -406,13 +406,13 @@
407407 var track_height=60;
408408 var exc_img = 'opened';
409409 var exc_action='close';
410 - var exc_msg = gM('colapse_track');
 410+ var exc_msg = gM('mwe-collapse_track');
411411 break;
412412 case 'text':
413413 var track_height=20;
414414 var exc_img = 'closed';
415415 var exc_action='open';
416 - var exc_msg = gM('expand_track');
 416+ var exc_msg = gM('mwe-expand_track');
417417 break;
418418 }
419419 //add track name:
@@ -555,11 +555,11 @@
556556 }
557557
558558 o+='<li>' +
559 - '<a id="mv_menu_item_'+tab_id+'" href="#' + tab_id + '_ic">'+gM('menu_' + tab_id ) + '</a>' +
 559+ '<a id="mv_menu_item_'+tab_id+'" href="#' + tab_id + '_ic">'+gM('mwe-menu_' + tab_id ) + '</a>' +
560560 '</li>';
561561
562562 tabc += '<div id="' + tab_id + '_ic" style="overflow:auto;height:268px;" >';
563 - tabc += (menu_item.html) ? menu_item.html : '<h3>' + gM('menu_'+tab_id) + '</h3>';
 563+ tabc += (menu_item.html) ? menu_item.html : '<h3>' + gM('mwe-menu_'+tab_id) + '</h3>';
564564 tabc +='</div>';
565565 inx++;
566566 };
@@ -714,10 +714,10 @@
715715 _this.doEditTransition( _this.getClipFromSeqID( $j('.mv_selected_clip').parent().attr('id') ) );
716716 }else if( $j('.mv_selected_clip').length === 0){
717717 //no clip selected warning:
718 - $j('#transition_ic').html( gM('no_selected_resource') );
 718+ $j('#transition_ic').html( gM('mwe-no_selected_resource') );
719719 }else{
720720 //multiple clip selected warning:
721 - $j('#transition_ic').html( gM('error_edit_multiple') );
 721+ $j('#transition_ic').html( gM('mwe-error_edit_multiple') );
722722 }
723723 },
724724 doEditSelectedClip:function(){
@@ -727,10 +727,10 @@
728728 this.doEditClip( this.getClipFromSeqID( $j('.mv_selected_clip').parent().attr('id') ) );
729729 }else if( $j('.mv_selected_clip').length === 0){
730730 //no clip selected warning:
731 - $j('#clipedit_ic').html( gM('no_selected_resource') );
 731+ $j('#clipedit_ic').html( gM('mwe-no_selected_resource') );
732732 }else{
733733 //multiple clip selected warning:
734 - $j('#clipedit_ic').html( gM('error_edit_multiple') );
 734+ $j('#clipedit_ic').html( gM('mwe-error_edit_multiple') );
735735 }
736736 },
737737 doEditTransition:function( cObj ){
@@ -1075,9 +1075,9 @@
10761076 '" class="mv_time_clip_text mv_clip_drag">'+clip.title;
10771077 }
10781078 //add in per clip controls
1079 - track_html+='<div title="'+gM('clip_in')+' '+clip.embed.start_ntp+'" class="ui-resizable-w ui-resizable-handle" style="width: 16px; height: 16px; left: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_contract.png\');" ></div>'+"\n";
1080 - track_html+='<div title="'+gM('clip_out')+' '+clip.embed.end_ntp+'" class="ui-resizable-e ui-resizable-handle" style="width: 16px; height: 16px; right: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_expand.png\');" ></div>'+"\n";
1081 - track_html+='<div title="'+gM('rmclip')+'" onClick="'+this.instance_name + '.removeClips(new Array([' + track_id + ',' + j + ']))" style="position:absolute;cursor:pointer;width: 16px; height: 16px; left: 0px; bottom:2px;background:url(\''+mv_embed_path+'images/delete.png\');"></div>'+"\n";
 1079+ track_html+='<div title="'+gM('mwe-clip_in')+' '+clip.embed.start_ntp+'" class="ui-resizable-w ui-resizable-handle" style="width: 16px; height: 16px; left: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_contract.png\');" ></div>'+"\n";
 1080+ track_html+='<div title="'+gM('mwe-clip_out')+' '+clip.embed.end_ntp+'" class="ui-resizable-e ui-resizable-handle" style="width: 16px; height: 16px; right: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_expand.png\');" ></div>'+"\n";
 1081+ track_html+='<div title="'+gM('mwe-rmclip')+'" onClick="'+this.instance_name + '.removeClips(new Array([' + track_id + ',' + j + ']))" style="position:absolute;cursor:pointer;width: 16px; height: 16px; left: 0px; bottom:2px;background:url(\''+mv_embed_path+'images/delete.png\');"></div>'+"\n";
10821082 track_html+='<span style="display:none;" class="mv_clip_stats"></span>';
10831083
10841084 track_html+='</span>';
Index: trunk/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js
@@ -7,27 +7,27 @@
88 */
99 //set gMsg object:
1010 loadGM({
11 - "mv_crop" : "Crop image",
12 - "mv_apply_crop" : "Apply crop to image",
13 - "mv_reset_crop" : "Reset crop",
14 - "mv_insert_image_page" : "Insert into page",
15 - "mv_insert_into_sequence" : "Insert into sequence",
16 - "mv_preview_insert" : "Preview insert",
17 - "mv_cancel_image_insert" : "Cancel insert",
18 - "sc_fileopts" : "Clip detail edit",
19 - "sc_inoutpoints" : "Set in-out points",
20 - "sc_overlays" : "Overlays",
21 - "sc_audio" : "Audio control",
22 - "sc_duration" : "Duration",
23 - "mv_template_properties" : "Template properties",
24 - "mv_custom_title" : "Custom title",
25 - "mv_edit_properties" : "Edit properties",
26 - "mv_other_properties" : "Other properties",
27 - "mv_resource_page" : "Resource page:",
28 - "mv_set_in_out_points" : "Set in-out points",
29 - "mv_start_time" : "Start time",
30 - "mv_end_time" : "End time",
31 - "mv_preview_inout" : "Preview\/play in-out points"
 11+ "mwe-crop" : "Crop image",
 12+ "mwe-apply_crop" : "Apply crop to image",
 13+ "mwe-reset_crop" : "Reset crop",
 14+ "mwe-insert_image_page" : "Insert into page",
 15+ "mwe-insert_into_sequence" : "Insert into sequence",
 16+ "mwe-preview_insert" : "Preview insert",
 17+ "mwe-cancel_image_insert" : "Cancel insert",
 18+ "mwe-sc_fileopts" : "Clip detail edit",
 19+ "mwe-sc_inoutpoints" : "Set in-out points",
 20+ "mwe-sc_overlays" : "Overlays",
 21+ "mwe-sc_audio" : "Audio control",
 22+ "mwe-sc_duration" : "Duration",
 23+ "mwe-template_properties" : "Template properties",
 24+ "mwe-custom_title" : "Custom title",
 25+ "mwe-edit_properties" : "Edit properties",
 26+ "mwe-other_properties" : "Other properties",
 27+ "mwe-resource_page" : "Resource page:",
 28+ "mwe-set_in_out_points" : "Set in-out points",
 29+ "mwe-start_time" : "Start time",
 30+ "mwe-end_time" : "End time",
 31+ "mwe-preview_inout" : "Preview\/play in-out points"
3232 });
3333
3434 var default_clipedit_values = {
@@ -218,11 +218,11 @@
219219 //add html for rObj resource:
220220 var o= '<table>' +
221221 '<tr>' +
222 - '<td colspan="2"><b>'+gM('mv_edit_properties')+'</b></td>'+
 222+ '<td colspan="2"><b>'+gM('mwe-edit_properties')+'</b></td>'+
223223 '</tr>'+
224224 '<tr>'+
225225 '<td>' +
226 - gM('mv_custom_title') +
 226+ gM('mwe-custom_title') +
227227 '</td>'+
228228 '<td><input type="text" size="15" maxwidth="255" value="';
229229 if(_this.rObj.title != null)
@@ -235,7 +235,7 @@
236236 var testing_a = _this.rObj.tVars;
237237 //debugger;
238238 o+= '<tr>'+
239 - '<td colspan="2"><b>' + gM('mv_template_properties') + '</b></td>'+
 239+ '<td colspan="2"><b>' + gM('mwe-template_properties') + '</b></td>'+
240240 '</tr>';
241241 for(var i =0; i < _this.rObj.tVars.length ; i++){
242242 o+='<tr>'+
@@ -260,11 +260,11 @@
261261 var res_title = parseUri(_this.rObj.src).file;
262262 }
263263 o+= '<tr>'+
264 - '<td colspan="2"><b>'+gM('mv_other_properties')+'</b></td>'+
 264+ '<td colspan="2"><b>'+gM('mwe-other_properties')+'</b></td>'+
265265 '</tr>'+
266266 '<tr>'+
267267 '<td>' +
268 - gM('mv_resource_page') +
 268+ gM('mwe-resource_page') +
269269 '</td>' +
270270 '<td><a href="' + res_src +'" '+
271271 ' target="new">'+
@@ -331,7 +331,7 @@
332332 }
333333 if(include){
334334 o+= '<li>'+
335 - '<a id="mv_smi_'+sInx+'" href="#sc_' + sInx + '">' + gM('sc_' + sInx ) + '</a>'+
 335+ '<a id="mv_smi_'+sInx+'" href="#sc_' + sInx + '">' + gM('mwe-sc_' + sInx ) + '</a>'+
336336 '</li>';
337337 tabc += '<div id="sc_' + sInx + '" style="overflow:auto;" ></div>';
338338 }
@@ -429,23 +429,23 @@
430430
431431 },
432432 getSetInOutHtml:function( setInt ){
433 - return '<strong>' + gM('mv_set_in_out_points') + '</strong>'+
 433+ return '<strong>' + gM('mwe-set_in_out_points') + '</strong>'+
434434 '<table border="0" style="background: transparent; width:94%;height:50px;">'+
435435 '<tr>' +
436436 '<td style="width:55px">'+
437 - gM('mv_start_time') +
 437+ gM('mwe-start_time') +
438438 '<input class="ui-widget-content ui-corner-all startInOut" size="9" value="' + setInt.start_ntp +'">'+
439439 '</td>' +
440440 '<td>' +
441441 '<div class="inOutSlider"></div>'+
442442 '</td>' +
443443 '<td style="width:55px">'+
444 - gM('mv_end_time') +
 444+ gM('mwe-end_time') +
445445 '<input class="ui-widget-content ui-corner-all endInOut" size="9" value="'+ setInt.end_ntp +'">'+
446446 '</td>' +
447447 '</tr>' +
448448 '</table>'+
449 - '<a href="#" class="ui-state-default ui-corner-all ui-icon_link inOutPreviewClip"><span class="ui-icon ui-icon-video"></span>'+ gM('mv_preview_inout') +'</a>';
 449+ '<a href="#" class="ui-state-default ui-corner-all ui-icon_link inOutPreviewClip"><span class="ui-icon ui-icon-video"></span>'+ gM('mwe-preview_inout') +'</a>';
450450 },
451451 getInsertDescHtml:function(){
452452 var o= '<h3>Inline Description</h3>'+
@@ -466,7 +466,7 @@
467467 for( var cbType in _this.controlActionsCb ){
468468 switch(cbType){
469469 case 'insert_seq':
470 - $j(b_target).append( $j.btnHtml(gM('mv_insert_into_sequence'), 'mv_insert_sequence', 'check' ) + ' ' )
 470+ $j(b_target).append( $j.btnHtml(gM('mwe-insert_into_sequence'), 'mv_insert_sequence', 'check' ) + ' ' )
471471 .children('.mv_insert_sequence')
472472 .btnBind()
473473 .click(function(){
@@ -475,7 +475,7 @@
476476 });
477477 break;
478478 case 'insert':
479 - $j(b_target).append( $j.btnHtml(gM('mv_insert_image_page'), 'mv_insert_image_page', 'check' ) + ' ' )
 479+ $j(b_target).append( $j.btnHtml(gM('mwe-insert_image_page'), 'mv_insert_image_page', 'check' ) + ' ' )
480480 .children('.mv_insert_image_page')
481481 .btnBind()
482482 .click(function(){
@@ -484,7 +484,7 @@
485485 }).show('slow');
486486 break;
487487 case 'preview':
488 - $j(b_target).append( $j.btnHtml( gM('mv_preview_insert'), 'mv_preview_insert', 'refresh') + ' ' )
 488+ $j(b_target).append( $j.btnHtml( gM('mwe-preview_insert'), 'mv_preview_insert', 'refresh') + ' ' )
489489 .children('.mv_preview_insert')
490490 .btnBind()
491491 .click(function(){
@@ -493,7 +493,7 @@
494494 }).show('slow');
495495 break;
496496 case 'cancel':
497 - $j(b_target).append( $j.btnHtml( gM('mv_cancel_image_insert'), 'mv_cancel_img_edit', 'close') + ' ')
 497+ $j(b_target).append( $j.btnHtml( gM('mwe-cancel_image_insert'), 'mv_cancel_img_edit', 'close') + ' ')
498498 .children('.mv_cancel_img_edit')
499499 .btnBind()
500500 .click(function(){
@@ -520,15 +520,15 @@
521521 //by default apply Crop tool
522522 $j('#'+this.control_ct).html(
523523 '<h3>Edit tools</h3>' +
524 - '<div class="mv_edit_button mv_crop_button_base" id="mv_crop_button" alt="crop" title="'+gM('mv_crop')+'"/>'+
525 - '<a href="#" class="mv_crop_msg">' + gM('mv_crop') + '</a> '+
 524+ '<div class="mv_edit_button mv_crop_button_base" id="mv_crop_button" alt="crop" title="'+gM('mwe-crop')+'"/>'+
 525+ '<a href="#" class="mv_crop_msg">' + gM('mwe-crop') + '</a> '+
526526 '<span style="display:none" class="mv_crop_msg_load">' + gM('mwe-loading_txt') + '</span> '+
527 - '<a href="#" style="display:none" class="mv_apply_crop">' + gM('mv_apply_crop') + '</a> '+
528 - '<a href="#" style="display:none" class="mv_reset_crop">' + gM('mv_reset_crop') + '</a> '+
 527+ '<a href="#" style="display:none" class="mv_apply_crop">' + gM('mwe-apply_crop') + '</a> '+
 528+ '<a href="#" style="display:none" class="mv_reset_crop">' + gM('mwe-reset_crop') + '</a> '+
529529 '<hr style="clear:both"/><br>'+
530530 '<span style="float:left;">Layout:</span>' +
531 - '<input type="radio" name="mv_layout" id="mv_layout_left" style="float:left"><div id="mv_layout_left_img" title="'+gM('mv_layout_left')+'"/>'+
532 - '<input type="radio" name="mv_layout" id="mv_layout_right" style="float:left"><div id="mv_layout_right_img" title="'+gM('mv_layout_left')+'"/>'+
 531+ '<input type="radio" name="mv_layout" id="mv_layout_left" style="float:left"><div id="mv_layout_left_img" title="'+gM('mwe-layout_left')+'"/>'+
 532+ '<input type="radio" name="mv_layout" id="mv_layout_right" style="float:left"><div id="mv_layout_right_img" title="'+gM('mwe-layout_left')+'"/>'+
533533 '<hr style="clear:both" /><br>' +
534534 _this.getInsertDescHtml()
535535 );
@@ -536,10 +536,10 @@
537537 _this.updateInsertControlActions()
538538
539539 /*scale:
540 - '<div class="mv_edit_button mv_scale_button_base" id="mv_scale_button" alt="crop" title="'+gM('mv_scale')+'"></div>'+
541 - '<a href="#" class="mv_scale_msg">' + gM('mv_scale') + '</a><br>'+
542 - '<a href="#" style="display:none" class="mv_apply_scale">' + gM('mv_apply_scale') + '</a> '+
543 - '<a href="#" style="display:none" class="mv_reset_scale">' + gM('mv_reset_scale') + '</a><br> '+
 540+ '<div class="mv_edit_button mv_scale_button_base" id="mv_scale_button" alt="crop" title="'+gM('mwe-scale')+'"></div>'+
 541+ '<a href="#" class="mv_scale_msg">' + gM('mwe-scale') + '</a><br>'+
 542+ '<a href="#" style="display:none" class="mv_apply_scale">' + gM('mwe-apply_scale') + '</a> '+
 543+ '<a href="#" style="display:none" class="mv_reset_scale">' + gM('mwe-reset_scale') + '</a><br> '+
544544
545545 */
546546 //add bindings:
@@ -573,7 +573,7 @@
574574 $j('.mv_reset_crop').click(function(){
575575 $j('.mv_apply_crop,.mv_reset_crop').hide();
576576 $j('.mv_crop_msg').show();
577 - $j('#mv_crop_button').removeClass('mv_crop_button_selected').addClass('mv_crop_button_base').attr('title',gM('mv_crop'));
 577+ $j('#mv_crop_button').removeClass('mv_crop_button_selected').addClass('mv_crop_button_base').attr('title',gM('mwe-crop'));
578578 _this.rObj.crop=null;
579579 $j('#' + _this.clip_disp_ct ).empty().html(
580580 '<img src="' + _this.rObj.edit_url + '" id="rsd_edit_img">'
@@ -600,7 +600,7 @@
601601 var _this = this;
602602 $j('.mv_apply_crop').hide();
603603 $j('.mv_crop_msg').show();
604 - $j('#mv_crop_button').removeClass('mv_crop_button_selected').addClass('mv_crop_button_base').attr('title',gM('mv_crop'));
 604+ $j('#mv_crop_button').removeClass('mv_crop_button_selected').addClass('mv_crop_button_base').attr('title',gM('mwe-crop'));
605605 js_log( 'click:turn off' );
606606 var cat = _this.rObj;
607607 if(_this.rObj.crop){
@@ -628,7 +628,7 @@
629629 var doEnableCrop = function(){
630630 $j('.mv_crop_msg_load').hide();
631631 $j('.mv_reset_crop,.mv_apply_crop').show();
632 - $j('#mv_crop_button').removeClass('mv_crop_button_base').addClass('mv_crop_button_selected').attr('title',gM('mv_crop_done'));
 632+ $j('#mv_crop_button').removeClass('mv_crop_button_base').addClass('mv_crop_button_selected').attr('title',gM('mwe-crop_done'));
633633 $j('#' + _this.clip_disp_ct + ' img').Jcrop({
634634 onSelect: function(c){
635635 js_log('on select:' + c.x +','+ c.y+','+ c.x2+','+ c.y2+','+ c.w+','+ c.h);
Index: trunk/phase3/js2/mwEmbed/mv_embed.js
@@ -218,7 +218,7 @@
219219 //depencency mapping for css files for self contained included plugins:
220220 lcCssPath({
221221 '$j.Jcrop' : 'libClipEdit/Jcrop/css/jquery.Jcrop.css',
222 - '$j.fn.ColorPicker' : 'libClipEdit/colorpicker/css/colorpicker.css'
 222+ '$j.fn.ColorPicker' : 'libClipEdit/colorpicker/css/colorpicker.css'
223223 })
224224
225225 /**
@@ -415,7 +415,7 @@
416416 }
417417 if( this.checkLoading() ){
418418 if( this.load_time++ > 2000){ //time out after ~80seconds
419 - js_error( gM('error_load_lib') + this.missing_path );
 419+ js_error( gM('mwe-error_load_lib') + this.missing_path );
420420 this.load_error = true;
421421 }else{
422422 setTimeout( 'mvJsLoader.doLoad()', 20 );
@@ -624,13 +624,13 @@
625625 mvJsLoader.runQuededFunctions();
626626 }
627627 }
628 -//a quick function that sets the intial text of swapable elements to "loading"
629 -// (jquery might not be ready)
630 -//(does not destroy inner elements)
 628+//a quick function that sets the intial text of swapable elements to "loading"
 629+// (jquery might not be ready)
 630+//(does not destroy inner elements)
631631 function setSwapableToLoading(e){
632632 //for(var i =0)
633 - //for(var j = 0; i < j.length; j++){
634 - //}
 633+ //for(var j = 0; i < j.length; j++){
 634+ //}
635635 }
636636 //js2AddOnloadHook: ensure jQuery and the DOM are ready:
637637 function js2AddOnloadHook( func ) {
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -3,53 +3,53 @@
44 */
55
66 loadGM({
7 - "loading_plugin" : "loading plugin <blink>...<\/blink>",
8 - "select_playback" : "Set playback preference",
9 - "link_back" : "Link back",
10 - "error_load_lib" : "Error: mv_embed was unable to load required JavaScript libraries.\nInsert script via DOM has failed. Please try reloading this page.",
11 - "error_swap_vid" : "Error: mv_embed was unable to swap the video tag for the mv_embed interface",
12 - "add_to_end_of_sequence" : "Add to end of sequence",
13 - "missing_video_stream" : "The video file for this stream is missing",
14 - "play_clip" : "Play clip",
15 - "pause_clip" : "Pause clip",
16 - "volume_control" : "Volume control",
17 - "player_options" : "Player options",
18 - "closed_captions" : "Close captions",
19 - "player_fullscreen" : "Fullscreen",
20 - "next_clip_msg" : "Play next clip",
21 - "prev_clip_msg" : "Play previous clip",
22 - "current_clip_msg" : "Continue playing this clip",
23 - "seek_to" : "Seek to",
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 video",
28 - "download_text" : "Download text (<a style=\"color:white\" title=\"cmml\" href=\"http:\/\/wiki.xiph.org\/index.php\/CMML\">CMML<\/a> xml):",
29 - "download" : "Download",
30 - "share" : "Share",
31 - "credits" : "Credits",
32 - "clip_linkback" : "Clip source page",
33 - "chose_player" : "Choose Video Player",
34 - "share_this_video" : "Share this video",
35 - "video_credits" : "Video credits",
36 - "menu_btn" : "Menu",
37 - "close_btn" : "Close",
38 - "mv_ogg-player-vlc-mozilla" : "VLC plugin",
39 - "mv_ogg-player-videoElement" : "Native Ogg video support",
40 - "mv_ogg-player-vlc-activex" : "VLC ActiveX",
41 - "mv_ogg-player-oggPlugin" : "Generic Ogg plugin",
42 - "mv_ogg-player-quicktime-mozilla" : "Quicktime plugin",
43 - "mv_ogg-player-quicktime-activex" : "Quicktime ActiveX",
44 - "mv_ogg-player-cortado" : "Java Cortado",
45 - "mv_ogg-player-flowplayer" : "Flowplayer",
46 - "mv_ogg-player-selected" : " (selected)",
47 - "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis",
48 - "mv_generic_missing_plugin" : "You browser does not appear to support the following 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 \/>",
49 - "mv_for_best_experience" : "For a better video playback experience we recommend:<br \/><b><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=mwEmbed\">Firefox 3.5<\/a>.<\/b>",
50 - "mv_do_not_warn_again" : "Dissmiss for now.",
51 - "playerselect" : "Players",
52 - "read_before_embed": 'Please <a href="http://mediawiki.org/wiki/Security_Notes_on_Remote_Embedding" target="_new">Read This</a> before embeding!',
53 - "embed_site_or_blog": "Embed on your site or blog"
 7+ "mwe-loading_plugin" : "loading plugin <blink>...<\/blink>",
 8+ "mwe-select_playback" : "Set playback preference",
 9+ "mwe-link_back" : "Link back",
 10+ "mwe-error_load_lib" : "Error: mv_embed was unable to load required JavaScript libraries.\nInsert script via DOM has failed. Please try reloading this page.",
 11+ "mwe-error_swap_vid" : "Error: mv_embed was unable to swap the video tag for the mv_embed interface",
 12+ "mwe-add_to_end_of_sequence" : "Add to end of sequence",
 13+ "mwe-missing_video_stream" : "The video file for this stream is missing",
 14+ "mwe-play_clip" : "Play clip",
 15+ "mwe-pause_clip" : "Pause clip",
 16+ "mwe-volume_control" : "Volume control",
 17+ "mwe-player_options" : "Player options",
 18+ "mwe-closed_captions" : "Close captions",
 19+ "mwe-player_fullscreen" : "Fullscreen",
 20+ "mwe-next_clip_msg" : "Play next clip",
 21+ "mwe-prev_clip_msg" : "Play previous clip",
 22+ "mwe-current_clip_msg" : "Continue playing this clip",
 23+ "mwe-seek_to" : "Seek to",
 24+ "mwe-download_segment" : "Download selection:",
 25+ "mwe-download_full" : "Download full video file:",
 26+ "mwe-download_right_click" : "To download, right click and select <i>Save target as...<\/i>",
 27+ "mwe-download_clip" : "Download video",
 28+ "mwe-download_text" : "Download text (<a style=\"color:white\" title=\"cmml\" href=\"http:\/\/wiki.xiph.org\/index.php\/CMML\">CMML<\/a> xml):",
 29+ "mwe-download" : "Download",
 30+ "mwe-share" : "Share",
 31+ "mwe-credits" : "Credits",
 32+ "mwe-clip_linkback" : "Clip source page",
 33+ "mwe-chose_player" : "Choose Video Player",
 34+ "mwe-share_this_video" : "Share this video",
 35+ "mwe-video_credits" : "Video credits",
 36+ "mwe-menu_btn" : "Menu",
 37+ "mwe-close_btn" : "Close",
 38+ "mwe-ogg-player-vlc-mozilla" : "VLC plugin",
 39+ "mwe-ogg-player-videoElement" : "Native Ogg video support",
 40+ "mwe-ogg-player-vlc-activex" : "VLC ActiveX",
 41+ "mwe-ogg-player-oggPlugin" : "Generic Ogg plugin",
 42+ "mwe-ogg-player-quicktime-mozilla" : "Quicktime plugin",
 43+ "mwe-ogg-player-quicktime-activex" : "Quicktime ActiveX",
 44+ "mwe-ogg-player-cortado" : "Java Cortado",
 45+ "mwe-ogg-player-flowplayer" : "Flowplayer",
 46+ "mwe-ogg-player-selected" : " (selected)",
 47+ "mwe-ogg-player-omtkplayer" : "OMTK Flash Vorbis",
 48+ "mwe-generic_missing_plugin" : "You browser does not appear to support the following 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 \/>",
 49+ "mwe-for_best_experience" : "For a better video playback experience we recommend:<br \/><b><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=mwEmbed\">Firefox 3.5<\/a>.<\/b>",
 50+ "mwe-do_not_warn_again" : "Dissmiss for now.",
 51+ "mwe-playerselect" : "Players",
 52+ "mwe-read_before_embed": 'Please <a href="http://mediawiki.org/wiki/Security_Notes_on_Remote_Embedding" target="_new">Read This</a> before embeding!',
 53+ "mwe-embed_site_or_blog": "Embed on your site or blog"
5454 });
5555
5656 var default_video_attributes = {
@@ -68,7 +68,7 @@
6969 "end":null,
7070 "controls":true,
7171 "muted":false,
72 -
 72+
7373 //roe url (for xml based metadata)
7474 "roe":null,
7575 //if roe includes metadata tracks we can expose a link to metadata
@@ -82,15 +82,15 @@
8383 "duration":null, //media duration (read from file or the temporal url)
8484 "networkState":0,
8585
86 - "startOffset":null, //if serving an ogg_chop segment use this to offset the presentation time
 86+ "startOffset":null, //if serving an ogg_chop segment use this to offset the presentation time
8787
8888 //custom attributes for mv_embed:
89 - "play_button":true,
 89+ "play_button":true,
9090 "thumbnail":null,
9191 "linkback":null,
9292 "embed_link":true,
9393 "download_link":true,
94 - "type":null //the content type of the media
 94+ "type":null //the content type of the media
9595 };
9696 /*
9797 * the base source attibute checks
@@ -103,11 +103,11 @@
104104 'startOffset',
105105 'durationHint',
106106 'start',
107 - 'end',
 107+ 'end',
108108 'default',
109109 'lang'
110110 );
111 -//set the dismissNativeWarn flag:
 111+//set the dismissNativeWarn flag:
112112 _global['dismissNativeWarn'] = false;
113113 /*
114114 * Converts all occurrences of <video> tag into video object
@@ -115,79 +115,79 @@
116116 function mv_video_embed(swap_done_callback, force_id){
117117 mvEmbed.init( swap_done_callback, force_id );
118118 }
119 -mvEmbed = {
120 - //flist stores the set of functions to run after the video has been swaped in.
 119+mvEmbed = {
 120+ //flist stores the set of functions to run after the video has been swaped in.
121121 flist:new Array(),
122122 init:function( swap_done_callback, force_id ){
123 -
 123+
124124 if(swap_done_callback)
125125 mvEmbed.flist.push( swap_done_callback );
126 -
 126+
127127 //get mv_embed location if it has not been set
128 - js_log('mv_embed ' + MV_EMBED_VERSION);
129 -
130 - var loadPlaylistLib=false;
131 -
 128+ js_log('mv_embed ' + MV_EMBED_VERSION);
 129+
 130+ var loadPlaylistLib=false;
 131+
132132 var eAction = function(this_elm){
133133 js_log( "Do SWAP: " + $j(this_elm).attr("id") + ' tag: '+ this_elm.tagName.toLowerCase() );
134 -
 134+
135135 if( $j(this_elm).attr("id") == '' ){
136136 $j(this_elm).attr("id", 'v'+ global_player_list.length);
137 - }
138 - //stre a global reference to the id
 137+ }
 138+ //stre a global reference to the id
139139 global_player_list.push( $j(this_elm).attr("id") );
140140 //if video doSwap
141141 switch( this_elm.tagName.toLowerCase()){
142142 case 'video':
143 - var videoInterface = new embedVideo(this_elm);
 143+ var videoInterface = new embedVideo(this_elm);
144144 mvEmbed.swapEmbedVideoElement( this_elm, videoInterface );
145145 break;
146146 case 'audio':
147 - var videoInterface = new embedVideo(this_elm);
 147+ var videoInterface = new embedVideo(this_elm);
148148 videoInterface.type ='audio';
149149 mvEmbed.swapEmbedVideoElement( this_elm, videoInterface );
150150 break;
151151 case 'playlist':
152152 loadPlaylistLib=true;
153153 break;
154 - }
 154+ }
155155 }
156 -
 156+
157157 if( force_id == null && force_id != '' ){
158 - var j_selector = 'video,audio,playlist';
 158+ var j_selector = 'video,audio,playlist';
159159 }else{
160160 var j_selector = '#' + force_id;
161161 }
162 - //process selected elements:
163 - //ie8 does not play well with the jQuery video,audio,playlist selector use native:
 162+ //process selected elements:
 163+ //ie8 does not play well with the jQuery video,audio,playlist selector use native:
164164 if($j.browser.msie && $j.browser.version >= 8){
165 - jtags = j_selector.split(',');
166 - for( var i=0; i < jtags.length; i++){
 165+ jtags = j_selector.split(',');
 166+ for( var i=0; i < jtags.length; i++){
167167 $j( document.getElementsByTagName( jtags[i] )).each(function(){
168168 eAction(this);
169169 });
170 - }
171 - }else{
 170+ }
 171+ }else{
172172 $j( j_selector ).each(function(){
173173 eAction(this);
174 - });
175 - }
176 - if(loadPlaylistLib){
177 - mvJsLoader.doLoad([
 174+ });
 175+ }
 176+ if(loadPlaylistLib){
 177+ mvJsLoader.doLoad([
178178 'mvPlayList',
179179 '$j.ui', //include dialog for pop-ing up thigns
180 - '$j.ui.dialog'
 180+ '$j.ui.dialog'
181181 ], function(){
182 - $j('playlist').each(function(){
 182+ $j('playlist').each(function(){
183183 //create new playlist interface:
184184 var plObj = new mvPlayList( this );
185185 mvEmbed.swapEmbedVideoElement(this, plObj);
186186 var added_height = plObj.pl_layout.title_bar_height + plObj.pl_layout.control_height;
187 - //move into a blocking display container with height + controls + title height:
188 - $j('#'+plObj.id).wrap('<div style="display:block;height:' + (plObj.height + added_height) + 'px;"></div>');
 187+ //move into a blocking display container with height + controls + title height:
 188+ $j('#'+plObj.id).wrap('<div style="display:block;height:' + (plObj.height + added_height) + 'px;"></div>');
189189 });
190190 });
191 - }
 191+ }
192192 this.checkClipsReady();
193193 },
194194 /*
@@ -199,13 +199,13 @@
200200 js_log('do swap ' + videoInterface.id + ' for ' + video_element);
201201 embed_video = document.createElement('div');
202202 //make sure our div has a hight/width set:
203 -
 203+
204204 $j(embed_video).css({
205205 'width':videoInterface.width,
206206 'height':videoInterface.height
207 - }).html( mv_get_loading_img() );
 207+ }).html( mv_get_loading_img() );
208208 //inherit the video interface
209 - for(var method in videoInterface){ //for in loop oky in Element context
 209+ for(var method in videoInterface){ //for in loop oky in Element context
210210 if(method!='readyState'){ //readyState crashes IE
211211 if(method=='style'){
212212 embed_video.setAttribute('style', videoInterface[method]);
@@ -222,32 +222,32 @@
223223 //string -> boolean:
224224 if(embed_video[method]=="false")embed_video[method]=false;
225225 if(embed_video[method]=="true")embed_video[method]=true;
226 - }
227 - ///js_log('did vI style');
228 - //now swap out the video element for the embed_video obj:
229 - $j(video_element).after(embed_video).remove();
230 - //js_log('did swap');
231 - $j('#'+embed_video.id).get(0).on_dom_swap();
232 -
 226+ }
 227+ ///js_log('did vI style');
 228+ //now swap out the video element for the embed_video obj:
 229+ $j(video_element).after(embed_video).remove();
 230+ //js_log('did swap');
 231+ $j('#'+embed_video.id).get(0).on_dom_swap();
 232+
233233 // now that "embed_video" is stable, do more initialization (if we are ready)
234 - if($j('#'+embed_video.id).get(0).loading_external_data == false &&
 234+ if($j('#'+embed_video.id).get(0).loading_external_data == false &&
235235 $j('#'+embed_video.id).get(0).init_with_sources_loadedDone == false){
236 - //load and set ready state since source are available:
 236+ //load and set ready state since source are available:
237237 $j('#'+embed_video.id).get(0).init_with_sources_loaded();
238238 }
239 -
 239+
240240 js_log('done with child: ' + embed_video.id + ' len:' + global_player_list.length);
241241 return true;
242242 },
243243 //this should not be needed.
244244 checkClipsReady : function(){
245245 //js_log('checkClipsReady');
246 - var is_ready=true;
 246+ var is_ready=true;
247247 for(var i=0; i < global_player_list.length; i++){
248248 if( $j('#'+global_player_list[i]).length !=0){
249 - var cur_vid = $j('#'+global_player_list[i]).get(0);
 249+ var cur_vid = $j('#'+global_player_list[i]).get(0);
250250 is_ready = ( cur_vid.ready_to_play ) ? is_ready : false;
251 - if( !is_ready && cur_vid.load_error ){
 251+ if( !is_ready && cur_vid.load_error ){
252252 is_ready=true;
253253 $j(cur_vid).html( cur_vid.load_error );
254254 }
@@ -255,15 +255,15 @@
256256 }
257257 if( is_ready ){
258258 mvEmbed.allClipsReady = true;
259 - // run queued functions
 259+ // run queued functions
260260 //js_log('run queded functions:' + mvEmbed.flist[0]);
261261 mvEmbed.runFlist();
262 - }else{
 262+ }else{
263263 setTimeout( 'mvEmbed.checkClipsReady()', 25 );
264 - }
 264+ }
265265 },
266266 runFlist:function(){
267 - while (this.flist.length){
 267+ while (this.flist.length){
268268 this.flist.shift()();
269269 }
270270 }
@@ -306,37 +306,37 @@
307307
308308 init : function(element)
309309 {
310 - //js_log('adding mediaSource: ' + element);
 310+ //js_log('adding mediaSource: ' + element);
311311 this.src = $j(element).attr('src');
312312 this.marked_default = false;
313313 if ( element.tagName.toLowerCase() == 'video')
314 - this.marked_default = true;
315 -
 314+ this.marked_default = true;
 315+
316316 //set default URLTimeEncoding if we have a time url:
317 - //not ideal way to discover if content is on an oggz_chop server.
318 - //should check some other way.
 317+ //not ideal way to discover if content is on an oggz_chop server.
 318+ //should check some other way.
319319 var pUrl = parseUri ( this.src );
320320 if(typeof pUrl['queryKey']['t'] != 'undefined'){
321 - this['URLTimeEncoding']=true;
322 - }
 321+ this['URLTimeEncoding']=true;
 322+ }
323323 for(var i=0; i < mv_default_source_attr.length; i++){ //array loop:
324 - var attr = mv_default_source_attr[ i ];
 324+ var attr = mv_default_source_attr[ i ];
325325 if( $j(element).attr( attr ) ) {
326326 this[ attr ] = $j(element).attr( attr );
327327 }
328 - }
329 - //update duration from hit if present:
 328+ }
 329+ //update duration from hit if present:
330330 if(this.durationHint)
331 - this.duration = this.durationHint;
332 -
333 -
 331+ this.duration = this.durationHint;
 332+
 333+
334334 if ( $j(element).attr('type'))
335335 this.mime_type = $j(element).attr('type');
336336 else if ($j(element).attr('content-type'))
337337 this.mime_type = $j(element).attr('content-type');
338 - else
 338+ else
339339 this.mime_type = this.detectType(this.src);
340 -
 340+
341341 //set the title if unset:
342342 if( !this.title )
343343 this.title = this.mime_type;
@@ -344,9 +344,9 @@
345345 this.parseURLDuration();
346346 },
347347 updateSource:function(element){
348 - //for now just update the title:
 348+ //for now just update the title:
349349 if ($j(element).attr("title"))
350 - this.title = $j(element).attr("title");
 350+ this.title = $j(element).attr("title");
351351 },
352352 /** updates the src time and start & end
353353 * @param {String} start_time in NTP format
@@ -357,18 +357,18 @@
358358 //js_log("pre uri:" + this.src);
359359 //if we have time we can use:
360360 if( this.URLTimeEncoding ){
361 - //make sure its a valid start time / end time (else set default)
362 - if( !npt2seconds(start_ntp) )
 361+ //make sure its a valid start time / end time (else set default)
 362+ if( !npt2seconds(start_ntp) )
363363 start_ntp = this.start_ntp;
364 -
 364+
365365 if( !npt2seconds(end_ntp) )
366366 end_ntp = this.end_ntp;
367 -
368 - this.src = getURLParamReplace(this.src, { 't': start_ntp +'/'+ end_ntp } );
369 -
 367+
 368+ this.src = getURLParamReplace(this.src, { 't': start_ntp +'/'+ end_ntp } );
 369+
370370 //update the duration
371371 this.parseURLDuration();
372 - }
 372+ }
373373 },
374374 setDuration:function (duration)
375375 {
@@ -386,20 +386,20 @@
387387 return this.mime_type;
388388 },
389389 /** URI accessor function.
390 - * @param int seek_time_sec (used to adjust the URI for url based seeks)
 390+ * @param int seek_time_sec (used to adjust the URI for url based seeks)
391391 @return the URI of the source.
392392 @type String
393393 */
394394 getURI : function( seek_time_sec )
395 - {
396 - if( !seek_time_sec || !this.URLTimeEncoding ){
397 - return this.src;
398 - }
 395+ {
 396+ if( !seek_time_sec || !this.URLTimeEncoding ){
 397+ return this.src;
 398+ }
399399 if(!this.end_ntp){
400400 var endvar = '';
401401 }else{
402402 var endvar = '/'+ this.end_ntp;
403 - }
 403+ }
404404 return getURLParamReplace(this.src, { 't': seconds2npt( seek_time_sec )+endvar } ); ;
405405 },
406406 /** Title accessor function.
@@ -423,9 +423,9 @@
424424 * special case derive duration from request url
425425 * supports media_url?t=ntp_start/ntp_end url request format
426426 */
427 - parseURLDuration : function(){
428 - //check if we have a URLTimeEncoding:
429 - if( this.URLTimeEncoding ){
 427+ parseURLDuration : function(){
 428+ //check if we have a URLTimeEncoding:
 429+ if( this.URLTimeEncoding ){
430430 var annoURL = parseUri( this.src );
431431 if( annoURL.queryKey['t'] ){
432432 var times = annoURL.queryKey['t'].split('/');
@@ -437,15 +437,15 @@
438438 //look for this info as attributes
439439 if(this.startOffset){
440440 this.start_offset = this.startOffset;
441 - this.start_ntp = seconds2npt( this.startOffset);
442 - }
 441+ this.start_ntp = seconds2npt( this.startOffset);
 442+ }
443443 if(this.duration){
444444 this.end_ntp = seconds2npt( parseInt(this.duration) + parseInt(this.start_offset) );
445 - }
446 - }
 445+ }
 446+ }
447447 }
448448 //else nothing to parse just keep whatever info we already have
449 -
 449+
450450 //js_log('f:parseURLDuration() for:' + this.src + ' d:' + this.duration);
451451 },
452452 /** Attempts to detect the type of a media file based on the URI.
@@ -485,12 +485,12 @@
486486 mediaElement.prototype =
487487 {
488488 /** The array of mediaSource elements. */
489 - sources:null,
490 - addedROEData:false,
 489+ sources:null,
 490+ addedROEData:false,
491491 /** Selected mediaSource element. */
492492 selected_source:null,
493493 thumbnail:null,
494 - linkback:null,
 494+ linkback:null,
495495
496496 /** @private */
497497 init:function( video_element )
@@ -501,20 +501,20 @@
502502 this.thumbnail = mv_default_thumb_url;
503503 // Process the source element:
504504 if($j(video_element).attr("src"))
505 - this.tryAddSource(video_element);
506 -
 505+ this.tryAddSource(video_element);
 506+
507507 if($j(video_element).attr('thumbnail'))
508508 this.thumbnail = $j(video_element).attr('thumbnail');
509 -
 509+
510510 if($j(video_element).attr('poster'))
511511 this.thumbnail = $j(video_element).attr('poster');
512 -
513 - // Process all inner <source> elements
 512+
 513+ // Process all inner <source> elements
514514 //js_log("inner source count: " + video_element.getElementsByTagName('source').length );
515 -
516 - $j(video_element).find('source,text').each(function(inx, inner_source){
 515+
 516+ $j(video_element).find('source,text').each(function(inx, inner_source){
517517 _this.tryAddSource( inner_source );
518 - });
 518+ });
519519 },
520520 /** Updates the time request for all sources that have a standard time request argument (ie &t=start_time/end_time)
521521 */
@@ -526,10 +526,10 @@
527527 },
528528 /*timed Text check*/
529529 timedTextSources:function(){
530 - for(var i=0; i < this.sources.length; i++){
 530+ for(var i=0; i < this.sources.length; i++){
531531 if( this.sources[i].mime_type == 'text/cmml' ||
532532 this.sources[i].mime_type == 'text/x-srt')
533 - return true;
 533+ return true;
534534 };
535535 return false;
536536 },
@@ -540,7 +540,7 @@
541541 {
542542 if(!mime_filter)
543543 return this.sources;
544 - //apply mime filter:
 544+ //apply mime filter:
545545 var source_set = new Array();
546546 for(var i=0; i < this.sources.length ; i++){
547547 if( this.sources[i].mime_type.indexOf( mime_filter ) != -1 )
@@ -548,7 +548,7 @@
549549 }
550550 return source_set;
551551 },
552 - getSourceById:function( source_id ){
 552+ getSourceById:function( source_id ){
553553 for(var i=0; i < this.sources.length ; i++){
554554 if( this.sources[i].id == source_id)
555555 return this.sources[i];
@@ -564,70 +564,70 @@
565565 for(var i=0; i < playable_sources.length; i++){
566566 if( i==index ){
567567 this.selected_source = playable_sources[i];
568 - //update the user selected format:
 568+ //update the user selected format:
569569 embedTypes.players.userSelectFormat( playable_sources[i].mime_type );
570570 break;
571571 }
572 - }
 572+ }
573573 },
574574 /** selects the default source via cookie preference, default marked, or by id order
575575 * */
576 - autoSelectSource:function(){
577 - js_log('f:autoSelectSource:');
578 - //@@todo read user preference for source
 576+ autoSelectSource:function(){
 577+ js_log('f:autoSelectSource:');
 578+ //@@todo read user preference for source
579579 // Select the default source
580 - var playable_sources = this.getPlayableSources();
581 - var flash_flag=ogg_flag=false;
 580+ var playable_sources = this.getPlayableSources();
 581+ var flash_flag=ogg_flag=false;
582582 //debugger;
583583 for(var source=0; source < playable_sources.length; source++){
584584 var mime_type =playable_sources[source].mime_type;
585585 if( playable_sources[source].marked_default ){
586586 js_log('set via marked default: ' + playable_sources[source].marked_default);
587 - this.selected_source = playable_sources[source];
 587+ this.selected_source = playable_sources[source];
588588 return true;
589589 }
590590 //set via user-preference
591591 if(embedTypes.players.preference['format_prefrence'] == mime_type){
592592 js_log('set via preference: '+playable_sources[source].mime_type);
593593 this.selected_source = playable_sources[source];
594 - return true;
595 - }
596 - }
597 - //set Ogg via player support
 594+ return true;
 595+ }
 596+ }
 597+ //set Ogg via player support
598598 for(var source=0; source < playable_sources.length; source++){
599599 js_log('f:autoSelectSource:' + playable_sources[source].mime_type);
600 - var mime_type =playable_sources[source].mime_type;
601 - //set source via player
602 - if(mime_type=='video/ogg' || mime_type=='ogg/video' || mime_type=='video/annodex' || mime_type=='application/ogg'){
 600+ var mime_type =playable_sources[source].mime_type;
 601+ //set source via player
 602+ if(mime_type=='video/ogg' || mime_type=='ogg/video' || mime_type=='video/annodex' || mime_type=='application/ogg'){
603603 for(var i=0; i < embedTypes.players.players.length; i++){ //for in loop on object oky
604 - var player = embedTypes.players.players[i];
 604+ var player = embedTypes.players.players[i];
605605 if(player.library=='vlc' || player.library=='native'){
606 - js_log('set via ogg via order');
607 - this.selected_source = playable_sources[source];
 606+ js_log('set via ogg via order');
 607+ this.selected_source = playable_sources[source];
608608 return true;
609 - }
 609+ }
610610 }
611611 }
612612 }
613613 //set basic flash
614 - for(var source=0; source < playable_sources.length; source++){
615 - var mime_type =playable_sources[source].mime_type;
 614+ for(var source=0; source < playable_sources.length; source++){
 615+ var mime_type =playable_sources[source].mime_type;
616616 if( mime_type=='video/x-flv' ){
617617 js_log('set via by player preference normal flash')
618618 this.selected_source = playable_sources[source];
619619 return true;
620 - }
 620+ }
621621 }
622 - //set h264 flash
623 - for(var source=0; source < playable_sources.length; source++){
624 - var mime_type =playable_sources[source].mime_type;
 622+ //set h264 flash
 623+ for(var source=0; source < playable_sources.length; source++){
 624+ var mime_type =playable_sources[source].mime_type;
625625 if( mime_type=='video/h264' ){
626626 js_log('set via playable_sources preference h264 flash')
627627 this.selected_source = playable_sources[source];
628628 return true;
629 - }
630 - }
631 - //select first source
 629+ }
 630+ }
 631+ //select first source
632632 if (!this.selected_source)
633633 {
634634 js_log('set via first source:' + playable_sources[0]);
@@ -666,48 +666,48 @@
667667 //return mime_type=='video/ogg' || mime_type=='ogg/video' || mime_type=='video/annodex' || mime_type=='video/x-flv';
668668 },
669669 /** Adds a single mediaSource using the provided element if
670 - the element has a 'src' attribute.
 670+ the element has a 'src' attribute.
671671 @param element {element} <video>, <source> or <mediaSource> element.
672672 */
673673 tryAddSource:function(element)
674674 {
675 - js_log('f:tryAddSource:'+ $j(element).attr("src"));
 675+ js_log('f:tryAddSource:'+ $j(element).attr("src"));
676676 if (! $j(element).attr("src")){
677677 //js_log("element has no src");
678678 return false;
679679 }
680680 var new_src = $j(element).attr('src');
681 - //make sure an existing element with the same src does not already exist:
682 - for( var i=0; i < this.sources.length; i++ ){
 681+ //make sure an existing element with the same src does not already exist:
 682+ for( var i=0; i < this.sources.length; i++ ){
683683 if(this.sources[i].src == new_src){
684 - //js_log('checking existing: '+this.sources[i].getURI() + ' != '+ new_src);
685 - //can't add it all but try to update any additional attr:
 684+ //js_log('checking existing: '+this.sources[i].getURI() + ' != '+ new_src);
 685+ //can't add it all but try to update any additional attr:
686686 this.sources[i].updateSource(element);
687687 return false;
688688 }
689689 }
690 - var source = new mediaSource( element );
691 - this.sources.push(source);
 690+ var source = new mediaSource( element );
 691+ this.sources.push(source);
692692 //alert('pushed source to stack'+ source + 'sl:'+this.sources.length);
693693 },
694 - getPlayableSources: function(){
 694+ getPlayableSources: function(){
695695 var playable_sources= new Array();
696 - for(var i=0; i < this.sources.length; i++){
697 - if( this.isPlayableType( this.sources[i].mime_type ) ){
 696+ for(var i=0; i < this.sources.length; i++){
 697+ if( this.isPlayableType( this.sources[i].mime_type ) ){
698698 playable_sources.push( this.sources[i] );
699699 }else{
700700 js_log("type "+ this.sources[i].mime_type + 'is not playable');
701701 }
702 - };
 702+ };
703703 return playable_sources;
704704 },
705705 /* Imports media sources from ROE data.
706706 * @param roe_data ROE data.
707707 */
708 - addROE:function(roe_data){
 708+ addROE:function(roe_data){
709709 js_log('f:addROE');
710710 this.addedROEData=true;
711 - var _this = this;
 711+ var _this = this;
712712 if( typeof roe_data == 'string' )
713713 {
714714 var parser=new DOMParser();
@@ -734,7 +734,7 @@
735735 });
736736 }else{
737737 js_log('ROE data empty.');
738 - }
 738+ }
739739 }
740740 };
741741
@@ -750,7 +750,7 @@
751751 embedVideo.prototype = {
752752 /** The mediaElement object containing all mediaSource objects */
753753 media_element:null,
754 - preview_mode:false,
 754+ preview_mode:false,
755755 ready_to_play:false, //should use html5 ready state
756756 load_error:false, //used to set error in case of error
757757 loading_external_data:false,
@@ -758,19 +758,19 @@
759759 thumbnail_disp:true,
760760 init_with_sources_loadedDone:false,
761761 inDOM:false,
762 - //for onClip done stuff:
 762+ //for onClip done stuff:
763763 anno_data_cache:null,
764764 seek_time_sec:0,
765765 base_seeker_slider_offset:null,
766766 onClipDone_disp:false,
767 - supports:{},
 767+ supports:{},
768768 //for seek thumb updates:
769769 cur_thumb_seek_time:0,
770770 thumb_seek_interval:null,
771 -
 771+
772772 seeking:false,
773 - //set the buffered percent:
774 - bufferedPercent:0,
 773+ //set the buffered percent:
 774+ bufferedPercent:0,
775775 //utility functions for property values:
776776 hx : function ( s ) {
777777 if ( typeof s != 'String' ) {
@@ -799,7 +799,7 @@
800800 else
801801 return parseInt(this.height);
802802 },
803 - init: function(element){
 803+ init: function(element){
804804 //this.element_pointer = element;
805805
806806 //inherit all the default video_attributes
@@ -812,16 +812,16 @@
813813 //js_log('attr:' + attr + ' val: ' + video_attributes[attr] +" "+ 'elm_val:' + element.getAttribute(attr) + "\n (set by attr)");
814814 }
815815 }
816 - //make sure startOffset is cast as an int
 816+ //make sure startOffset is cast as an int
817817 if( this.startOffset && this.startOffset.split(':').length >= 2)
818818 this.startOffset = npt2seconds(this.startOffset);
819 - //make sure offset is in float:
 819+ //make sure offset is in float:
820820 this.startOffset = parseFloat(this.startOffset);
821 -
 821+
822822 if( this.duration && this.duration.split(':').length >= 2)
823 - this.duration = npt2seconds( this.duration );
824 - //make sure duration is in float:
825 - this.duration = parseFloat(this.duration);
 823+ this.duration = npt2seconds( this.duration );
 824+ //make sure duration is in float:
 825+ this.duration = parseFloat(this.duration);
826826 js_log("duration is: " + this.duration);
827827 //if style is set override width and height
828828 var dwh = mwConfig['video_size'].split('x');
@@ -835,114 +835,114 @@
836836 if(element.innerHTML!='' && element.getElementsByTagName('source').length==0){
837837 js_log('innerHTML: ' + element.innerHTML);
838838 this.user_missing_plugin_html=element.innerHTML;
839 - }
 839+ }
840840 // load all of the specified sources
841 - this.media_element = new mediaElement(element);
 841+ this.media_element = new mediaElement(element);
842842 },
843843 on_dom_swap: function(){
844 - js_log('f:on_dom_swap');
 844+ js_log('f:on_dom_swap');
845845 // Process the provided ROE file... if we don't yet have sources
846846 if(this.roe && this.media_element.sources.length==0 ){
847847 js_log('loading external data');
848848 this.loading_external_data=true;
849 - var _this = this;
 849+ var _this = this;
850850 do_request(this.roe, function(data)
851 - {
852 - //continue
853 - _this.media_element.addROE( data );
854 - js_log('added_roe::' + _this.media_element.sources.length);
855 -
856 - js_log('set loading_external_data=false');
857 - _this.loading_external_data=false;
858 -
859 - _this.init_with_sources_loaded();
 851+ {
 852+ //continue
 853+ _this.media_element.addROE( data );
 854+ js_log('added_roe::' + _this.media_element.sources.length);
 855+
 856+ js_log('set loading_external_data=false');
 857+ _this.loading_external_data=false;
 858+
 859+ _this.init_with_sources_loaded();
860860 });
861861 }
862862 },
863863 init_with_sources_loaded : function()
864 - {
 864+ {
865865 js_log('f:init_with_sources_loaded');
866866 //set flag that we have run this function:
867 - this.init_with_sources_loadedDone=true;
 867+ this.init_with_sources_loadedDone=true;
868868 //autoseletct the source
869 - this.media_element.autoSelectSource();
 869+ this.media_element.autoSelectSource();
870870 //auto select player based on prefrence or default order
871871 if( !this.media_element.selected_source )
872872 {
873 - //check for parent clip:
874 - if( typeof this.pc != 'undefined' ){
875 - js_log('no sources, type:' +this.type + ' check for html');
876 - //debugger;
877 - //do load player if just displaying innerHTML:
 873+ //check for parent clip:
 874+ if( typeof this.pc != 'undefined' ){
 875+ js_log('no sources, type:' +this.type + ' check for html');
 876+ //debugger;
 877+ //do load player if just displaying innerHTML:
878878 if( this.pc.type == 'text/html' ){
879879 this.selected_player = embedTypes.players.defaultPlayer( 'text/html' );
880 - js_log('set selected player:'+ this.selected_player.mime_type);
 880+ js_log('set selected player:'+ this.selected_player.mime_type);
881881 }
882882 }
883 - }else{
 883+ }else{
884884 this.selected_player = embedTypes.players.defaultPlayer( this.media_element.selected_source.mime_type );
885 - }
 885+ }
886886 if( this.selected_player ){
887887 js_log('selected ' + this.selected_player.getName());
888888 js_log("PLAYBACK TYPE: "+this.selected_player.library);
889 - this.thumbnail_disp = true;
890 - this.inheritEmbedObj();
891 - }else{
 889+ this.thumbnail_disp = true;
 890+ this.inheritEmbedObj();
 891+ }else{
892892 //no source's playable
893893 var missing_type ='';
894 - var or ='';
 894+ var or ='';
895895 for( var i=0; i < this.media_element.sources.length; i++){
896896 missing_type+= or + this.media_element.sources[i].mime_type;
897897 or=' or ';
898 - }
 898+ }
899899 if( this.pc )
900 - var missing_type = this.pc.type;
 900+ var missing_type = this.pc.type;
901901 js_log('no player found for given source type ' + missing_type);
902 - this.load_error= this.getPluginMissingHTML(missing_type);
903 - }
 902+ this.load_error= this.getPluginMissingHTML(missing_type);
 903+ }
904904 },
905 - inheritEmbedObj:function(){
906 - js_log("inheritEmbedObj:duration is: " + this.duration);
 905+ inheritEmbedObj:function(){
 906+ js_log("inheritEmbedObj:duration is: " + this.duration);
907907 //@@note: tricky cuz direct overwrite is not so ideal.. since the extended object is already tied to the dom
908908 //clear out any non-base embedObj stuff:
909909 if(this.instanceOf){
910910 eval('tmpObj = '+this.instanceOf);
911 - for(var i in tmpObj){ //for in loop oky for object
 911+ for(var i in tmpObj){ //for in loop oky for object
912912 if(this['parent_'+i]){
913913 this[i]=this['parent_'+i];
914914 }else{
915915 this[i]=null;
916916 }
917917 }
918 - }
 918+ }
919919 //set up the new embedObj
920920 js_log('f: inheritEmbedObj: embedding with ' + this.selected_player.library);
921 - var _this = this;
 921+ var _this = this;
922922 this.selected_player.load( function()
923923 {
924 - js_log("selected_player::load:duration is: " + _this.duration);
 924+ js_log("selected_player::load:duration is: " + _this.duration);
925925 //js_log('inheriting '+_this.selected_player.library +'Embed to ' + _this.id + ' ' + $j('#'+_this.id).length);
926926 //var _this = $j('#'+_this.id).get(0);
927927 //js_log( 'type of ' + _this.selected_player.library +'Embed + ' +
928 - // eval('typeof '+_this.selected_player.library +'Embed'));
 928+ // eval('typeof '+_this.selected_player.library +'Embed'));
929929 eval('embedObj = ' +_this.selected_player.library +'Embed;');
930 - for(var method in embedObj){ //for in loop oky for object
 930+ for(var method in embedObj){ //for in loop oky for object
931931 //parent method preservation for local overwritten methods
932932 if(_this[method])
933933 _this['parent_' + method] = _this[method];
934934 _this[method]=embedObj[method];
935935 }
936936 js_log('TYPEOF_ppause: ' + typeof _this['parent_pause']);
937 -
 937+
938938 if(_this.inheritEmbedOverride){
939939 _this.inheritEmbedOverride();
940940 }
941941 //update controls if possible
942942 if(!_this.loading_external_data)
943 - _this.refreshControlsHTML();
944 -
945 - //js_log("READY TO PLAY:"+_this.id);
946 - _this.ready_to_play=true;
 943+ _this.refreshControlsHTML();
 944+
 945+ //js_log("READY TO PLAY:"+_this.id);
 946+ _this.ready_to_play=true;
947947 _this.getDuration();
948948 _this.getHTML();
949949 });
@@ -953,61 +953,61 @@
954954 if(this.selected_player.id != player.id){
955955 this.selected_player = player;
956956 this.inheritEmbedObj();
957 - }
 957+ }
958958 },
959 - doNativeWarningCheck:function(){
 959+ doNativeWarningCheck:function(){
960960 if( $j.cookie('dismissNativeWarn') && $j.cookie('dismissNativeWarn')===true){
961961 return false;
962 - }else{
963 - //see if we have native support for ogg:
964 - var supporting_players = embedTypes.players.getMIMETypePlayers( 'video/ogg' );
 962+ }else{
 963+ //see if we have native support for ogg:
 964+ var supporting_players = embedTypes.players.getMIMETypePlayers( 'video/ogg' );
965965 for(var i=0; i < supporting_players.length; i++){
966966 if(supporting_players[i].id == 'videoElement'){
967967 return false;
968 - }
969 - }
970 - //see if we are using mv_embed without a ogg source in which case no point in promoting firefox :P
 968+ }
 969+ }
 970+ //see if we are using mv_embed without a ogg source in which case no point in promoting firefox :P
971971 if(this.media_element && this.media_element.sources){
972972 var foundOgg = false;
973973 var playable_sources = this.media_element.getPlayableSources();
974 - for(var sInx=0; sInx < playable_sources.length; sInx++){
 974+ for(var sInx=0; sInx < playable_sources.length; sInx++){
975975 var mime_type = playable_sources[sInx].mime_type;
976976 if( mime_type=='video/ogg' ){
977 - //they have flash / h.264 fallback no need to push firefox :(
 977+ //they have flash / h.264 fallback no need to push firefox :(
978978 foundOgg = true;
979979 }
980980 }
981981 //no ogg no point in download firefox
982982 if(!foundOgg)
983983 return false;
984 -
 984+
985985 }
986986 }
987 - return true;
 987+ return true;
988988 },
989989 getTimeReq:function(){
990990 var default_time_req = '0:00:00/' + seconds2npt(this.getDuration());
991991 if(!this.media_element)
992992 return default_time_req;
993993 if(!this.media_element.selected_source)
994 - return default_time_req;
 994+ return default_time_req;
995995 if(!this.media_element.selected_source.end_ntp)
996 - return default_time_req;
 996+ return default_time_req;
997997 return this.media_element.selected_source.start_ntp+'/'+this.media_element.selected_source.end_ntp;
998 - },
999 - getDuration:function(){
1000 - //update some local pointers for the selected source:
1001 - if(this.media_element && this.media_element.selected_source && this.media_element.selected_source.duration){
1002 - this.duration = this.media_element.selected_source.duration;
 998+ },
 999+ getDuration:function(){
 1000+ //update some local pointers for the selected source:
 1001+ if(this.media_element && this.media_element.selected_source && this.media_element.selected_source.duration){
 1002+ this.duration = this.media_element.selected_source.duration;
10031003 this.start_offset = this.media_element.selected_source.start_offset;
10041004 this.start_ntp = this.media_element.selected_source.start_ntp;
1005 - this.end_ntp = this.media_element.selected_source.end_ntp;
 1005+ this.end_ntp = this.media_element.selected_source.end_ntp;
10061006 }
1007 - //update start end_ntp if duration !=0 (set from plugin)
 1007+ //update start end_ntp if duration !=0 (set from plugin)
10081008 if(!this.start_ntp)
10091009 this.start_ntp = '0:0:0';
10101010 if(!this.end_ntp && this.duration)
1011 - this.end_ntp = seconds2npt( this.duration );
 1011+ this.end_ntp = seconds2npt( this.duration );
10121012 //return the duration
10131013 return this.duration;
10141014 },
@@ -1015,48 +1015,48 @@
10161016 * wrapEmebedContainer
10171017 * wraps the embed code into a container to better support playlist function
10181018 * (where embed element is swapped for next clip
1019 - * (where plugin method does not support playlsits)
 1019+ * (where plugin method does not support playlsits)
10201020 */
10211021 wrapEmebedContainer:function(embed_code){
10221022 //check if parent clip is set( ie we are in a playlist so name the embed container by playlistID)
10231023 var id = (this.pc!=null)?this.pc.pp.id:this.id;
1024 - return '<div id="mv_ebct_'+id+'" style="width:'+this.width+'px;height:'+this.height+'px;">' +
1025 - embed_code +
 1024+ return '<div id="mv_ebct_'+id+'" style="width:'+this.width+'px;height:'+this.height+'px;">' +
 1025+ embed_code +
10261026 '</div>';
1027 - },
 1027+ },
10281028 getEmbedHTML : function(){
10291029 //return this.wrapEmebedContainer( this.getEmbedObj() );
10301030 return 'function getEmbedHTML should be overitten by embedLib ';
10311031 },
10321032 //do seek function (should be overwritten by implementing embedLibs)
1033 - // first check if seek can be done on locally downloaded content.
1034 - doSeek : function( perc ){
1035 - if( this.supportsURLTimeEncoding() ){
 1033+ // first check if seek can be done on locally downloaded content.
 1034+ doSeek : function( perc ){
 1035+ if( this.supportsURLTimeEncoding() ){
10361036 //make sure this.seek_time_sec is up-to-date:
10371037 this.seek_time_sec = npt2seconds( this.start_ntp ) + parseFloat( perc * this.getDuration() );
10381038 js_log('updated seek_time_sec: ' + seconds2npt ( this.seek_time_sec) );
1039 - this.stop();
 1039+ this.stop();
10401040 this.didSeekJump=true;
10411041 //update the slider
1042 - this.setSliderValue( perc );
1043 - }
1044 - //do play in 100ms (give things time to clear)
 1042+ this.setSliderValue( perc );
 1043+ }
 1044+ //do play in 100ms (give things time to clear)
10451045 setTimeout('$j(\'#' + this.id + '\').get(0).play()',100);
10461046 },
10471047 /*
1048 - * seeks to the requested time and issues a callback when ready
 1048+ * seeks to the requested time and issues a callback when ready
10491049 * (should be overwitten by client that supports frame serving)
1050 - */
 1050+ */
10511051 setCurrentTime:function( time, callback){
10521052 js_log('error: base embed setCurrentTime can not frame serve (overide via plugin)');
10531053 },
10541054 addPresTimeOffset:function(){
1055 - //add in the offset:
 1055+ //add in the offset:
10561056 if(this.seek_time_sec && this.seek_time_sec!=0){
10571057 this.currentTime+=this.seek_time_sec;
1058 - }else if(this.start_offset && this.start_offset!=0){
1059 - this.currentTime = parseFloat(this.currentTime) + parseFloat(this.start_offset);
1060 - }
 1058+ }else if(this.start_offset && this.start_offset!=0){
 1059+ this.currentTime = parseFloat(this.currentTime) + parseFloat(this.start_offset);
 1060+ }
10611061 },
10621062 doEmbedHTML:function()
10631063 {
@@ -1066,90 +1066,90 @@
10671067 this.closeDisplayedHTML();
10681068
10691069 // if(!this.selected_player){
1070 -// return this.getPluginMissingHTML();
 1070+// return this.getPluginMissingHTML();
10711071 //Set "loading" here
10721072 $j('#mv_embedded_player_'+_this.id).html(''+
1073 - '<div style="color:black;width:'+this.width+'px;height:'+this.height+'px;">' +
1074 - gM('loading_plugin') +
1075 - '</div>'
 1073+ '<div style="color:black;width:'+this.width+'px;height:'+this.height+'px;">' +
 1074+ gM('mwe-loading_plugin') +
 1075+ '</div>'
10761076 );
10771077 // schedule embedding
10781078 this.selected_player.load(function()
10791079 {
1080 - js_log('performing embed for ' + _this.id);
1081 - var embed_code = _this.getEmbedHTML();
 1080+ js_log('performing embed for ' + _this.id);
 1081+ var embed_code = _this.getEmbedHTML();
10821082 //js_log('shopuld embed:' + embed_code);
1083 - $j('#mv_embedded_player_'+_this.id).html(embed_code);
 1083+ $j('#mv_embedded_player_'+_this.id).html(embed_code);
10841084 });
10851085 },
10861086 onClipDone:function(){
10871087 js_log('base:onClipDone');
1088 - //stop the clip (load the thumbnail etc)
 1088+ //stop the clip (load the thumbnail etc)
10891089 this.stop();
10901090 this.seek_time_sec = 0;
10911091 this.setSliderValue(0);
10921092 var _this = this;
1093 -
1094 - //if the clip resolution is < 320 don't do fancy onClipDone stuff
 1093+
 1094+ //if the clip resolution is < 320 don't do fancy onClipDone stuff
10951095 if(this.width < 300){
10961096 return ;
10971097 }
10981098 this.onClipDone_disp=true;
10991099 this.thumbnail_disp=true;
1100 - //make sure we are not in preview mode( no end clip actions in preview mode)
 1100+ //make sure we are not in preview mode( no end clip actions in preview mode)
11011101 if( this.preview_mode )
11021102 return ;
1103 -
 1103+
11041104 $j('#img_thumb_'+this.id).css('zindex',1);
11051105 $j('#big_play_link_'+this.id).hide();
1106 - //add the liks_info_div black back
 1106+ //add the liks_info_div black back
11071107 $j('#dc_'+this.id).append('<div id="liks_info_'+this.id+'" ' +
1108 - 'style="width:' +parseInt(parseInt(this.width)/2)+'px;'+
 1108+ 'style="width:' +parseInt(parseInt(this.width)/2)+'px;'+
11091109 'height:'+ parseInt(parseInt(this.height)) +'px;'+
1110 - 'position:absolute;top:10px;overflow:auto'+
 1110+ 'position:absolute;top:10px;overflow:auto'+
11111111 'width: '+parseInt( ((parseInt(this.width)/2)-15) ) + 'px;'+
1112 - 'left:'+ parseInt( ((parseInt(this.width)/2)+15) ) +'px;">'+
 1112+ 'left:'+ parseInt( ((parseInt(this.width)/2)+15) ) +'px;">'+
11131113 '</div>' +
11141114 '<div id="black_back_'+this.id+'" ' +
11151115 'style="z-index:-2;position:absolute;background:#000;' +
11161116 'top:0px;left:0px;width:'+parseInt(this.width)+'px;' +
11171117 'height:'+parseInt(this.height)+'px;">' +
11181118 '</div>'
1119 - );
1120 -
1121 - //start animation (make thumb small in upper left add in div for "loading"
1122 - $j('#img_thumb_'+this.id).animate({
 1119+ );
 1120+
 1121+ //start animation (make thumb small in upper left add in div for "loading"
 1122+ $j('#img_thumb_'+this.id).animate({
11231123 width:parseInt(parseInt(_this.width)/2),
11241124 height:parseInt(parseInt(_this.height)/2),
11251125 top:20,
11261126 left:10
11271127 },
1128 - 1000,
 1128+ 1000,
11291129 function(){
1130 - //animation done.. add "loading" to div if empty
 1130+ //animation done.. add "loading" to div if empty
11311131 if($j('#liks_info_'+_this.id).html()==''){
1132 - $j('#liks_info_'+_this.id).html(gM('loading_txt'));
1133 - }
 1132+ $j('#liks_info_'+_this.id).html(gM('mwe-loading_txt'));
 1133+ }
11341134 }
1135 - )
 1135+ )
11361136 //now load roe if run the showNextPrevLinks
11371137 if(this.roe && this.media_element.addedROEData==false){
11381138 do_request(this.roe, function(data)
1139 - {
 1139+ {
11401140 _this.media_element.addROE(data);
11411141 _this.getNextPrevLinks();
1142 - });
 1142+ });
11431143 }else{
11441144 this.getNextPrevLinks();
11451145 }
11461146 },
1147 - //@@todo we should merge getNextPrevLinks with textInterface .. there is repeated code between them.
 1147+ //@@todo we should merge getNextPrevLinks with textInterface .. there is repeated code between them.
11481148 getNextPrevLinks:function(){
11491149 js_log('f:getNextPrevLinks');
11501150 var anno_track_url = null;
1151 - var _this = this;
 1151+ var _this = this;
11521152 //check for annoative track
1153 - $j.each(this.media_element.sources, function(inx, n){
 1153+ $j.each(this.media_element.sources, function(inx, n){
11541154 if(n.mime_type=='text/cmml'){
11551155 if( n.id == 'Anno_en'){
11561156 anno_track_url = n.src;
@@ -1161,28 +1161,28 @@
11621162 //zero out seconds (should improve cache hit rate and generally expands metadata search)
11631163 //@@todo this could be repalced with a regExp
11641164 var annoURL = parseUri(anno_track_url);
1165 - var times = annoURL.queryKey['t'].split('/');
1166 - var stime_parts = times[0].split(':');
1167 - var etime_parts = times[1].split(':');
 1165+ var times = annoURL.queryKey['t'].split('/');
 1166+ var stime_parts = times[0].split(':');
 1167+ var etime_parts = times[1].split(':');
11681168 //zero out the hour:
11691169 var new_start = stime_parts[0]+':'+'0:0';
11701170 //zero out the end sec
11711171 var new_end = (etime_parts[0]== stime_parts[0])? (etime_parts[0]+1)+':0:0' :etime_parts[0]+':0:0';
1172 -
 1172+
11731173 var etime_parts = times[1].split(':');
1174 -
 1174+
11751175 var new_anno_track_url = annoURL.protocol +'://'+ annoURL.host + annoURL.path +'?';
11761176 $j.each(annoURL.queryKey, function(i, val){
11771177 new_anno_track_url +=(i=='t')?'t='+new_start+'/'+new_end +'&' :
11781178 i+'='+ val+'&';
11791179 });
11801180 var request_key = new_start+'/'+new_end;
1181 - //check the anno_data cache:
1182 - //@@todo search cache see if current is in range.
 1181+ //check the anno_data cache:
 1182+ //@@todo search cache see if current is in range.
11831183 if(this.anno_data_cache){
11841184 js_log('anno data found in cache: '+request_key);
11851185 this.showNextPrevLinks();
1186 - }else{
 1186+ }else{
11871187 do_request(new_anno_track_url, function(cmml_data){
11881188 js_log('raw response: '+ cmml_data);
11891189 if(typeof cmml_data == 'string')
@@ -1193,8 +1193,8 @@
11941194 }
11951195 //init anno_data_cache
11961196 if(!_this.anno_data_cache)
1197 - _this.anno_data_cache={};
1198 - //grab all metadata and put it into the anno_data_cache:
 1197+ _this.anno_data_cache={};
 1198+ //grab all metadata and put it into the anno_data_cache:
11991199 $j.each(cmml_data.getElementsByTagName('clip'), function(inx, clip){
12001200 _this.anno_data_cache[ $j(clip).attr("id") ]={
12011201 'start_time_sec':npt2seconds($j(clip).attr("start").replace('npt:','')),
@@ -1203,32 +1203,32 @@
12041204 };
12051205 //grab all its meta
12061206 _this.anno_data_cache[ $j(clip).attr("id") ]['meta']={};
1207 - $j.each(clip.getElementsByTagName('meta'),function(imx, meta){
 1207+ $j.each(clip.getElementsByTagName('meta'),function(imx, meta){
12081208 //js_log('adding meta: '+ $j(meta).attr("name")+ ' = '+ $j(meta).attr("content"));
12091209 _this.anno_data_cache[$j(clip).attr("id")]['meta'][$j(meta).attr("name")]=$j(meta).attr("content");
12101210 });
12111211 });
1212 - _this.showNextPrevLinks();
 1212+ _this.showNextPrevLinks();
12131213 });
12141214 }
12151215 }else{
12161216 js_log('no annotative track found');
12171217 $j('#liks_info_'+this.id).html('no metadata found for related links');
12181218 }
1219 - //query current request time +|- 60s to get prev next speech links.
 1219+ //query current request time +|- 60s to get prev next speech links.
12201220 },
12211221 showNextPrevLinks:function(){
12221222 //js_log('f:showNextPrevLinks');
1223 - //int requested links:
 1223+ //int requested links:
12241224 var link = {
12251225 'prev':'',
12261226 'current':'',
12271227 'next':''
1228 - }
 1228+ }
12291229 var curTime = this.getTimeReq().split('/');
1230 -
 1230+
12311231 var s_sec = npt2seconds(curTime[0]);
1232 - var e_sec = npt2seconds(curTime[1]);
 1232+ var e_sec = npt2seconds(curTime[1]);
12331233 js_log('showNextPrevLinks: req time: '+ s_sec + ' to ' + e_sec);
12341234 //now we have all the data in anno_data_cache
12351235 var current_done=false;
@@ -1240,52 +1240,52 @@
12411241 link.prev = clip_id;
12421242 js_log('showNextPrevLinks: ' + s_sec + ' < ' + clip.end_time_sec + ' set prev');
12431243 }
1244 -
 1244+
12451245 if(e_sec==clip.end_time_sec && s_sec== clip.start_time_sec)
12461246 current_done = true;
12471247 //current clip is not done:
12481248 if( e_sec < clip.end_time_sec && link.current=='' && !current_done){
12491249 link.current = clip_id;
1250 - js_log('showNextPrevLinks: ' + e_sec + ' < ' + clip.end_time_sec + ' set current');
 1250+ js_log('showNextPrevLinks: ' + e_sec + ' < ' + clip.end_time_sec + ' set current');
12511251 }
1252 -
 1252+
12531253 //set end clip (first clip where start time is > end_time of req
12541254 if( e_sec < clip.start_time_sec && link.next==''){
12551255 link.next = clip_id;
12561256 js_log('showNextPrevLinks: '+ e_sec + ' < '+ clip.start_time_sec + ' && ' + link.next );
12571257 }
1258 - }
1259 - var html='';
 1258+ }
 1259+ var html='';
12601260 if(link.prev=='' && link.current=='' && link.next==''){
12611261 html='<p><a href="'+this.media_element.linkbackgetMsg+'">clip page</a>';
1262 - }else{
 1262+ }else{
12631263 for(var link_type in link){
1264 - var link_id = link[link_type];
 1264+ var link_id = link[link_type];
12651265 if(link_id!=''){
1266 - var clip = this.anno_data_cache[link_id];
 1266+ var clip = this.anno_data_cache[link_id];
12671267 var title_msg='';
12681268 for(var j in clip['meta']){
12691269 title_msg+=j.replace(/_/g,' ') +': ' +clip['meta'][j].replace(/_/g,' ') +" <br>";
1270 - }
 1270+ }
12711271 var time_req = clip.time_req;
1272 - if(link_type=='current') //if current start from end of current clip play to end of current meta:
 1272+ if(link_type=='current') //if current start from end of current clip play to end of current meta:
12731273 time_req = curTime[1]+ '/' + seconds2npt( clip.end_time_sec );
1274 -
1275 - //do special linkbacks for metavid content:
1276 - var regTimeCheck = new RegExp(/[0-9]+:[0-9]+:[0-9]+\/[0-9]+:[0-9]+:[0-9]+/);
 1274+
 1275+ //do special linkbacks for metavid content:
 1276+ var regTimeCheck = new RegExp(/[0-9]+:[0-9]+:[0-9]+\/[0-9]+:[0-9]+:[0-9]+/);
12771277 html+='<p><a ';
12781278 if( regTimeCheck.test( this.media_element.linkback ) ){
1279 - html+=' href="'+ this.media_element.linkback.replace(regTimeCheck,time_req) +'" ';
 1279+ html+=' href="'+ this.media_element.linkback.replace(regTimeCheck,time_req) +'" ';
12801280 }else{
1281 - html+=' href="#" onClick="$j(\'#'+this.id+'\').get(0).playByTimeReq(\''+
1282 - time_req + '\'); return false; "';
 1281+ html+=' href="#" onClick="$j(\'#'+this.id+'\').get(0).playByTimeReq(\''+
 1282+ time_req + '\'); return false; "';
12831283 }
1284 - html+=' title="' + title_msg + '">' +
1285 - gM(link_type+'_clip_msg') +
 1284+ html+=' title="' + title_msg + '">' +
 1285+ gM('mwe-'+link_type+'_clip_msg') +
12861286 '</a><br><span style="font-size:small">'+ title_msg +'<span></p>';
1287 - }
 1287+ }
12881288 }
1289 - }
 1289+ }
12901290 //js_og("should set html:"+ html);
12911291 $j('#liks_info_'+this.id).html(html);
12921292 },
@@ -1293,15 +1293,15 @@
12941294 js_log('f:playByTimeReq: '+time_req );
12951295 this.stop();
12961296 this.updateVideoTimeReq(time_req);
1297 - this.play();
 1297+ this.play();
12981298 },
12991299 doThumbnailHTML:function()
1300 - {
 1300+ {
13011301 var _this = this;
1302 - js_log('f:doThumbnailHTML'+ this.thumbnail_disp);
1303 - this.closeDisplayedHTML();
 1302+ js_log('f:doThumbnailHTML'+ this.thumbnail_disp);
 1303+ this.closeDisplayedHTML();
13041304 $j( '#mv_embedded_player_' + this.id ).html( this.getThumbnailHTML() );
1305 - this.paused = true;
 1305+ this.paused = true;
13061306 this.thumbnail_disp = true;
13071307 },
13081308 refreshControlsHTML:function(){
@@ -1312,40 +1312,40 @@
13131313 return;
13141314 }else{
13151315 $j('#mv_embedded_controls_'+this.id).html( this.getControlsHTML() );
1316 - ctrlBuilder.addControlHooks(this);
1317 - }
1318 - },
 1316+ ctrlBuilder.addControlHooks(this);
 1317+ }
 1318+ },
13191319 getControlsHTML:function()
1320 - {
 1320+ {
13211321 return ctrlBuilder.getControls( this );
1322 - },
1323 - getHTML : function (){
1324 - //@@todo check if we have sources avaliable
1325 - js_log('embedVideo:getHTML : ' + this.id + ' resource type: ' + this.type);
1326 - var _this = this;
1327 - var html_code = '';
1328 - html_code = '<div id="videoPlayer_'+this.id+'" style="width:'+this.width+'px;position:relative;" class="videoPlayer">';
 1322+ },
 1323+ getHTML : function (){
 1324+ //@@todo check if we have sources avaliable
 1325+ js_log('embedVideo:getHTML : ' + this.id + ' resource type: ' + this.type);
 1326+ var _this = this;
 1327+ var html_code = '';
 1328+ html_code = '<div id="videoPlayer_'+this.id+'" style="width:'+this.width+'px;position:relative;" class="videoPlayer">';
13291329 html_code += '<div style="width:'+parseInt(this.width)+'px;height:'+parseInt(this.height)+'px;" id="mv_embedded_player_'+this.id+'">' +
1330 - this.getThumbnailHTML() +
1331 - '</div>';
1332 - //js_log("mvEmbed:controls "+ typeof this.controls);
 1330+ this.getThumbnailHTML() +
 1331+ '</div>';
 1332+ //js_log("mvEmbed:controls "+ typeof this.controls);
13331333 if( this.controls )
13341334 {
13351335 js_log("f:getHTML:AddControls");
13361336 html_code +='<div id="mv_embedded_controls_' + this.id + '" class="ui-widget ui-corner-bottom ui-state-default controls" >';
1337 - html_code += this.getControlsHTML();
1338 - html_code +='</div>';
1339 - //block out some space by encapulating the top level div
 1337+ html_code += this.getControlsHTML();
 1338+ html_code +='</div>';
 1339+ //block out some space by encapulating the top level div
13401340 $j(this).wrap('<div style="width:'+parseInt(this.width)+'px;height:'
1341 - +(parseInt(this.height)+ctrlBuilder.height)+'px"></div>');
 1341+ +(parseInt(this.height)+ctrlBuilder.height)+'px"></div>');
13421342 }
1343 - html_code += '</div>'; //videoPlayer div close
 1343+ html_code += '</div>'; //videoPlayer div close
13441344 //js_log('should set: '+this.id);
1345 - $j(this).html( html_code );
 1345+ $j(this).html( html_code );
13461346 //add hooks once Controls are in DOM
1347 - ctrlBuilder.addControlHooks(this);
1348 -
1349 - //js_log('set this to: ' + $j(this).html() );
 1347+ ctrlBuilder.addControlHooks(this);
 1348+
 1349+ //js_log('set this to: ' + $j(this).html() );
13501350 //alert('stop');
13511351 //if auto play==true directly embed the plugin
13521352 if(this.autoplay)
@@ -1365,7 +1365,7 @@
13661366 }else{
13671367 if(!missing_type)
13681368 missing_type='';
1369 - out+= gM('mv_generic_missing_plugin', missing_type) + ' or <a title="'+gM('download_clip')+'" href="'+this.src +'">'+gM('download_clip')+'</a>';
 1369+ out+= gM('mwe-generic_missing_plugin', missing_type) + ' or <a title="'+gM('mwe-download_clip')+'" href="'+this.src +'">'+gM('mwe-download_clip')+'</a>';
13701370 }
13711371 return out + '</div>';
13721372 },
@@ -1375,7 +1375,7 @@
13761376 this.updateVideoTime(time_parts[0], time_parts[1]);
13771377 },
13781378 //update video time
1379 - updateVideoTime:function(start_ntp, end_ntp){
 1379+ updateVideoTime:function(start_ntp, end_ntp){
13801380 //update media
13811381 this.media_element.updateSourceTimes( start_ntp, end_ntp );
13821382 //update mv_time
@@ -1387,11 +1387,11 @@
13881388 this.seek_time_sec=0;
13891389 else
13901390 this.seek_time_sec=npt2seconds(start_ntp);
1391 - },
1392 - //@@todo overwite by embed library if we can render frames natavily
 1391+ },
 1392+ //@@todo overwite by embed library if we can render frames natavily
13931393 renderTimelineThumbnail:function( options ){
13941394 var my_thumb_src = this.media_element.getThumbnailURL();
1395 - //check if our thumbnail has a time attribute:
 1395+ //check if our thumbnail has a time attribute:
13961396 if( my_thumb_src.indexOf('t=') !== -1){
13971397 var time_ntp = seconds2npt ( options.time + parseInt(this.start_offset) );
13981398 my_thumb_src = getURLParamReplace( my_thumb_src, { 't':time_ntp, 'size': options.size } );
@@ -1399,7 +1399,7 @@
14001400 var thumb_class = (typeof options['thumb_class'] != 'undefined' ) ? options['thumb_class'] : '';
14011401 return '<div class="ui-corner-all ' + thumb_class + '" src="' + my_thumb_src + '" '+
14021402 'style="height:' + options.height + 'px;' +
1403 - 'width:' + options.width + 'px" >' +
 1403+ 'width:' + options.width + 'px" >' +
14041404 '<img src="' + my_thumb_src +'" '+
14051405 'style="height:' + options.height + 'px;' +
14061406 'width:' + options.width + 'px">' +
@@ -1410,58 +1410,58 @@
14111411 },
14121412 updateThumbTime:function( float_sec ){
14131413 //js_log('updateThumbTime:'+float_sec);
1414 - var _this = this;
1415 - if( typeof this.org_thum_src=='undefined' ){
 1414+ var _this = this;
 1415+ if( typeof this.org_thum_src=='undefined' ){
14161416 this.org_thum_src = this.media_element.getThumbnailURL();
1417 - }
 1417+ }
14181418 if( this.org_thum_src.indexOf('t=') !== -1){
1419 - this.last_thumb_url = getURLParamReplace(this.org_thum_src,
1420 - { 't' : seconds2npt( float_sec + parseInt(this.start_offset)) } );
1421 - if(!this.thumbnail_updating){
 1419+ this.last_thumb_url = getURLParamReplace(this.org_thum_src,
 1420+ { 't' : seconds2npt( float_sec + parseInt(this.start_offset)) } );
 1421+ if(!this.thumbnail_updating){
14221422 this.updateThumbnail(this.last_thumb_url ,false);
14231423 this.last_thumb_url =null;
14241424 }
14251425 }
14261426 },
14271427 //for now provide a src url .. but need to figure out how to copy frames from video for plug-in based thumbs
1428 - updateThumbPerc:function( perc ){
 1428+ updateThumbPerc:function( perc ){
14291429 return this.updateThumbTime( (this.getDuration() * perc) );
14301430 },
14311431 //updates the thumbnail if the thumbnail is being displayed
1432 - updateThumbnail : function(src, quick_switch){
1433 - //make sure we don't go to the same url if we are not already updating:
 1432+ updateThumbnail : function(src, quick_switch){
 1433+ //make sure we don't go to the same url if we are not already updating:
14341434 if( !this.thumbnail_updating && $j('#img_thumb_'+this.id).attr('src')== src )
14351435 return false;
1436 - //if we are already updating don't issue a new update:
 1436+ //if we are already updating don't issue a new update:
14371437 if( this.thumbnail_updating && $j('#new_img_thumb_'+this.id).attr('src')== src )
14381438 return false;
1439 -
 1439+
14401440 js_log('update thumb: ' + src);
1441 -
 1441+
14421442 if(quick_switch){
14431443 $j('#img_thumb_'+this.id).attr('src', src);
14441444 }else{
1445 - var _this = this;
 1445+ var _this = this;
14461446 //if still animating remove new_img_thumb_
14471447 if(this.thumbnail_updating==true)
1448 - $j('#new_img_thumb_'+this.id).stop().remove();
1449 -
 1448+ $j('#new_img_thumb_'+this.id).stop().remove();
 1449+
14501450 if(this.thumbnail_disp){
14511451 js_log('set to thumb:'+ src);
14521452 this.thumbnail_updating=true;
14531453 $j('#dc_'+this.id).append('<img src="'+src+'" ' +
14541454 'style="display:none;position:absolute;zindex:2;top:0px;left:0px;" ' +
14551455 'width="'+this.width+'" height="'+this.height+'" '+
1456 - 'id = "new_img_thumb_'+this.id+'" />');
1457 - //js_log('appended: new_img_thumb_');
1458 - $j('#new_img_thumb_'+this.id).fadeIn("slow", function(){
 1456+ 'id = "new_img_thumb_'+this.id+'" />');
 1457+ //js_log('appended: new_img_thumb_');
 1458+ $j('#new_img_thumb_'+this.id).fadeIn("slow", function(){
14591459 //once faded in remove org and rename new:
14601460 $j('#img_thumb_'+_this.id).remove();
14611461 $j('#new_img_thumb_'+_this.id).attr('id', 'img_thumb_'+_this.id);
14621462 $j('#img_thumb_'+_this.id).css('zindex','1');
1463 - _this.thumbnail_updating=false;
 1463+ _this.thumbnail_updating=false;
14641464 //js_log("done fadding in "+ $j('#img_thumb_'+_this.id).attr("src"));
1465 -
 1465+
14661466 //if we have a thumb queued update to that
14671467 if(_this.last_thumb_url){
14681468 var src_url =_this.last_thumb_url;
@@ -1478,7 +1478,7 @@
14791479 download, and embed code.
14801480 */
14811481 getThumbnailHTML : function ()
1482 - {
 1482+ {
14831483 js_log('embedVideo:getThumbnailHTML::' + this.id);
14841484 var thumb_html = '';
14851485 var class_atr='';
@@ -1493,10 +1493,10 @@
14941494 ' overflow:hidden; top:0px; left:0px; width:'+this.playerPixelWidth()+'px; height:'+this.playerPixelHeight()+'px; z-index:0;">'+
14951495 '<img width="'+this.playerPixelWidth()+'" height="'+this.playerPixelHeight()+'" style="position:relative;width:'+this.playerPixelWidth()+';height:'+this.playerPixelHeight()+'"' +
14961496 ' id="img_thumb_'+this.id+'" src="' + this.thumbnail + '">';
1497 -
 1497+
14981498 if(this.play_button == true && this.controls == true)
14991499 thumb_html+=this.getPlayButton();
1500 -
 1500+
15011501 thumb_html+='</div>';
15021502 return thumb_html;
15031503 },
@@ -1538,7 +1538,7 @@
15391539 },
15401540 getPlayButton:function(id){
15411541 if(!id)id=this.id;
1542 - return '<div title="' + gM('play_clip') + '" id="big_play_link_'+id+'" class="large_play_button" '+
 1542+ return '<div title="' + gM('mwe-play_clip') + '" id="big_play_link_'+id+'" class="large_play_button" '+
15431543 'style="left:'+((this.playerPixelWidth()-130)/2)+'px;'+
15441544 'top:' + ((this.playerPixelHeight()-96)/2) + 'px;">'+
15451545 '<img src="' + mv_skin_img_path + 'player_big_play_button.png">'+
@@ -1547,19 +1547,19 @@
15481548 doLinkBack:function(){
15491549 if(this.roe && this.media_element.addedROEData==false){
15501550 var _this = this;
1551 - this.displayHTML(gM('loading_txt'));
 1551+ this.displayHTML(gM('mwe-loading_txt'));
15521552 do_request(this.roe, function(data)
15531553 {
1554 - _this.media_element.addROE(data);
 1554+ _this.media_element.addROE(data);
15551555 _this.doLinkBack();
1556 - });
 1556+ });
15571557 }else{
1558 - if(this.media_element.linkback){
 1558+ if(this.media_element.linkback){
15591559 window.location = this.media_element.linkback;
15601560 }else{
1561 - this.displayHTML(gM('could_not_find_linkback'));
 1561+ this.displayHTML(gM('mwe-could_not_find_linkback'));
15621562 }
1563 - }
 1563+ }
15641564 },
15651565 //display the code to remotely embed this video:
15661566 showEmbedCode : function(embed_code){
@@ -1584,42 +1584,42 @@
15851585 this.displayHTML(o);
15861586 },
15871587 copyText:function(){
1588 - $j('#embedding_user_html_'+this.id).focus().select();
1589 - if(document.selection){
1590 - CopiedTxt = document.selection.createRange();
 1588+ $j('#embedding_user_html_'+this.id).focus().select();
 1589+ if(document.selection){
 1590+ CopiedTxt = document.selection.createRange();
15911591 CopiedTxt.execCommand("Copy");
15921592 }
15931593 },
1594 - showTextInterface:function(){
 1594+ showTextInterface:function(){
15951595 var _this = this;
1596 - //display the text container with loading text:
 1596+ //display the text container with loading text:
15971597 //@@todo support position config
1598 - var loc = $j(this).position();
 1598+ var loc = $j(this).position();
15991599 if($j('#metaBox_'+this.id).length==0){
16001600 $j(this).after('<div class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;z-index:10;'+
16011601 'top:' + (loc.top) + 'px;' +
16021602 'left:' + (parseInt( loc.left ) + parseInt(this.width) + 10 )+'px;' +
1603 - 'height:'+ parseInt( this.height )+'px;width:400px;' +
 1603+ 'height:'+ parseInt( this.height )+'px;width:400px;' +
16041604 'display:none;" ' +
16051605 'id="metaBox_' + this.id + '">'+
1606 - gM('loading_txt') +
1607 - '</div>');
 1606+ gM('mwe-loading_txt') +
 1607+ '</div>');
16081608 }
16091609 //fade in the text display
1610 - $j('#metaBox_'+this.id).fadeIn("fast");
 1610+ $j('#metaBox_'+this.id).fadeIn("fast");
16111611 //check if textObj present:
16121612 if(typeof this.textInterface == 'undefined' ){
16131613 //load the default text interface:
16141614 mvJsLoader.doLoad([
1615 - 'mvTextInterface',
 1615+ 'mvTextInterface',
16161616 '$j.fn.hoverIntent'
1617 - ], function(){
1618 - _this.textInterface = new mvTextInterface( _this );
 1617+ ], function(){
 1618+ _this.textInterface = new mvTextInterface( _this );
16191619 //show interface
16201620 _this.textInterface.show();
16211621 js_log("NEW TEXT INTERFACE");
16221622 for(var i in _this.textInterface.availableTracks){
1623 - js_log("tracks in new interface: "+_this.id+ ' tid:' + i);
 1623+ js_log("tracks in new interface: "+_this.id+ ' tid:' + i);
16241624 }
16251625 }
16261626 );
@@ -1636,26 +1636,26 @@
16371637 },
16381638 /** Generic function to display custom HTML inside the mv_embed element.
16391639 The code should call the closeDisplayedHTML function to close the
1640 - display of the custom HTML and restore the regular mv_embed display.
 1640+ display of the custom HTML and restore the regular mv_embed display.
16411641 @param {String} HTML code for the selection list.
16421642 */
16431643 displayHTML:function(html_code)
16441644 {
16451645 var sel_id = (this.pc!=null)?this.pc.pp.id:this.id;
1646 -
 1646+
16471647 if(!this.supports['overlays'])
16481648 this.stop();
1649 -
 1649+
16501650 //put select list on-top
16511651 //make sure the parent is relatively positioned:
16521652 $j('#'+sel_id).css('position', 'relative');
16531653 //set height width (check for playlist container)
16541654 var width = (this.pc)?this.pc.pp.width:this.playerPixelWidth();
16551655 var height = (this.pc)?this.pc.pp.height:this.playerPixelHeight();
1656 -
 1656+
16571657 if(this.pc)
16581658 height+=(this.pc.pp.pl_layout.title_bar_height + this.pc.pp.pl_layout.control_height);
1659 -
 1659+
16601660 var fade_in = true;
16611661 if($j('#blackbg_'+sel_id).length!=0)
16621662 {
@@ -1667,11 +1667,11 @@
16681668 'style="height:'+parseInt(height)+'px;width:'+parseInt(width)+'px;">'+
16691669 '<div class="videoOptionsComplete">'+
16701670 //@@TODO: this style should go to .css
1671 - '<span style="float:right;margin-right:10px">' +
 1671+ '<span style="float:right;margin-right:10px">' +
16721672 '<a href="#" style="color:white;" onClick="$j(\'#'+sel_id+'\').get(0).closeDisplayedHTML();return false;">close</a>' +
16731673 '</span>'+
16741674 '<div id="mv_disp_inner_'+sel_id+'" style="padding-top:10px;">'+
1675 - html_code
 1675+ html_code
16761676 +'</div>'+
16771677 '</div></div>';
16781678 $j('#'+sel_id).prepend(div_code);
@@ -1691,43 +1691,43 @@
16921692 });
16931693 return false; //onclick action return false
16941694 },
1695 - selectPlaybackMethod:function(){
 1695+ selectPlaybackMethod:function(){
16961696 //get id (in case where we have a parent container)
16971697 var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
1698 -
1699 - var _this=this;
 1698+
 1699+ var _this=this;
17001700 var out= '<span style="color:#FFF;background-color:black;"><blockquote style="background-color:black;">';
17011701 var _this=this;
17021702 //js_log('selected src'+ _this.media_element.selected_source.url);
1703 - $j.each( this.media_element.getPlayableSources(), function(source_id, source){
1704 - var default_player = embedTypes.players.defaultPlayer( source.getMIMEType() );
1705 -
 1703+ $j.each( this.media_element.getPlayableSources(), function(source_id, source){
 1704+ var default_player = embedTypes.players.defaultPlayer( source.getMIMEType() );
 1705+
17061706 var is_selected = (source == _this.media_element.selected_source);
17071707 var image_src = mv_skin_img_path ;
1708 -
1709 - //set the Playable source type:
 1708+
 1709+ //set the Playable source type:
17101710 if( source.mime_type == 'video/x-flv' ){
17111711 image_src += 'flash_icon_';
17121712 }else if( source.mime_type == 'video/h264'){
1713 - //for now all mp4 content is pulled from archive.org (so use archive.org icon)
 1713+ //for now all mp4 content is pulled from archive.org (so use archive.org icon)
17141714 image_src += 'archive_org_';
17151715 }else{
17161716 image_src += 'fish_xiph_org_';
17171717 }
17181718 image_src += is_selected ? 'color':'bw';
1719 - image_src += '.png';
1720 -
 1719+ image_src += '.png';
 1720+
17211721 if (default_player)
17221722 {
17231723 out += '<img src="'+image_src+'"/>';
17241724 if( ! is_selected )
17251725 out+='<a href="#" class="sel_source" id="sc_' + source_id + '_' + default_player.id +'">';
17261726 out += source.getTitle()+ (is_selected?'</a>':'') + ' ';
1727 -
1728 - //output the player select code:
1729 - var supporting_players = embedTypes.players.getMIMETypePlayers( source.getMIMEType() );
 1727+
 1728+ //output the player select code:
 1729+ var supporting_players = embedTypes.players.getMIMETypePlayers( source.getMIMEType() );
17301730 out+='<div id="player_select_list_' + source_id + '" class="player_select_list"><ul>';
1731 - for(var i=0; i < supporting_players.length ; i++){
 1731+ for(var i=0; i < supporting_players.length ; i++){
17321732 if( _this.selected_player.id == supporting_players[i].id && is_selected ){
17331733 out+='<li style="border-style:dashed;margin-left:20px;">'+
17341734 '<img border="0" width="16" height="16" src="' + mv_skin_img_path + 'plugin.png">' +
@@ -1743,60 +1743,60 @@
17441744 '</li>';
17451745 }
17461746 }
1747 - out+='</ul></div>';
 1747+ out+='</ul></div>';
17481748 }else
17491749 out+= source.getTitle() + ' - no player available';
17501750 });
17511751 out+='</blockquote></span>';
17521752 this.displayHTML(out);
1753 -
 1753+
17541754 //set up the click bindings:
17551755 $j('.sel_source').each(function(){
17561756 $j(this).click(function(){
17571757 var iparts = $j(this).attr( 'id' ).replace(/sc_/,'').split('_');
17581758 var source_id = iparts[0];
17591759 var default_player_id = iparts[1];
1760 - js_log('source id: ' + source_id + ' player id: ' + default_player_id);
1761 -
1762 - $j('#' + this_id ).get(0).closeDisplayedHTML();
 1760+ js_log('source id: ' + source_id + ' player id: ' + default_player_id);
 1761+
 1762+ $j('#' + this_id ).get(0).closeDisplayedHTML();
17631763 $j('#' + _this.id ).get(0).media_element.selectSource( source_id );
1764 -
 1764+
17651765 embedTypes.players.userSelectPlayer( default_player_id,
17661766 _this.media_element.sources[ source_id ].getMIMEType() );
1767 -
 1767+
17681768 //be sure to issue a stop
17691769 $j('#' + this_id ).get(0).stop();
1770 -
 1770+
17711771 //don't follow the empty # link:
17721772 return false;
17731773 });
17741774 });
1775 - },
1776 - showVideoDownload:function(){
 1775+ },
 1776+ showVideoDownload:function(){
17771777 //load the roe if available (to populate out download options:
17781778 //js_log('f:showVideoDownload '+ this.roe + ' ' + this.media_element.addedROEData);
17791779 if(this.roe && this.media_element.addedROEData == false){
17801780 var _this = this;
1781 - this.displayHTML(gM('loading_txt'));
 1781+ this.displayHTML(gM('mwe-loading_txt'));
17821782 do_request(this.roe, function(data)
17831783 {
1784 - _this.media_element.addROE(data);
 1784+ _this.media_element.addROE(data);
17851785 $j('#mv_disp_inner_'+_this.id).html( _this.getShowVideoDownload() );
1786 - });
 1786+ });
17871787 }else{
17881788 this.displayHTML( this.getShowVideoDownload() );
1789 - }
 1789+ }
17901790 },
1791 - getShowVideoDownload:function(){
 1791+ getShowVideoDownload:function(){
17921792 var out='<div style="color:white">' +
1793 - '<b style="color:white;">'+gM('download_segment')+'</b><br>';
 1793+ '<b style="color:white;">'+gM('mwe-download_segment')+'</b><br>';
17941794 out+='<blockquote style="background:#000">'+
1795 - gM('download_right_click') + '</blockquote><br>';
 1795+ gM('mwe-download_right_click') + '</blockquote><br>';
17961796 var dl_list='';
1797 - var dl_txt_list='';
 1797+ var dl_txt_list='';
17981798 $j.each(this.media_element.getSources(), function(index, source){
17991799 var dl_line = '<li>' + '<a style="color:white" href="' + source.getURI() +'"> '
1800 - + source.getTitle()+'</a> '+ '</li>'+"\n";
 1800+ + source.getTitle()+'</a> '+ '</li>'+"\n";
18011801 if( source.getURI().indexOf('?t=')!==-1){
18021802 out+=dl_line;
18031803 }else if( this.getMIMEType()=="text/cmml" || this.getMIMEType()=="text/x-srt" ){
@@ -1804,12 +1804,12 @@
18051805 }else{
18061806 dl_list+=dl_line;
18071807 }
1808 - });
1809 -
 1808+ });
 1809+
18101810 if(dl_list!='')
1811 - out+=gM('download_full') + '<blockquote style="background:#000">' + dl_list + '</blockquote>';
 1811+ out+=gM('mwe-download_full') + '<blockquote style="background:#000">' + dl_list + '</blockquote>';
18121812 if(dl_txt_list!='')
1813 - out+=gM('download_text')+'<blockquote style="background:#000">' + dl_txt_list +'</blockquote>';
 1813+ out+=gM('mwe-download_text')+'<blockquote style="background:#000">' + dl_txt_list +'</blockquote>';
18141814 out+='</div>';
18151815 return out;
18161816 },
@@ -1819,11 +1819,11 @@
18201820 */
18211821 play:function(){
18221822 var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
1823 -
1824 - //js_log( "mv_embed play:" + this.id);
 1823+
 1824+ //js_log( "mv_embed play:" + this.id);
18251825 //js_log('thum disp:'+this.thumbnail_disp);
18261826 //check if thumbnail is being displayed and embed html
1827 - if( this.thumbnail_disp ){
 1827+ if( this.thumbnail_disp ){
18281828 if( !this.selected_player ){
18291829 js_log('no selected_player');
18301830 //this.innerHTML = this.getPluginMissingHTML();
@@ -1831,21 +1831,21 @@
18321832 $j('#'+this.id).html( this.getPluginMissingHTML() );
18331833 }else{
18341834 this.doEmbedHTML();
1835 - this.onClipDone_disp=false;
1836 - this.paused=false;
1837 - this.thumbnail_disp=false;
 1835+ this.onClipDone_disp=false;
 1836+ this.paused=false;
 1837+ this.thumbnail_disp=false;
18381838 }
18391839 }else{
1840 - //the plugin is already being displayed
 1840+ //the plugin is already being displayed
18411841 this.paused=false; //make sure we are not "paused"
18421842 this.seeking=false;
1843 - }
1844 -
1845 - $j("#mv_play_pause_button_" + this_id + ' span').removeClass('ui-icon-play').addClass('ui-icon-pause');
1846 - $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){
 1843+ }
 1844+
 1845+ $j("#mv_play_pause_button_" + this_id + ' span').removeClass('ui-icon-play').addClass('ui-icon-pause');
 1846+ $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){
18471847 $j('#' + this_id ).get(0).pause();
1848 - }).attr('title', gM('pause_clip'));
1849 -
 1848+ }).attr('title', gM('mwe-pause_clip'));
 1849+
18501850 },
18511851 load:function(){
18521852 //should be done by child (no base way to load assets)
@@ -1853,41 +1853,41 @@
18541854 },
18551855 getSrc:function(){
18561856 return this.media_element.selected_source.getURI( this.seek_time_sec );
1857 - },
 1857+ },
18581858 /*
18591859 * base embed pause
18601860 * there is no general way to pause the video
18611861 * must be overwritten by embed object to support this functionality.
18621862 */
18631863 pause: function(){
1864 - var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
1865 - //js_log('mv_embed:do pause');
1866 - //(playing) do pause
1867 - this.paused = true;
1868 - //update the ctrl "paused state"
 1864+ var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
 1865+ //js_log('mv_embed:do pause');
 1866+ //(playing) do pause
 1867+ this.paused = true;
 1868+ //update the ctrl "paused state"
18691869 $j("#mv_play_pause_button_" + this_id + ' span').removeClass('ui-icon-pause').addClass('ui-icon-play');
1870 - $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){
 1870+ $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){
18711871 $j('#'+this_id).get(0).play();
1872 - }).attr('title', gM('play_clip'));
1873 - },
 1872+ }).attr('title', gM('mwe-play_clip'));
 1873+ },
18741874 /*
18751875 * base embed stop (can be overwritten by the plugin)
18761876 */
18771877 stop: function(){
18781878 var _this = this;
18791879 js_log('mvEmbed:stop:'+this.id);
1880 -
 1880+
18811881 //no longer seeking:
18821882 this.didSeekJump=false;
1883 -
1884 - //first issue pause to update interface (only call the parent)
 1883+
 1884+ //first issue pause to update interface (only call the parent)
18851885 if(this['parent_pause']){
18861886 this.parent_pause();
18871887 }else{
18881888 this.pause();
1889 - }
1890 -
1891 - //reset the currentTime:
 1889+ }
 1890+
 1891+ //reset the currentTime:
18921892 this.currentTime=0;
18931893 //check if thumbnail is being displayed in which case do nothing
18941894 if( this.thumbnail_disp ){
@@ -1900,12 +1900,12 @@
19011901 this.setSliderValue(0);
19021902 this.setStatus( this.getTimeReq() );
19031903 }
1904 -
1905 - //make sure the big playbutton is has click action:
 1904+
 1905+ //make sure the big playbutton is has click action:
19061906 $j('#big_play_link_' + _this.id).unbind('click').click(function(){
19071907 $j('#' +_this.id).get(0).play();
19081908 });
1909 -
 1909+
19101910 if(this.update_interval)
19111911 {
19121912 clearInterval(this.update_interval);
@@ -1913,19 +1913,19 @@
19141914 }
19151915 },
19161916 toggleMute:function(){
1917 - var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
 1917+ var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
19181918 if(this.muted){
19191919 this.muted=false;
19201920 $j('#volume_control_'+this_id + ' span').removeClass('ui-icon-volume-off').addClass('ui-icon-volume-on');
1921 - $j('#volume_bar_'+this_id).slider('value', 100);
 1921+ $j('#volume_bar_'+this_id).slider('value', 100);
19221922 this.updateVolumen(1);
19231923 }else{
19241924 this.muted=true;
19251925 $j('#volume_control_'+this_id + ' span').removeClass('ui-icon-volume-on').addClass('ui-icon-volume-off');
19261926 $j('#volume_bar_'+this_id).slider('value', 0);
1927 - this.updateVolumen(0);
 1927+ this.updateVolumen(0);
19281928 }
1929 - js_log('f:toggleMute::' + this.muted);
 1929+ js_log('f:toggleMute::' + this.muted);
19301930 },
19311931 updateVolumen:function(perc){
19321932 js_log('update volume not supported with current playback type');
@@ -1959,19 +1959,19 @@
19601960 postEmbedJS:function(){
19611961 return '';
19621962 },
1963 - //do common monitor code like update the playhead and play status
 1963+ //do common monitor code like update the playhead and play status
19641964 //plugin objects are responsible for updating currentTime
19651965 monitor:function(){
19661966 if( this.currentTime && this.currentTime > 0 && this.duration){
19671967 if( !this.userSlide ){
1968 - if( this.start_offset ){
1969 - //if start offset include that calculation
1970 - this.setSliderValue( ( this.currentTime - this.start_offset ) / this.duration );
1971 - this.setStatus( seconds2npt(this.currentTime) + '/'+ seconds2npt(parseFloat(this.start_offset)+parseFloat(this.duration) ));
 1968+ if( this.start_offset ){
 1969+ //if start offset include that calculation
 1970+ this.setSliderValue( ( this.currentTime - this.start_offset ) / this.duration );
 1971+ this.setStatus( seconds2npt(this.currentTime) + '/'+ seconds2npt(parseFloat(this.start_offset)+parseFloat(this.duration) ));
19721972 }else{
19731973 this.setSliderValue( this.currentTime / this.duration );
19741974 this.setStatus( seconds2npt(this.currentTime) + '/' + seconds2npt(this.duration ));
1975 - }
 1975+ }
19761976 }
19771977 }else{
19781978 //js_log(' ct:' + this.currentTime + ' dur: ' + this.duration);
@@ -1980,25 +1980,25 @@
19811981 }else if( this.isPaused() ){
19821982 this.setStatus( "paused" );
19831983 }else if( this.isPlaying() ){
1984 - if( this.currentTime && ! this.duration )
 1984+ if( this.currentTime && ! this.duration )
19851985 this.setStatus( seconds2npt( this.currentTime ) + ' /' );
1986 - else
 1986+ else
19871987 this.setStatus(" - - - ");
19881988 }else{
19891989 this.setStatus( this.getTimeReq() );
1990 - }
 1990+ }
19911991 }
1992 - //update buffer information
 1992+ //update buffer information
19931993 this.updateBufferStatus();
1994 -
 1994+
19951995 //update monitorTimerId to call child monitor
19961996 if( ! this.monitorTimerId ){
1997 - //make sure an instance of this.id exists:
 1997+ //make sure an instance of this.id exists:
19981998 if( document.getElementById(this.id) ){
19991999 this.monitorTimerId = setInterval('$j(\'#'+this.id+'\').get(0).monitor()', 250);
20002000 }
20012001 }
2002 - },
 2002+ },
20032003 stopMonitor:function(){
20042004 if( this.monitorTimerId != 0 )
20052005 {
@@ -2007,18 +2007,18 @@
20082008 }
20092009 },
20102010 updateBufferStatus: function(){
2011 -
2012 - //build the buffer targeet based for playlist vs clip
2013 - var buffer_select = (this.pc) ?
2014 - '#cl_status_' + this.id + ' .mv_buffer':
 2011+
 2012+ //build the buffer targeet based for playlist vs clip
 2013+ var buffer_select = (this.pc) ?
 2014+ '#cl_status_' + this.id + ' .mv_buffer':
20152015 '#mv_play_head_' + this.id + ' .mv_buffer';
2016 -
 2016+
20172017 //update the buffer progress bar (if available )
20182018 if( this.bufferedPercent != 0 ){
2019 - //js_log('bufferedPercent: ' + this.bufferedPercent);
 2019+ //js_log('bufferedPercent: ' + this.bufferedPercent);
20202020 if(this.bufferedPercent > 1)
2021 - this.bufferedPercent=1;
2022 -
 2021+ this.bufferedPercent=1;
 2022+
20232023 $j(buffer_select).css("width", (this.bufferedPercent*100) +'%' );
20242024 }else{
20252025 $j(buffer_select).css("width", '0px' );
@@ -2028,7 +2028,7 @@
20292029 if(!this.start_offset)
20302030 this.start_offset =0;
20312031 var rt = this.currentTime - this.start_offset;
2032 - if( rt < 0 ) //should not happen but does.
 2032+ if( rt < 0 ) //should not happen but does.
20332033 return 0;
20342034 return rt;
20352035 },
@@ -2044,7 +2044,7 @@
20452045 }
20462046 return null;
20472047 },
2048 - //HELPER Functions for selected source
 2048+ //HELPER Functions for selected source
20492049 /*
20502050 * returns the selected source url for players to play
20512051 */
@@ -2055,12 +2055,12 @@
20562056 //do head request if on the same domain
20572057 return this.media_element.selected_source.URLTimeEncoding;
20582058 },
2059 - setSliderValue: function(perc, hide_progress){
2060 - if(this.controls){
 2059+ setSliderValue: function(perc, hide_progress){
 2060+ if(this.controls){
20612061 var this_id = (this.pc)?this.pc.pp.id:this.id;
2062 - var val = parseInt( perc*1000 );
 2062+ var val = parseInt( perc*1000 );
20632063 $j('#mv_play_head_'+this_id).slider('value', val);
2064 -
 2064+
20652065 //js_log("embed video set: " + '#mv_play_head_'+this_id + ' to ' + val);
20662066 }
20672067 //js_log('set#mv_seeker_slider_'+this_id + ' perc in: ' + perc + ' * ' + $j('#mv_seeker_'+this_id).width() + ' = set to: '+ val + ' - '+ Math.round(this.mv_seeker_width*perc) );
@@ -2070,44 +2070,44 @@
20712071 js_log('highlightPlaySection');
20722072 var this_id = (this.pc)?this.pc.pp.id:this.id;
20732073 var dur = this.getDuration();
2074 - var hide_progress = true;
2075 - //set the left percet and update the slider:
 2074+ var hide_progress = true;
 2075+ //set the left percet and update the slider:
20762076 rel_start_sec = npt2seconds( options['start']);
2077 - //remove the start_offset if relevent:
 2077+ //remove the start_offset if relevent:
20782078 if(this.start_offset)
20792079 rel_start_sec = rel_start_sec - this.start_offset
2080 -
 2080+
20812081 var slider_perc=0;
20822082 if( rel_start_sec <= 0 ){
2083 - left_perc =0;
 2083+ left_perc =0;
20842084 options['start'] = seconds2npt( this.start_offset );
2085 - rel_start_sec=0;
 2085+ rel_start_sec=0;
20862086 this.setSliderValue( 0 , hide_progress);
20872087 }else{
2088 - left_perc = parseInt( (rel_start_sec / dur)*100 ) ;
 2088+ left_perc = parseInt( (rel_start_sec / dur)*100 ) ;
20892089 slider_perc = (left_perc / 100);
2090 - }
2091 - js_log("slider perc:" + slider_perc);
 2090+ }
 2091+ js_log("slider perc:" + slider_perc);
20922092 if( ! this.isPlaying() ){
2093 - this.setSliderValue( slider_perc , hide_progress);
 2093+ this.setSliderValue( slider_perc , hide_progress);
20942094 }
2095 -
2096 - width_perc = parseInt( (( npt2seconds( options['end'] ) - npt2seconds( options['start'] ) ) / dur)*100 ) ;
 2095+
 2096+ width_perc = parseInt( (( npt2seconds( options['end'] ) - npt2seconds( options['start'] ) ) / dur)*100 ) ;
20972097 if( (width_perc + left_perc) > 100 ){
2098 - width_perc = 100 - left_perc;
2099 - }
2100 - //js_log('should hl: '+rel_start_sec+ '/' + dur + ' re:' + rel_end_sec+' lp:' + left_perc + ' width: ' + width_perc);
 2098+ width_perc = 100 - left_perc;
 2099+ }
 2100+ //js_log('should hl: '+rel_start_sec+ '/' + dur + ' re:' + rel_end_sec+' lp:' + left_perc + ' width: ' + width_perc);
21012101 $j('#mv_seeker_' + this_id + ' .mv_highlight').css({
21022102 'left':left_perc+'%',
2103 - 'width':width_perc+'%'
2104 - }).show();
2105 -
 2103+ 'width':width_perc+'%'
 2104+ }).show();
 2105+
21062106 this.jump_time = options['start'];
21072107 this.seek_time_sec = npt2seconds( options['start']);
2108 - //trim output to
2109 - this.setStatus( gM('seek_to')+' '+ seconds2npt( this.seek_time_sec ) );
 2108+ //trim output to
 2109+ this.setStatus( gM('mwe-seek_to')+' '+ seconds2npt( this.seek_time_sec ) );
21102110 js_log('DO update: ' + this.jump_time);
2111 - this.updateThumbTime( rel_start_sec );
 2111+ this.updateThumbTime( rel_start_sec );
21122112 },
21132113 hideHighlight:function(){
21142114 var this_id = (this.pc)?this.pc.pp.id:this.id;
@@ -2119,7 +2119,7 @@
21202120 var id = (this.pc)?this.pc.pp.id:this.id;
21212121 //update status:
21222122 $j('#mv_time_'+id).html(value);
2123 - }
 2123+ }
21242124 }
21252125
21262126
@@ -2146,9 +2146,9 @@
21472147 supported_types:null,
21482148 library:null,
21492149 loaded:false,
2150 - loading_callbacks:null,
 2150+ loading_callbacks:null,
21512151 supportsMIMEType : function(type)
2152 - {
 2152+ {
21532153 for (var i=0; i < this.supported_types.length; i++)
21542154 if(this.supported_types[i] == type)
21552155 return true;
@@ -2156,7 +2156,7 @@
21572157 },
21582158 getName : function()
21592159 {
2160 - return gM('mv_ogg-player-' + this.id);
 2160+ return gM('mwe-ogg-player-' + this.id);
21612161 },
21622162 load : function(callback){
21632163 var libName = this.library+'Embed';
@@ -2164,17 +2164,17 @@
21652165 js_log('plugin loaded, do callback:');
21662166 callback();
21672167 }else{
2168 - var _this = this;
2169 - //jQuery based get script does not work so well.
2170 - mvJsLoader.doLoad([
 2168+ var _this = this;
 2169+ //jQuery based get script does not work so well.
 2170+ mvJsLoader.doLoad([
21712171 libName
21722172 ],function(){
2173 - callback();
 2173+ callback();
21742174 });
21752175 }
2176 - }
 2176+ }
21772177 }
2178 -/* players and supported mime types
 2178+/* players and supported mime types
21792179 @@todo ideally we query the plugin to get what mime types it supports in practice not always reliable/avaliable
21802180 */
21812181 var flowPlayer = new mediaPlayer('flowplayer',['video/x-flv', 'video/h264'],'flash');
@@ -2191,7 +2191,7 @@
21922192 //add generic
21932193 var oggPluginPlayer = new mediaPlayer('oggPlugin',['video/ogg'],'generic');
21942194
2195 -//depricate quicktime in favor of safari native
 2195+//depricate quicktime in favor of safari native
21962196 //var quicktimeMozillaPlayer = new mediaPlayer('quicktime-mozilla',['video/ogg'],'quicktime');
21972197 //var quicktimeActiveXPlayer = new mediaPlayer('quicktime-activex',['video/ogg'],'quicktime');
21982198
@@ -2216,24 +2216,24 @@
22172217 {
22182218 this.players = new Array();
22192219 this.loadPreferences();
2220 -
2221 - //set up default players order for each library type
 2220+
 2221+ //set up default players order for each library type
22222222 this.default_players['video/x-flv'] = ['flash','vlc'];
22232223 this.default_players['video/h264'] = ['flash', 'vlc'];
2224 -
2225 - this.default_players['video/ogg'] = ['native','vlc','java', 'generic'];
2226 - this.default_players['application/ogg'] = ['native','vlc','java', 'generic'];
2227 - this.default_players['audio/ogg'] = ['native','vlc', 'java', 'omtk' ];
 2224+
 2225+ this.default_players['video/ogg'] = ['native','vlc','java', 'generic'];
 2226+ this.default_players['application/ogg'] = ['native','vlc','java', 'generic'];
 2227+ this.default_players['audio/ogg'] = ['native','vlc', 'java', 'omtk' ];
22282228 this.default_players['video/mp4'] = ['vlc'];
2229 -
 2229+
22302230 this.default_players['text/html'] = ['html'];
22312231 this.default_players['image/jpeg'] = ['html'];
22322232 this.default_players['image/png'] = ['html'];
22332233 this.default_players['image/svg'] = ['html'];
2234 -
 2234+
22352235 },
22362236 addPlayer : function(player, mime_type)
2237 - {
 2237+ {
22382238 //js_log('Adding ' + player.id + ' with mime_type ' + mime_type);
22392239 for (var i =0; i < this.players.length; i++){
22402240 if (this.players[i].id == player.id)
@@ -2241,52 +2241,52 @@
22422242 if(mime_type!=null)
22432243 {
22442244 //make sure the mime_type is not already there:
2245 - var add_mime = true;
 2245+ var add_mime = true;
22462246 for(var j=0; j < this.players[i].supported_types.length; j++ ){
22472247 if( this.players[i].supported_types[j]== mime_type)
22482248 add_mime=false;
2249 - }
 2249+ }
22502250 if(add_mime)
22512251 this.players[i].supported_types.push(mime_type);
22522252 }
22532253 return;
22542254 }
22552255 }
2256 - //player not found:
 2256+ //player not found:
22572257 if(mime_type!=null)
2258 - player.supported_types.push(mime_type);
2259 -
 2258+ player.supported_types.push(mime_type);
 2259+
22602260 this.players.push( player );
22612261 },
22622262 getMIMETypePlayers : function(mime_type)
2263 - {
 2263+ {
22642264 var mime_players = new Array();
22652265 var _this = this;
22662266 var inx = 0;
2267 - if( this.default_players[mime_type] ){
2268 - $j.each( this.default_players[mime_type], function(d, lib){
2269 - var library = _this.default_players[mime_type][d];
2270 - for ( var i=0; i < _this.players.length; i++ ){
 2267+ if( this.default_players[mime_type] ){
 2268+ $j.each( this.default_players[mime_type], function(d, lib){
 2269+ var library = _this.default_players[mime_type][d];
 2270+ for ( var i=0; i < _this.players.length; i++ ){
22712271 if ( _this.players[i].library == library && _this.players[i].supportsMIMEType(mime_type) ){
2272 - mime_players[ inx ] = _this.players[i];
 2272+ mime_players[ inx ] = _this.players[i];
22732273 inx++;
22742274 }
22752275 }
22762276 });
2277 - }
 2277+ }
22782278 return mime_players;
22792279 },
22802280 defaultPlayer : function(mime_type)
2281 - {
2282 - js_log("get defaultPlayer for " + mime_type);
2283 - var mime_players = this.getMIMETypePlayers(mime_type);
 2281+ {
 2282+ js_log("get defaultPlayer for " + mime_type);
 2283+ var mime_players = this.getMIMETypePlayers(mime_type);
22842284 if( mime_players.length > 0)
22852285 {
22862286 // check for prior preference for this mime type
22872287 for( var i=0; i < mime_players.length; i++ ){
22882288 if( mime_players[i].id==this.preference[mime_type] )
22892289 return mime_players[i];
2290 - }
 2290+ }
22912291 // otherwise just return the first compatible player
22922292 // (it will be chosen according to the default_players list
22932293 return mime_players[0];
@@ -2326,7 +2326,7 @@
23272327 },
23282328 loadPreferences : function()
23292329 {
2330 - this.preference = new Object();
 2330+ this.preference = new Object();
23312331 // see if we have a cookie set to a clientSupported type:
23322332 var cookieVal = $j.cookie( 'ogg_player_exp' );
23332333 if (cookieVal)
@@ -2342,11 +2342,11 @@
23432343 },
23442344 savePreferences : function()
23452345 {
2346 - var cookieVal = '';
 2346+ var cookieVal = '';
23472347 for(var i in this.preference)
23482348 cookieVal+= i + '='+ this.preference[i] + '&';
2349 -
2350 - cookieVal=cookieVal.substr(0, cookieVal.length-1);
 2349+
 2350+ cookieVal=cookieVal.substr(0, cookieVal.length-1);
23512351 var week = 7*86400*1000;
23522352 $j.cookie( 'ogg_player_exp', cookieVal, { 'expires':week } );
23532353 }
@@ -2360,7 +2360,7 @@
23612361 var embedTypes = {
23622362 // List of players
23632363 players: null,
2364 - detect_done:false,
 2364+ detect_done:false,
23652365 init: function(){
23662366 //detect supported types
23672367 this.detect();
@@ -2380,7 +2380,7 @@
23812381 js_log("running detect");
23822382 this.players = new mediaPlayers();
23832383 //every browser supports html rendering:
2384 - this.players.addPlayer( htmlPlayer );
 2384+ this.players.addPlayer( htmlPlayer );
23852385 // In Mozilla, navigator.javaEnabled() only tells us about preferences, we need to
23862386 // search navigator.mimeTypes to see if it's installed
23872387 var javaEnabled = navigator.javaEnabled();
@@ -2392,28 +2392,28 @@
23932393 // And it doesn't register an application/x-java-applet mime type like Mozilla does.
23942394 if ( invisibleJava && javaEnabled )
23952395 this.players.addPlayer( cortadoPlayer );
2396 -
 2396+
23972397 // ActiveX plugins
23982398 if($j.browser.msie){
2399 - // check for flash
2400 - if ( this.testActiveX( 'ShockwaveFlash.ShockwaveFlash')){
2401 - //try to get the flash version for omtk include:
 2399+ // check for flash
 2400+ if ( this.testActiveX( 'ShockwaveFlash.ShockwaveFlash')){
 2401+ //try to get the flash version for omtk include:
24022402 try {
24032403 a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
24042404 d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
24052405 if (d) {
2406 - d = d.split(" ")[1].split(",");
 2406+ d = d.split(" ")[1].split(",");
24072407 //we need flash version 10 or greater:
24082408 if(parseInt( d[0]) >=10){
24092409 this.players.addPlayer( omtkPlayer );
24102410 }
2411 -
2412 - }
2413 - }catch(e) {}
2414 -
2415 - //flowplayer has pretty good compatiablity
 2411+
 2412+ }
 2413+ }catch(e) {}
 2414+
 2415+ //flowplayer has pretty good compatiablity
24162416 // (but if we wanted to be fancy we would check for version of flash and update the mp4/h.264 support
2417 - this.players.addPlayer( flowPlayer );
 2417+ this.players.addPlayer( flowPlayer );
24182418 }
24192419 // VLC
24202420 if ( this.testActiveX( 'VideoLAN.VLCPlugin.2' ) )
@@ -2423,14 +2423,14 @@
24242424 this.players.addPlayer(cortadoPlayer);
24252425 // quicktime
24262426 //if ( this.testActiveX( 'QuickTimeCheckObject.QuickTimeCheck.1' ) )
2427 - // this.players.addPlayer(quicktimeActiveXPlayer);
2428 - }
 2427+ // this.players.addPlayer(quicktimeActiveXPlayer);
 2428+ }
24292429 // <video> element
24302430 if ( typeof HTMLVideoElement == 'object' // Firefox, Safari
24312431 || typeof HTMLVideoElement == 'function' ) // Opera
24322432 {
2433 - //do another test for safari:
2434 - if( $j.browser.safari ){
 2433+ //do another test for safari:
 2434+ if( $j.browser.safari ){
24352435 try{
24362436 var dummyvid = document.createElement("video");
24372437 if (dummyvid.canPlayType && dummyvid.canPlayType("video/ogg;codecs=\"theora,vorbis\"") == "probably")
@@ -2441,7 +2441,7 @@
24422442 but xiph qt registers mimetype via quicktime plugin */
24432443 this.players.addPlayer( videoElementPlayer );
24442444 } else {
2445 - //@@todo add some user nagging to install the xiph qt
 2445+ //@@todo add some user nagging to install the xiph qt
24462446 }
24472447 }catch(e){
24482448 js_log('could not run canPlayType in safari');
@@ -2449,8 +2449,8 @@
24502450 }else{
24512451 this.players.addPlayer( videoElementPlayer );
24522452 }
2453 - }
2454 -
 2453+ }
 2454+
24552455 // Mozilla plugins
24562456 if( navigator.mimeTypes && navigator.mimeTypes.length > 0) {
24572457 for ( var i = 0; i < navigator.mimeTypes.length; i++ ) {
@@ -2464,17 +2464,17 @@
24652465 if ( !pluginName ) {
24662466 // In case it is null or undefined
24672467 pluginName = '';
2468 - }
 2468+ }
24692469 if ( pluginName.toLowerCase() == 'vlc multimedia plugin' || pluginName.toLowerCase() == 'vlc multimedia plug-in' ) {
24702470 this.players.addPlayer(vlcMozillaPlayer, type);
24712471 continue;
24722472 }
2473 -
 2473+
24742474 if ( javaEnabled && type == 'application/x-java-applet' ) {
24752475 this.players.addPlayer(cortadoPlayer);
24762476 continue;
2477 - }
2478 -
 2477+ }
 2478+
24792479 if ( type == 'application/ogg' ) {
24802480 if ( pluginName.toLowerCase() == 'vlc multimedia plugin' ){
24812481 this.players.addPlayer(vlcMozillaPlayer, type);
@@ -2493,14 +2493,14 @@
24942494 continue;
24952495 }
24962496 }
2497 -
 2497+
24982498 /*if ( type == 'video/quicktime' ) {
24992499 this.players.addPlayer(vlcMozillaPlayer, type);
25002500 continue;
25012501 }*/
25022502 if(type=='application/x-shockwave-flash'){
25032503 this.players.addPlayer( flowPlayer );
2504 -
 2504+
25052505 //check version to add omtk:
25062506 var flashDescription = navigator.plugins["Shockwave Flash"].description;
25072507 var descArray = flashDescription.split(" ");
@@ -2509,7 +2509,7 @@
25102510 //js_log("version of flash: " + versionMajor);
25112511 if(versionMajor >= 10){
25122512 this.players.addPlayer( omtkPlayer );
2513 - }
 2513+ }
25142514 continue;
25152515 }
25162516 }
@@ -2528,5 +2528,5 @@
25292529 hasObj = false;
25302530 }
25312531 return hasObj;
2532 - }
 2532+ }
25332533 };

Status & tagging log