r41525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41524‎ | r41525 | r41526 >
Date:23:14, 1 October 2008
Author:dale
Status:old
Tags:
Comment:
*fixed mvd_colors * fixed multiple streams with diffrent embed types bug
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_allpages.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_custom.css (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_search.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php
@@ -153,13 +153,17 @@
154154 $img_url = MV_StreamImage::getStreamImageURL( $mvd_page->stream_id, $mvd_page->start_time, $mvDefaultVideoPlaybackRes, true );
155155 }
156156 $oe_class = '';
 157+ //color annnotative layers seperatly:
 158+ $oe_class.=' ' . htmlspecialchars( strtolower( $mvd_page->mvd_type ) );
 159+ //preset classes for rendering on page load (will repaint but whatever)
157160 if ( $this->oddEvenToggle ) {
158161 $this->oddEvenToggle = false;
159 - $oe_class = ' even';
 162+ $oe_class .= ' even';
160163 } else {
161164 $this->oddEvenToggle = true;
162 - $oe_class = ' odd';
 165+ $oe_class .= ' odd';
163166 }
 167+
164168 // style=\"background:#".$this->getMvdBgColor($mvd_page)."\" "
165169 $wgOut->addHTML( '<fieldset class="mv_fd_mvd' . htmlspecialchars( $oe_class ) . '" id="mv_fd_mvd_' . htmlspecialchars( $mvd_page->id ) . '" ' .
166170 'name="' . htmlspecialchars( $mvd_page->wiki_title ) . '" ' .
Index: trunk/extensions/MetavidWiki/skins/mv_search.js
@@ -1,5 +1,5 @@
22 mv_addLoadEvent(mv_pre_setup_search);
3 -
 3+var mvSearchSetupFlag =false;
44 var maxFilters = 8;
55 var mv_search_action='';
66 function mv_pre_setup_search(req_mode){
@@ -10,6 +10,11 @@
1111 });
1212 }
1313 function mv_setup_search(req_mode){
 14+ if(!mvSearchSetupFlag)
 15+ mv_do_setup_search(req_mode);
 16+ mvSearchSetupFlag=true;
 17+}
 18+function mv_do_setup_search(req_mode){
1419 js_log('f:mv_setup_search: ');
1520 add_highlight_function();
1621 //look for existing auto completes:
Index: trunk/extensions/MetavidWiki/skins/mv_custom.css
@@ -9,6 +9,11 @@
1010 *
1111 * extended styles for metavid extension
1212 */
 13+/*annotative layers */
 14+.anno_en{
 15+ background:#DDD;
 16+}
 17+
1318 .mvd_page_image{
1419 float:left;
1520 padding-right:5px;
Index: trunk/extensions/MetavidWiki/skins/mv_allpages.js
@@ -96,9 +96,11 @@
9797 //js_log(this.href);
9898 //js_log(res);
9999 //replace with:
 100+ //check if we are instance of smwb-title (if so reduce font size)
 101+ var fsize = ( $j(this).parents().is(".smwb-title") )? '50%':'100%';
100102 //TEMP:
101103 $j(this).replaceWith('<div id="mvd_link_'+i+'" ' +
102 - 'style="vertical-align: bottom;margin:.5em;border:solid thin black;width:300px;height:60px;">' +
 104+ 'style="display:inline;font-size:'+fsize+';vertical-align: bottom;margin:.5em;border:solid thin black;width:300px;height:60px;">' +
103105 get_mvdrw_img(i) +
104106 '</div>');
105107 $j('#mv_mvd_ex_'+i).click(function(){
@@ -123,21 +125,23 @@
124126 var stream_desc = gMvd[i]['sn'].substr(0,1).toUpperCase() + gMvd[i]['sn'].substr(1).replace('_', ' ')+' '+ gMvd[i]['st'] + ' to '+ gMvd[i]['et'];
125127 //@@todo localize javascript msg
126128 var wiki_link = '<span title="Original Wiki Page" id="mv_pglink_'+i+'" style="cursor:pointer;width:16px;height:16px;float:left;background:url(\''+wgScriptPath+'/extensions/MetavidWiki/skins/images/run_mediawiki.png\');"/>';
127 - var expand_link = '<span title="Expand Clip" id="mv_mvd_ex_'+i+'" style="cursor:pointer;width:16px;height:16px;float:left;background:url(\''+wgScriptPath+'/extensions/MetavidWiki/skins/images/closed.png\');"/>';
 129+ var expand_link = '<span title="Play Inline" id="mv_mvd_ex_'+i+'" style="cursor:pointer;width:16px;height:16px;float:left;background:url(\''+wgScriptPath+'/extensions/MetavidWiki/skins/images/closed.png\');"/>';
128130 var img_url = wgScript+'?action=ajax&rs=mv_frame_server&stream_name='+gMvd[i]['sn']+'&t='+gMvd[i]['st']+'&size=icon';
129131 return '<img id="mvd_link_im_'+i+'" onclick="mv_ext('+i+')" ' +
130132 'style="cursor:pointer;float:left;height:'+size['h']+'px;width:'+size['w']+'px;" src="'+img_url+'">'+expand_link+wiki_link+' '+
131133 '<a title="'+stream_desc+'" href="'+stream_link+'">'+stream_desc+'</a><br>';
132134 }
133135 function mv_ext(inx){
134 - js_log('f:inx');
 136+ js_log('f:inx:'+inx);
135137 //grow the window to 300+240 540
136138 js_log('i: is '+ inx);
137139 $j('#mvd_link_'+inx).animate({width:'440px','height':'370px'},1000);
138 - $j('#mvd_link_im_'+inx).animate({width:'320px','height':'240px'},1000,function(){
 140+ $j('#mvd_link_im_'+inx).animate({width:'400px','height':'300px'},1000,function(){
139141 //do mv_embed swap
140 - $j('#mvd_link_im_'+inx).replaceWith('<video autoplay="true" id="mvd_vid_'+inx +'"></video>');
141 - $j('#mvd_vid_'+inx).attr('roe', base_roe_url + gMvd[inx]['sn']+'&t='+gMvd[inx]['st']+'/'+gMvd[inx]['et']);
 142+ $j('#mvd_link_im_'+inx).replaceWith('<div style="height:300px;width:400px;">' +
 143+ '<video roe="'+base_roe_url + gMvd[inx]['sn']+'&t='+gMvd[inx]['st']+'/'+gMvd[inx]['et']+'" ' +
 144+ 'autoplay="true" id="mvd_vid_'+inx +'"></video>' +
 145+ '</div>');
142146 init_mv_embed(true);
143147 });
144148 $j('#mv_mvd_ex_'+inx).css('background', 'url(\''+wgScriptPath+'/extensions/MetavidWiki/skins/images/opened.png\')');
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -68,7 +68,7 @@
6969 mvJsLoader.doLoad({
7070 '$j.ui.draggable.prototype.plugins.drag':'jquery/plugins/ui.draggable.ext.js'
7171 },function(){
72 - mv_init_interface.init();
 72+ mv_stream_interface.init();
7373 });
7474 });
7575 });
@@ -79,13 +79,16 @@
8080 * re sizes the mv_overlay component and mv_tools component
8181 * to take up the full page space.
8282 */
83 -var mv_init_interface = {
 83+var mv_stream_interface = {
8484 cur_mvd_id:'base',
8585 interfaceLoaded:false,
8686 init:function(){
8787 //don't call multiple times:
8888 if(this.interfaceLoaded)return;
89 - js_log('mv_init_interface call');
 89+ //set interfaceLoaded flag:
 90+ this.interfaceLoaded=true;
 91+
 92+ js_log('f:mv_stream_interface.init call');
9093 //add_custom_effects();
9194 //set up the init values for mouse over restore:
9295 org_vid_title = $j('#mv_stream_time').html();
@@ -137,6 +140,9 @@
138141 //add all the hover hooks:
139142 this.addHoverHooks();
140143
 144+ //add odd even classes (for non-annoative layers
 145+ this.oddEvenPaint();
 146+
141147 //add edit/navigate hook
142148 var st_input_mode=false;
143149 $j('#mv_stream_time').click(function(){
@@ -182,9 +188,16 @@
183189 //unlock the interface updates once everything is setup:
184190 mv_lock_vid_updates=false;
185191 js_log('done with mv_init_inerface');
186 - //$j('#embed_vid').get(0).stop();
187 - this.interfaceLoaded=true;
 192+ //$j('#embed_vid').get(0).stop();
188193 },
 194+ oddEvenPaint:function(){
 195+ //remove existing class:
 196+ $j('.mv_fd_mvd').removeClass("odd").removeClass("even");
 197+ $j('.mv_fd_mvd:odd').addClass("odd");
 198+ $j('.mv_fd_mvd:even').addClass("even");
 199+ //remove odd/even class for annoative layer:
 200+ $j('.anno_en').removeClass("odd").removeClass("even");
 201+ },
189202 addHoverHooks:function(selector){
190203 this_stream=this;
191204 if(!selector){
@@ -226,7 +239,7 @@
227240 if( vid_elm.isPlaying() ){
228241 if(!vid_elm.onClipDone_disp){
229242 this.delay_cur_mvd_id= mvd_id;
230 - setTimeout("mv_init_interface.delayDoVidMvdUpdate()", 250);
 243+ setTimeout("mv_stream_interface.delayDoVidMvdUpdate()", 250);
231244 }
232245 }else{
233246 this.cur_mvd_id=this.delay_cur_mvd_id=mvd_id;
@@ -241,13 +254,13 @@
242255 de_highlight_tl_ts(mvd_id);
243256 de_highlight_fd(mvd_id);
244257 js_log('calling interface restore: ');
245 - setTimeout('mv_init_interface.doRestore()',500);
 258+ setTimeout('mv_stream_interface.doRestore()',500);
246259 //activiate over on time restore
247260 /*$j('#mv_stream_time').hoverIntent({
248261 interval:200, //polling interval
249262 timeout:200, //delay before onMouseOut
250263 over:function(){
251 - mv_init_interface.doRestore();
 264+ mv_stream_interface.doRestore();
252265 },
253266 out:function(){
254267
@@ -257,7 +270,7 @@
258271 //delay video updates until we are not playing the clip and clipEnd is not displayed
259272 delayDoVidMvdUpdate:function(){
260273 if($j('#embed_vid').get(0).isPlaying()){
261 - setTimeout("mv_init_interface.delayDoVidMvdUpdate()", 250);
 274+ setTimeout("mv_stream_interface.delayDoVidMvdUpdate()", 250);
262275 }else{
263276 //only restore if the onClipDone_disp is false
264277 if( !$j('#embed_vid').get(0).onClipDone_disp){
@@ -277,7 +290,7 @@
278291 if( vid_elm.isPlaying()){
279292 js_log('vid elm is playing delay restore:')
280293 if(!vid_elm.userSlide) //dont' restore if userSlide is true
281 - setTimeout("mv_init_interface.doRestore()", 500);
 294+ setTimeout("mv_stream_interface.doRestore()", 500);
282295 }else{
283296 //only restore if onClipDone_disp is false
284297 if(!vid_elm.onClipDone_disp){
@@ -342,7 +355,7 @@
343356 /*function mv_doShowVideoDownload(){
344357 js_log('f:mv_doShowVideoDownload');
345358 //restores orginal state before showing download links:
346 - mv_init_interface.doRestore();
 359+ mv_stream_interface.doRestore();
347360 return $j('#embed_vid').get(0).org_showVideoDownload();
348361 }*/
349362 /* the mvdObject
@@ -639,6 +652,8 @@
640653 js_log('insert to end: ' + insertTitle.start_time + "\n" + node_html);
641654 $j('#selectionsBox').append(node_html);
642655 }
 656+ //repaint row colors:
 657+ mv_stream_interface.oddEvenPaint();
643658 }
644659
645660 function get_titleObject(titleKey){
@@ -664,7 +679,7 @@
665680 if (request.status != 200) result= "<div class='error'> " + request.status + " " + request.statusText + ": " + result + "</div>";
666681 $j('#mv_fcontent_'+mvd_id).html( result );
667682 //dirty hack to avoid re-write of article->delete();
668 - update_delete_submit(titleKey, mvd_id);
 683+ update_delete_submit(titleKey, mvd_id);
669684 }
670685 }
671686 function update_delete_submit(titleKey, mvd_id){
@@ -709,10 +724,12 @@
710725 eval(request.responseText);
711726 js_log('status: ' + mv_result['status']);
712727 if(mv_result['status']=='ok'){
713 - js_log(" status ok should remove: ");
 728+ js_log(" status ok should remove: "+mvd_id);
714729 //delete success remove mvd:
715730 $j('#mv_fd_mvd_'+mvd_id).remove();
716731 $j('#mv_tl_mvd_'+mvd_id).remove();
 732+ //repaint colors:
 733+ mv_stream_interface.oddEvenPaint();
717734 }else if(mv_result['status']=='error'){
718735 $j(setHtmlId).html( mv_result['error_txt'] );
719736 update_delete_submit(titleKey, mvd_id);
@@ -802,7 +819,7 @@
803820 $j('#mv_time_line').append(mv_result['tl_mvd']);
804821 mv_add_new_fd_mvd(mv_result['titleKey'], mv_result['fd_mvd']);
805822
806 - mv_init_interface.addHoverHooks('#mv_fd_mvd_'+mv_result['mvd_id']+',#mv_tl_mvd_'+mv_result['mvd_id']);
 823+ mv_stream_interface.addHoverHooks('#mv_fd_mvd_'+mv_result['mvd_id']+',#mv_tl_mvd_'+mv_result['mvd_id']);
807824 //scroll to the new mvd:
808825 scroll_to_pos(mv_result['mvd_id']);
809826 }
@@ -827,7 +844,7 @@
828845 //(use the titleKey returned from ajax request (in case it got clean or whatever)
829846 mv_add_new_fd_mvd(mv_result['titleKey'], mv_result['fd_mvd']);
830847
831 - mv_init_interface.addHoverHooks('#mv_fd_mvd_'+mvd_id);
 848+ mv_stream_interface.addHoverHooks('#mv_fd_mvd_'+mvd_id);
832849 //add tails
833850 //mv_add_mvd_tails(mv_result['titleKey']);
834851 //scroll to the new location (it should have keept its id (cuz its just a move)
@@ -888,9 +905,9 @@
889906 mv_lock_vid_updates=true;
890907 //update the src if nessesary and no mvd provided:
891908 if(!mvd_id){
892 - if(mv_init_interface.cur_mvd_id!=mv_init_interface.delay_cur_mvd_id){
893 - mv_init_interface.cur_mvd_id =mv_init_interface.delay_cur_mvd_id;
894 - do_video_mvd_update(mv_init_interface.cur_mvd_id);
 909+ if(mv_stream_interface.cur_mvd_id!=mv_stream_interface.delay_cur_mvd_id){
 910+ mv_stream_interface.cur_mvd_id =mv_stream_interface.delay_cur_mvd_id;
 911+ do_video_mvd_update(mv_stream_interface.cur_mvd_id);
895912 }
896913 }
897914 //update the embed video actual play time
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js
@@ -271,9 +271,9 @@
272272
273273 function locateFlashEmbed(clip)
274274 {
275 - for(var i in global_ogg_list)
 275+ for(var i in global_player_list)
276276 {
277 - var embed = document.getElementById(global_ogg_list[i]);
 277+ var embed = document.getElementById(global_player_list[i]);
278278 if(embed.media_element.selected_source.src.match(clip.fileName))
279279 {
280280 //js_log('found flash embed');
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -41,7 +41,7 @@
4242 var mv_restrict_roe_time_source = true;
4343
4444
45 -var global_ogg_list = new Array();
 45+var global_player_list = new Array();
4646 var global_req_cb = new Array();//the global request callback array
4747 var _global = this;
4848 var mv_init_done=false;
@@ -236,10 +236,11 @@
237237 //js_log('f:check_init_done');
238238 //check if all videos are "ready to play"
239239 var is_ready=true;
240 - for(var i in global_ogg_list)
241 - is_ready = ( $j('#'+global_ogg_list[i]).get(0).ready_to_play ) ? is_ready : false;
 240+ for(var i in global_player_list)
 241+ is_ready = ( $j('#'+global_player_list[i]).get(0).ready_to_play ) ? is_ready : false;
 242+
242243 if(!is_ready){
243 - //js_log('some ' + global_ogg_list + ' not ready');
 244+ //js_log('some ' + global_player_list + ' not ready');
244245 setTimeout( 'mvEmbed.check_init_done()', 250 );
245246 }else{
246247 //call the callback:
@@ -302,8 +303,7 @@
303304 this.loading_callbacks.push(callback);
304305
305306 js_log('plugin not loaded, queing callback');
306 - js_log('requesting plugin: ' + plugin_path);
307 -
 307+ js_log('requesting plugin: ' + plugin_path);
308308
309309 /*$j.getScript(plugin_path, function(){
310310 js_log(_this.id + ' plugin loaded');
@@ -313,10 +313,12 @@
314314 _this.loading_callbacks = null;
315315 });*/
316316
317 - eval('var lib = {"'+this.library+'Embed":\'embedLibs/mv_'+this.library+'Embed.js\'}');
 317+ eval('var lib = {"'+this.library+'Embed":\'embedLibs/mv_'+this.library+'Embed.js\'}');
 318+ //js_log('DO LOAD: '+this.library);
318319 mvJsLoader.doLoad(lib,function(){
319 - js_log(_this.id + ' plugin loaded');
320 - _this.loaded = true;
 320+ //js_log( 'type of lib: ' + eval( 'typeof ' + this.library + 'Embed' ) );
 321+ //js_log(_this.id + ' plugin loaded');
 322+ _this.loaded = true;
321323 for(var i in _this.loading_callbacks)
322324 _this.loading_callbacks[i]();
323325 _this.loading_callbacks = null;
@@ -424,9 +426,9 @@
425427 }
426428 if(selected_player)
427429 {
428 - for(var i in global_ogg_list)
 430+ for(var i in global_player_list)
429431 {
430 - var embed = $j('#'+global_ogg_list[i]).get(0);
 432+ var embed = $j('#'+global_player_list[i]).get(0);
431433 if(embed.media_element.selected_source && (embed.media_element.selected_source.mime_type == mime_type))
432434 {
433435 embed.selectPlayer(selected_player);
@@ -791,17 +793,26 @@
792794 var mvJsLoader = {
793795 libreq:{},
794796 libs:{},
 797+ //to keep consistancy across threads:
 798+ ptime:0,
 799+ ctime:0,
 800+
795801 load_time:0,
796 - doLoad:function(libs,callback){
797 - this.callback= (callback) ? callback:this.callback;
 802+ callbacks:new Array(),
 803+ doLoad:function(libs,callback){
 804+ this.ctime++;
 805+ //stack callbacks
 806+ if(callback){
 807+ //js_log('add callback: '+callback);
 808+ this.callbacks.push(callback);
 809+ }
798810 //merge any new requested libs
799811 if(libs){
800 - for(i in libs)
 812+ for(var i in libs)
801813 this.libs[i]=libs[i];
802814 }
803815 var loading=0;
804816 var i=null;
805 - //js_log("doLoad_ load set to 0 on libs:"+ libs);
806817 for(var i in this.libs){
807818 //if(i=='vlcEmbed')alert('got called with '+i+' ' + typeof(vlcEmbed));
808819 //itor the objPath (to avoid 'has no properties' errors)
@@ -809,9 +820,11 @@
810821 var cur_path ='';
811822 var cur_load=0;
812823 for(var p in objPath){
813 - cur_path = (cur_path=='')?cur_path+objPath[p]:cur_path+'.'+objPath[p];
814 - //if(i=='vlcEmbed')alert("looking at path: "+ cur_path);
815 - //js_log("eval: " + eval('typeof ('+cur_path+');'));
 824+ cur_path = (cur_path=='')?cur_path+objPath[p]:cur_path+'.'+objPath[p];
 825+ if(i=='flashEmbed'){
 826+ js_log("eval: " + eval('typeof ('+cur_path+');'));
 827+ js_log("cur_load = loading=1");
 828+ }
816829 if(eval('typeof '+cur_path)=='undefined'){
817830 cur_load = loading=1;
818831 break;
@@ -821,8 +834,7 @@
822835 break;
823836 }
824837 }
825 - if(cur_load==1){
826 - //js_log('missing lib:'+i + ' do load:'+mv_embed_path+libs[i]);
 838+ if(cur_load==1){
827839 if(!this.libreq[i])loadExternalJs(mv_embed_path + this.libs[i]);
828840 this.libreq[i]=1;
829841 }
@@ -834,8 +846,26 @@
835847 setTimeout('mvJsLoader.doLoad()',25);
836848 }
837849 }else{
838 - this.callback();
 850+ //only do callback if we are in the same range:
 851+ var cb_count=0;
 852+ for(var i in this.callbacks)
 853+ cb_count++;
 854+ //js_log('REST LIBS: loading is: '+ loading + ' run callbacks: '+cb_count);
 855+ //reset the libs
 856+ this.libs={};
 857+ //js_log('done loading do call: ' + this.callbacks[0] );
 858+ while(this.callbacks.length !=0 ){
 859+ if(this.ptime== ( this.ctime-1) ){ //enforce thread consistancy
 860+ this.callbacks.pop()();
 861+ //func = this.callbacks.pop();
 862+ //js_log(' run: '+this.ctime+ ' p: ' + this.ptime + ' ' +loading+ ' :'+ func);
 863+ //func();
 864+ }else{
 865+ break;
 866+ }
 867+ }
839868 }
 869+ this.ptime=this.ctime;
840870 }
841871 }
842872
@@ -847,7 +877,7 @@
848878 * and >= 1.1.4 not working: http://pastie.caboo.se/92595
849879 * $j(document).ready( function(){ */
850880 function init_mv_embed(force){
851 - //js_log('mv_init');
 881+ js_log('f:init_mv_embed');
852882 if(!force && mv_init_done){
853883 js_log("mv_init_done do nothing...");
854884 return false;
@@ -941,6 +971,43 @@
942972 function mv_embed(){
943973 //get mv_embed location if it has not been set
944974 js_log('mv_embed ' + mvEmbed.Version);
 975+
 976+ var loadPlaylistLib=false;
 977+ //jquery version:
 978+ $j('video,playlist').each(function(){
 979+ js_log( "LOOP ON: " +this.id + ' tag: '+ this.tagName);
 980+
 981+ elm_id = $j(this).attr("id");
 982+ if(!elm_id || elm_id==''){
 983+ elm_id = 'v'+ global_player_list.length;
 984+ $j(this).attr("id", elm_id);
 985+ }
 986+ //store a global reference to the id
 987+ global_player_list.push(elm_id);
 988+ //add loading:
 989+ $j(this).after('<div id="pre_loading_div_'+elm_id + '">'+
 990+ getMsg('loading_txt')+'</div>' );
 991+ //if video doSwap
 992+ if(this.tagName=='VIDEO'){
 993+ var videoInterface = new embedVideo(this);
 994+ swapEmbedVideoElement(this, videoInterface);
 995+ }
 996+ //if playlist set do load playlist
 997+ if(this.tagName=='PLAYLIST')
 998+ loadPlaylistLib=true;
 999+ });
 1000+ if(loadPlaylistLib){
 1001+ js_log('f:load Playlist Lib:');
 1002+ mvJsLoader.doLoad({'mvPlayList':'mv_playlist.js'},function(){
 1003+ $j('playlist').each(function(){
 1004+ //create new playlist interface:
 1005+ var playlistInterface = new mvPlayList( this );
 1006+ swapEmbedVideoElement(this, playlistInterface);
 1007+ });
 1008+ });
 1009+ }
 1010+
 1011+ /*
9451012 //send a request to load the given type
9461013 //js_log('detected: '+ embedTypes.getPlayerType() );
9471014 video_elements = document.getElementsByTagName("video");
@@ -951,9 +1018,11 @@
9521019 vid_id = $j(video_elements[i]).attr("id");
9531020 //set id if empty:
9541021 if(!vid_id || vid_id==''){
955 - video_elements[i].id= 'v'+ global_ogg_list.length;
 1022+ video_elements[i].id= 'v'+ global_player_list.length;
9561023 }
957 -
 1024+ //store a global reference to the id
 1025+ global_player_list.push(vid_id);
 1026+
9581027 //create and swap in the video interface:
9591028 var videoInterface = new embedVideo(video_elements[i]);
9601029 //swap in:
@@ -970,9 +1039,23 @@
9711040 }
9721041 //if there are no playlist elements do not load the playlist-js
9731042 playlist_elements = document.getElementsByTagName("playlist");
974 - if( playlist_elements.length > 0) {
 1043+ if( playlist_elements.length > 0) {
 1044+ for(var i = 0; i < playlist_elements.length; i++) {
 1045+ var pl_id = $j(playlist_elements[i]).attr("id");
 1046+ if(!pl_id || pl_id==''){
 1047+ pl_id = 'v'+ global_player_list.length;
 1048+ $j(playlist_elements[i]).attr("id", pl_id);
 1049+ }
 1050+ //add loading:
 1051+ $j(playlist_elements[i]).after('<div id="pre_loading_div_'+pl_id + '">'+
 1052+ getMsg('loading_txt')+'</div>' );
 1053+
 1054+ //store a global reference to the id
 1055+ global_player_list.push(pl_id);
 1056+ }
9751057 do_playlist_functions();
9761058 }
 1059+ * */
9771060 }
9781061
9791062 function mv_do_sequence(initObj){
@@ -998,24 +1081,13 @@
9991082 });
10001083 }
10011084
1002 -var pl_load_time=0;
1003 -function do_playlist_functions(){
 1085+/*var pl_load_time=0;
 1086+function do_playlist_functions(){
 1087+ js_log('f:do_playlist_functions:');
10041088 mvJsLoader.doLoad({'mvPlayList':'mv_playlist.js'},function(){
10051089 playlist_elements = document.getElementsByTagName("playlist");
10061090 js_log('loded pl js ' +playlist_elements.length );
1007 - for(var i = 0; i < playlist_elements.length; i++) {
1008 - var pl_id = $j(playlist_elements[i]).attr('id');
1009 - if(!pl_id || pl_id==''){
1010 - playlist_elements[i].id = 'v'+ global_ogg_list.length;
1011 - }
1012 - //add loading:
1013 - parent_elm = playlist_elements[i].parentNode;
1014 - load_div = document.createElement('div');
1015 - load_div.setAttribute("id", 'pre_loading_div_'+pl_id);
1016 - load_div.innerHTML=getMsg('loading_txt');
1017 - parent_elm.appendChild(load_div);
1018 - js_log('load div: '+load_div.innerHTML);
1019 -
 1091+ for(var i = 0; i < playlist_elements.length; i++) {
10201092 //create new playlist interface:
10211093 var playlistInterface = new mvPlayList( playlist_elements[i] );
10221094 if(swapEmbedVideoElement(playlist_elements[i], playlistInterface) ){
@@ -1023,7 +1095,7 @@
10241096 }
10251097 }
10261098 });
1027 -}
 1099+}*/
10281100
10291101 /*
10301102 * swapEmbedVideoElement
@@ -1083,12 +1155,8 @@
10841156 //now run the getHTML on the new embedVideo Obj:
10851157 embed_video.getHTML();
10861158 */
1087 - //js_log('html set:' + document.getElementById(embed_video.id).innerHTML);
1088 - //store a reference to the id
1089 - //(for single instance plugins that need to keep track of other instances on the page)
1090 - global_ogg_list.push(embed_video.id);
1091 -
1092 - js_log('done with child: ' + embed_video.id + ' len:'+global_ogg_list.length);
 1159+ //js_log('html set:' + document.getElementById(embed_video.id).innerHTML);
 1160+ js_log('done with child: ' + embed_video.id + ' len:'+global_player_list.length);
10931161 return true;
10941162 }
10951163 /*
@@ -1235,7 +1303,7 @@
12361304 if($j('#mmbody_'+this.pe.id).length==0)this.show();
12371305 $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){
12381306 if(!inserted){
1239 - js_log( ntp2seconds($j(this).attr('start')) + ' > ' + text_clip_start_time);
 1307+ //js_log( ntp2seconds($j(this).attr('start')) + ' > ' + text_clip_start_time);
12401308 if( ntp2seconds($j(this).attr('start')) > text_clip_start_time){
12411309 inserted=true;
12421310 $j(this).before(insertHTML);
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js
@@ -5,7 +5,6 @@
66 * part of mv_embed:
77 * http://metavid.ucsc.edu/wiki/index.php/Mv_embed
88 */
9 - js_log('load mv_playlist');
109 var mv_default_playlist_attributes = {
1110 //playlist attributes :
1211 "id":null,

Status & tagging log