Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php |
— | — | @@ -116,6 +116,7 @@ |
117 | 117 | if($ext=='jpg')header("Content-type: image/jpeg"); |
118 | 118 | if($ext=='png')header("Content-type: image/png"); |
119 | 119 | //print "img path: $img_path"; |
| 120 | + //@@todo a redirect to real image (will serv from cache that way) |
120 | 121 | if(is_file($img_path)){ |
121 | 122 | //print "file present: $img_path"; |
122 | 123 | @readfile($img_path); |
Index: trunk/extensions/MetavidWiki/includes/MV_MagicWords.php |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | $conds, |
127 | 127 | __METHOD__, |
128 | 128 | $options |
129 | | - ); |
| 129 | + ); |
130 | 130 | if($dbr->numRows($result)==0){ |
131 | 131 | return ''; |
132 | 132 | }else{ |
— | — | @@ -254,6 +254,7 @@ |
255 | 255 | $conds = '`time` >= ' . $dbr->addQuotes($this->getStartTime()); |
256 | 256 | |
257 | 257 | $options['GROUP BY']=$dbr->tableName('mv_search_digest').'.query_key'; |
| 258 | + $options['ORDER BY']='`hit_count` DESC'; |
258 | 259 | $options['LIMIT'] = $this->params['num_results']; |
259 | 260 | |
260 | 261 | $result = $dbr->select( $from_tables, |
— | — | @@ -261,7 +262,6 @@ |
262 | 263 | $conds, |
263 | 264 | __METHOD__, |
264 | 265 | $options); |
265 | | - |
266 | 266 | if($dbr->numRows($result)==0){ |
267 | 267 | return ''; |
268 | 268 | }else{ |
— | — | @@ -273,7 +273,7 @@ |
274 | 274 | } |
275 | 275 | $mvms=new MV_SpecialMediaSearch(); |
276 | 276 | $sTitle=Title::MakeTitle(NS_SPECIAL, 'MediaSearch'); |
277 | | - while($row = $dbr->fetchObject( $result )){ |
| 277 | + while($row = $dbr->fetchObject( $result )){ |
278 | 278 | $title_desc = htmlspecialchars($row->hit_count).' '.wfMsg('mv_date_'.$this->params['time_range']); |
279 | 279 | $mvms->loadFiltersFromSerialized($row->filters); |
280 | 280 | $o.='<li><a title="'.$title_desc.'" href="'.$sTitle->escapeLocalURL($mvms->get_httpd_filters_query().'&tl=1' ).'">'. |
— | — | @@ -283,7 +283,7 @@ |
284 | 284 | if($this->params['format']=='ul_list'){ |
285 | 285 | $o.='</ul>'; |
286 | 286 | } |
287 | | - } |
| 287 | + } |
288 | 288 | return $o; |
289 | 289 | } |
290 | 290 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_Index.php |
— | — | @@ -156,7 +156,10 @@ |
157 | 157 | $or=''; |
158 | 158 | while($row=$dbr->fetchObject($result)){ |
159 | 159 | $ret_ary[$row->id]=$row; |
| 160 | + //init array: |
160 | 161 | if($do_cat_lookup){ |
| 162 | + if(!isset($ret_ary[$row->id]->category)) |
| 163 | + $ret_ary[$row->id]->category=array(); |
161 | 164 | if($do_cat_lookup){ |
162 | 165 | $conds.=$or . ' cl_from ='.$dbr->addQuotes($row->id); |
163 | 166 | $or=' OR '; |
— | — | @@ -180,9 +183,7 @@ |
181 | 184 | $conds, |
182 | 185 | __METHOD__, |
183 | 186 | $options); |
184 | | - while($cat_row=$dbr->fetchObject($result_cat)){ |
185 | | - if(!isset($ret_ary[$cat_row->cl_from]->category)) |
186 | | - $ret_ary[$cat_row->cl_from]->category=array(); |
| 187 | + while($cat_row=$dbr->fetchObject($result_cat)){ |
187 | 188 | $ret_ary[$cat_row->cl_from]->category[]=$cat_row->cl_to; |
188 | 189 | } |
189 | 190 | } |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php |
— | — | @@ -279,7 +279,8 @@ |
280 | 280 | { |
281 | 281 | $dbw = & wfGetDB(DB_WRITE); |
282 | 282 | $dbr = & wfGetDB(DB_READ); |
283 | | - //print "DO SEARCH FOR: ". $this->getFilterDesc($query_key = true) . "\n"; |
| 283 | + //print_r($this->filters); |
| 284 | + //print "Adding to mv_search_digest : ". $this->getFilterDesc($query_key = true) . "\n"; |
284 | 285 | //print var_dump(debug_backtrace()); |
285 | 286 | //@@todo non-blocking insert... is that supported in mysql/php? |
286 | 287 | $dbw->insert('mv_search_digest', array ( |
— | — | @@ -963,15 +964,17 @@ |
964 | 965 | $o = $a = ''; |
965 | 966 | $bo = ($query_key) ? '' : '<b>'; |
966 | 967 | $bc = ($query_key) ? '' : '</b>'; |
967 | | - foreach ($this->filters as $inx => $f) { |
968 | | - if ($inx != 0) |
969 | | - $a = ' ' . wfMsg('mv_search_' . $f['a']) . ' '; |
970 | | - if($f['t']!='match') //no desc for text search |
971 | | - $o .= ($query_key) ? $a : $a . wfMsg('mv_' . $f['t']) . ' '; |
972 | | - if ($f['t'] == 'date_range') { //handle special case of date range: |
973 | | - $o .= wfMsg('mv_time_separator', $bo . htmlspecialchars($f['vs']) . $bc, $bo . htmlspecialchars($f['ve']) . $bc); |
974 | | - } else { |
975 | | - $o .= $bo . str_replace('_', ' ', htmlspecialchars($f['v'])) . $bc; |
| 968 | + if(is_array($this->filters)){ |
| 969 | + foreach ($this->filters as $inx => $f) { |
| 970 | + if ($inx != 0) |
| 971 | + $a = ' ' . wfMsg('mv_search_' . $f['a']) . ' '; |
| 972 | + if($f['t']!='match') //no desc for text search |
| 973 | + $o .= ($query_key) ? $a : $a . wfMsg('mv_' . $f['t']) . ' '; |
| 974 | + if ($f['t'] == 'date_range') { //handle special case of date range: |
| 975 | + $o .= wfMsg('mv_time_separator', $bo . htmlspecialchars($f['vs']) . $bc, $bo . htmlspecialchars($f['ve']) . $bc); |
| 976 | + } else { |
| 977 | + $o .= $bo . str_replace('_', ' ', htmlspecialchars($f['v'])) . $bc; |
| 978 | + } |
976 | 979 | } |
977 | 980 | } |
978 | 981 | return $o; |
Index: trunk/extensions/MetavidWiki/skins/mv_custom.css |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | * |
11 | 11 | * extended styles for metavid extension |
12 | 12 | */ |
| 13 | + |
13 | 14 | .tail_color{ |
14 | 15 | position:absolute; |
15 | 16 | width:10px; |
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js |
— | — | @@ -41,6 +41,8 @@ |
42 | 42 | var mv_flag_fdOver=false; |
43 | 43 | var golobal_org_ptext=false; |
44 | 44 | |
| 45 | +var mvTextScrollMonitorTimer = null; |
| 46 | + |
45 | 47 | var mv_open_edit_mvd=null; |
46 | 48 | if(!gMsg){var gMsg={};} |
47 | 49 | |
— | — | @@ -108,10 +110,10 @@ |
109 | 111 | $j('#big_play_link_embed_vid').attr('href', 'javascript:mv_do_play();'); |
110 | 112 | //extend stop button on mv_embed: |
111 | 113 | //js_log("pre stop: " +ebvid['stop'].toString() ); |
112 | | - if(ebvid['stop'].toString()!='function(){mv_do_stop();}'){ |
| 114 | + /*if(ebvid['stop'].toString()!='function(){mv_do_stop();}'){ |
113 | 115 | ebvid['org_eb_stop'] = ebvid['stop']; |
114 | 116 | ebvid['stop'] = function(){mv_do_stop();} |
115 | | - } |
| 117 | + }*/ |
116 | 118 | if(ebvid['play_or_pause'].toString()!='function(){mv_play_or_pause();}'){ |
117 | 119 | ebvid['org_eb_play_or_pause'] = ebvid['play_or_pause']; |
118 | 120 | ebvid['play_or_pause'] = function(){mv_play_or_pause();} |
— | — | @@ -119,8 +121,9 @@ |
120 | 122 | if(ebvid['showVideoDownload'].toString!='function(){mv_doShowVideoDownload();}'){ |
121 | 123 | ebvid['org_showVideoDownload'] = ebvid['showVideoDownload']; |
122 | 124 | ebvid['showVideoDownload'] = function(){mv_doShowVideoDownload();} |
123 | | - } |
124 | | - |
| 125 | + } |
| 126 | + //setup text scroll monitor: |
| 127 | + mv_doTextScrollMonitor(); |
125 | 128 | //js_log("post stop: " +ebvid['stop'].toString()); |
126 | 129 | } |
127 | 130 | //call stop override |
— | — | @@ -284,6 +287,41 @@ |
285 | 288 | } |
286 | 289 | } |
287 | 290 | } |
| 291 | +function mv_doTextScrollMonitor(){ |
| 292 | + if(!mvTextScrollMonitorTimer) |
| 293 | + mvTextScrollMonitorTimer=setInterval('mv_doTextScrollMonitor()',1000); |
| 294 | + //if playing scrollupdate |
| 295 | + var evid = $j('#embed_vid').get(0); |
| 296 | + if( evid.isPlaying() ){ |
| 297 | + if(evid.currentTime!=0) |
| 298 | + mv_scroll2Time(evid.currentTime); |
| 299 | + } |
| 300 | + if( evid.userSlide ){ |
| 301 | + mv_scroll2Time( ntp2seconds(evid.jump_time) ); |
| 302 | + } |
| 303 | + //if userScroll scroll/update |
| 304 | +} |
| 305 | +var previus_scroll2Time_time=null; |
| 306 | +var previus_scrollMvd_id=null; |
| 307 | +function mv_scroll2Time(sec_time){ |
| 308 | + if(previus_scroll2Time_time!=sec_time){ |
| 309 | + var scroll_mvd_id = null; |
| 310 | + //init pMvd_id |
| 311 | + var pMvd_id=$j('.mv_fd_mvd:first').attr("id").split('_').pop(); |
| 312 | + $j('.mv_fd_mvd').each(function(){ |
| 313 | + var curTitle = get_titleObject($j(this).attr('name')); |
| 314 | + if( curTitle.start_time >= sec_time ){ |
| 315 | + //js_log('found mvd pos: ' + curTitle.start_time + ' for sec time: ' + sec_time); |
| 316 | + if(previus_scrollMvd_id != pMvd_id){ |
| 317 | + scroll_to_pos( pMvd_id ) ; |
| 318 | + previus_scrollMvd_id = pMvd_id; |
| 319 | + } |
| 320 | + return false;//break out of for loop: |
| 321 | + } |
| 322 | + pMvd_id = $j(this).attr("id").split('_').pop(); |
| 323 | + }); |
| 324 | + } |
| 325 | +} |
288 | 326 | function mv_doShowVideoDownload(){ |
289 | 327 | //restores orginal state before showing download links: |
290 | 328 | mv_init_interface.doRestore(); |
— | — | @@ -454,7 +492,7 @@ |
455 | 493 | //if mv_embed state is "playing" swap preview button per html5 spec: |
456 | 494 | if($j('#embed_vid').get(0).isPlaying()){ |
457 | 495 | //do stop swap preview button back |
458 | | - mv_do_stop(); |
| 496 | + $j('#embed_vid').get(0).stop(); |
459 | 497 | } |
460 | 498 | //first time set up |
461 | 499 | //if(!golobal_org_ptext)golobal_org_ptext = $j('#wpPreview_'+mvd_id).val(); |
— | — | @@ -531,6 +569,7 @@ |
532 | 570 | * @@TODO add_autocomplete should be merged with generalized mv_helpers_ac |
533 | 571 | */ |
534 | 572 | function add_autocomplete(mvd_id){ |
| 573 | + js_log("f:auto_comp_choices_:"+mvd_id); |
535 | 574 | //make sure the target elements exist: |
536 | 575 | //if(!document.getElementById("auto_comp_"+mvd_id))return ; |
537 | 576 | //if(!document.getElementById("auto_comp_choices_"+mvd_id))return ; |
— | — | @@ -794,30 +833,29 @@ |
795 | 834 | function mv_play_or_pause(){ |
796 | 835 | //issue a stop since we want mouse_overs to work |
797 | 836 | var ebvid = $j('#embed_vid').get(0); |
798 | | - if(!ebvid.paused){ |
799 | | - mv_do_stop(); |
| 837 | + if( ebvid.isPlaying() ){ |
| 838 | + js_log('f:mv_play_or_pause:should stop'); |
| 839 | + ebvid.stop(); |
800 | 840 | ebvid.pauseed=true; |
801 | | - }else{ |
| 841 | + }else{ |
| 842 | + js_log('f:mv_play_or_pause:should play'); |
802 | 843 | mv_do_play(); |
803 | 844 | } |
804 | 845 | } |
805 | | -function mv_do_stop(){ |
806 | | - $j('#mv_videoPlayerTime').fadeIn('fast'); |
| 846 | +/*function mv_do_stop(){ |
807 | 847 | //re-enable interface: |
808 | 848 | mv_lock_vid_updates=false; |
809 | | - if($j('#embed_vid').get(0).thumbnail_disp){ |
| 849 | + if( $j('#embed_vid').get(0).isPlaying() ){ |
810 | 850 | //already stoped |
811 | 851 | js_log('already stoped'); |
812 | | - }else{ |
813 | | - //hide the controls thumbnail_disp |
814 | | - mv_disp_play_controls(false); |
| 852 | + }else{ |
815 | 853 | js_log('mv_do_stop'); |
816 | 854 | //run the original stop: |
817 | 855 | $j('#embed_vid').get(0).org_eb_stop(); |
818 | 856 | //re-rewrite the play button: |
819 | 857 | $j('#big_play_link_embed_vid').attr('href', 'javascript:mv_do_play();'); |
820 | 858 | } |
821 | | -} |
| 859 | +}*/ |
822 | 860 | function mv_do_play(mvd_id){ |
823 | 861 | //stop the current |
824 | 862 | $j('#embed_vid').get(0).stop(); |
— | — | @@ -826,11 +864,8 @@ |
827 | 865 | if(mvd_id){ |
828 | 866 | do_video_mvd_update(mvd_id); |
829 | 867 | } |
830 | | - //fade out the time disp: |
831 | | - $j('#mv_videoPlayerTime').fadeOut("fast"); |
832 | 868 | //disable interface actions (mouse in out etc) |
833 | 869 | mv_lock_vid_updates=true; |
834 | | - |
835 | 870 | //update the src if nessesary and no mvd provided: |
836 | 871 | if(!mvd_id){ |
837 | 872 | if(mv_init_interface.cur_mvd_id!=mv_init_interface.delay_cur_mvd_id){ |
— | — | @@ -838,9 +873,6 @@ |
839 | 874 | do_video_mvd_update(mv_init_interface.cur_mvd_id); |
840 | 875 | } |
841 | 876 | } |
842 | | - |
843 | | - //show the controls: |
844 | | - mv_disp_play_controls(true); |
845 | 877 | //update the embed video actual play time |
846 | 878 | //time_chunk = $j('#embed_vid').get(0).src.split('t='); |
847 | 879 | //$j('#mv_videoPlayerTime').html( time_chunk[1] ); |
— | — | @@ -884,11 +916,20 @@ |
885 | 917 | $j('#MV_StreamMeta,#MV_Tools').css({'top':org_top_tool_contain+'px'}); |
886 | 918 | } |
887 | 919 | } |
888 | | - |
| 920 | +//hackish globals .. needs a rewrite |
| 921 | +var mv_currently_scroll_to_pos=false; |
889 | 922 | function scroll_to_pos(mvd_id){ |
| 923 | + js_log('scroll_to_pos:'+mvd_id); |
| 924 | + var speed = (mv_currently_scroll_to_pos)?'fast':'slow'; |
890 | 925 | if( $j('#mv_fd_mvd_'+mvd_id).get(0)){ |
891 | 926 | //@@todo debug IE issues with scrolling |
892 | | - $j('#selectionsBox').animate({scrollTop: ($j('#mv_fd_mvd_'+mvd_id).get(0).offsetTop-40)}, 'slow'); |
| 927 | + $j('#selectionsBox').animate({ |
| 928 | + scrollTop: ($j('#mv_fd_mvd_'+mvd_id).get(0).offsetTop-40) |
| 929 | + }, |
| 930 | + speed, |
| 931 | + function(){ |
| 932 | + mv_currently_scroll_to_pos=false; |
| 933 | + }); |
893 | 934 | } |
894 | 935 | } |
895 | 936 | function highlight_fd(mvd_id){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -14,8 +14,7 @@ |
15 | 15 | * (in cases where media will be hosted in a different place than the embbeding page) |
16 | 16 | * |
17 | 17 | */ |
18 | | - |
19 | | -var MV_EMBED_VERSION = '1.0'; |
| 18 | +var MV_EMBED_VERSION = '1.0rc1'; |
20 | 19 | var mv_embed_path = null; |
21 | 20 | //whether or not to load java from an iframe. |
22 | 21 | //note: this is necessary for remote embedding because of java security model) |
— | — | @@ -170,14 +169,16 @@ |
171 | 170 | lib_jquery:{'window.jQuery':'jquery/jquery-1.2.6.min.js'}, |
172 | 171 | lib_plugins:{ |
173 | 172 | '$j.timer.global':'jquery/plugins/jquery.timers.js', //we should try and factor out the timer |
174 | | - '$j.fn.offsetParent':'jquery/plugins/jquery.dimensions.js', |
175 | | - '$j.ui.mouseInteraction':'jquery/plugins/ui.mouse.js', |
176 | | - '$j.ui.slider':'jquery/plugins/ui.slider.js', |
177 | | - '$j.ui.draggable':'jquery/plugins/ui.draggable.js', //include draggable |
178 | | - '$j.ui.droppable':'jquery/plugins/ui.droppable.js' |
| 173 | + '$j.ui.mouse' :'jquery/jquery.ui-1.5.2/ui/minified/ui.core.min.js' |
179 | 174 | }, |
180 | | - /*old lib includes: |
181 | | - '$j.ui.progressbar':'jquery/jquery-ui-personalized-1.6rc1.debug.js' |
| 175 | + lib_controlui:{ |
| 176 | + '$j.ui.droppable':'jquery/jquery.ui-1.5.2/ui/minified/ui.droppable.min.js', |
| 177 | + '$j.ui.draggable':'jquery/jquery.ui-1.5.2/ui/minified/ui.draggable.min.js', |
| 178 | + '$j.ui.resizable':'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js' |
| 179 | + }, |
| 180 | + /* @@todo move to single packaged jquery ui library: |
| 181 | + , //include draggable |
| 182 | + '$j.ui.progressbar':'jquery/jquery-ui-personalized-1.6rc1.debug.js' |
182 | 183 | */ |
183 | 184 | pc:null, //used to store pointer to parent clip (when in playlist mode) |
184 | 185 | load_libs:function(callback){ |
— | — | @@ -195,9 +196,13 @@ |
196 | 197 | js_log('jquery loaded'); |
197 | 198 | |
198 | 199 | mvJsLoader.doLoad(_this.lib_plugins, function(){ |
199 | | - js_log('plugins loaded'); |
200 | | - mvEmbed.libs_loaded=true; |
201 | | - mvEmbed.init(); |
| 200 | + js_log('loaded ui core'); |
| 201 | + //load control ui after ui.core loaded |
| 202 | + mvJsLoader.doLoad(_this.lib_controlui,function(){ |
| 203 | + js_log('plugins loaded'); |
| 204 | + mvEmbed.libs_loaded=true; |
| 205 | + mvEmbed.init(); |
| 206 | + }); |
202 | 207 | }); |
203 | 208 | }); |
204 | 209 | }, |
— | — | @@ -548,19 +553,20 @@ |
549 | 554 | / |
550 | 555 | ($j('#mv_seeker_'+_this.id).width()-14)); |
551 | 556 | |
552 | | - this.jump_time = seconds2ntp(parseInt(_this.getDuration()*perc)+ _this.start_time_sec); |
553 | | - js_log('perc:' + perc + ' * ' + _this.getDuration() + ' jt:'+ this.jump_time); |
554 | | - _this.setStatus( getMsg('seek_to')+' '+this.jump_time ); |
| 557 | + _this.jump_time = seconds2ntp(parseInt(_this.getDuration()*perc)+ _this.start_time_sec); |
| 558 | + //js_log('perc:' + perc + ' * ' + _this.getDuration() + ' jt:'+ this.jump_time); |
| 559 | + _this.setStatus( getMsg('seek_to')+' '+_this.jump_time ); |
555 | 560 | //update the thumbnail/ frame |
556 | 561 | _this.updateTimeThumb(perc); |
557 | 562 | }, |
558 | 563 | stop:function(e, ui){ |
559 | 564 | _this.userSlide=false; |
560 | | - js_log('do jump to: '+this.jump_time) |
| 565 | + js_log('do jump to: '+_this.jump_time) |
561 | 566 | //reset slider |
562 | | - _this.seek_time_sec=ntp2seconds(this.jump_time); |
563 | | - //_this.stop(); |
564 | | - //_this.play(); |
| 567 | + _this.seek_time_sec=ntp2seconds(_this.jump_time); |
| 568 | + _this.stop(); |
| 569 | + //do play in 300ms (give things time to "cool down") |
| 570 | + setTimeout('$j(\'#'+_this.id+'\').get(0).play()',300); |
565 | 571 | } |
566 | 572 | }); |
567 | 573 | }, |
— | — | @@ -1327,7 +1333,7 @@ |
1328 | 1334 | $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){ |
1329 | 1335 | if(ntp2seconds($j(this).attr('start')) == cur_time){ |
1330 | 1336 | _this.prevTimeScroll=cur_time; |
1331 | | - $j('#mmbody_'+_this.pe.id).animate({scrollTop: $j(this).position().top}, 'slow'); |
| 1337 | + $j('#mmbody_'+_this.pe.id).animate({scrollTop: $j(this).get(0).offsetTop}, 'slow'); |
1332 | 1338 | } |
1333 | 1339 | }); |
1334 | 1340 | } |
— | — | @@ -1519,7 +1525,7 @@ |
1520 | 1526 | * supports media_url?t=ntp_start/ntp_end url request format |
1521 | 1527 | */ |
1522 | 1528 | parseURLDuration : function(){ |
1523 | | - js_log('f:parseURLDuration() for:' + this.src); |
| 1529 | + //js_log('f:parseURLDuration() for:' + this.src); |
1524 | 1530 | var index_time_val = false; |
1525 | 1531 | if(this.src.indexOf('?t=')!=-1)index_time_val='?t='; |
1526 | 1532 | if(this.src.indexOf('&t=')!=-1)index_time_val='&t='; |
— | — | @@ -1998,8 +2004,9 @@ |
1999 | 2005 | return default_time_req; |
2000 | 2006 | return this.media_element.selected_source.start_ntp+'/'+this.media_element.selected_source.end_ntp; |
2001 | 2007 | }, |
2002 | | - getDuration:function(){ |
| 2008 | + getDuration:function(){ |
2003 | 2009 | this.duration = this.media_element.selected_source.duration; |
| 2010 | + this.start_offset = this.media_element.selected_source.start_offset; |
2004 | 2011 | return this.duration; |
2005 | 2012 | }, |
2006 | 2013 | /* get the duration in ntp format */ |
— | — | @@ -2258,7 +2265,7 @@ |
2259 | 2266 | return; |
2260 | 2267 | }else{ |
2261 | 2268 | $j('#mv_embedded_controls_'+this.id).html( this.getControlsHTML() ); |
2262 | | - this.addControlHooks(); |
| 2269 | + ctrlBuilder.addControlHooks(this); |
2263 | 2270 | } |
2264 | 2271 | }, |
2265 | 2272 | getControlsHTML:function() |
— | — | @@ -2335,18 +2342,19 @@ |
2336 | 2343 | js_log("UPDATE SRC:"+src); |
2337 | 2344 | this.src = src; |
2338 | 2345 | }, |
2339 | | - updateTimeThumb: function(perc){ |
| 2346 | + updateTimeThumb: function(perc){ |
| 2347 | + var _this = this; |
2340 | 2348 | //do quick thumb update |
2341 | 2349 | if(typeof org_thum_src=='undefined'){ |
2342 | 2350 | org_thum_src = this.media_element.getThumbnailURL(); |
2343 | | - } |
| 2351 | + } |
2344 | 2352 | if(org_thum_src.indexOf('t=')!==-1){ |
2345 | | - this.updateThumbnail( getUpdateTimeURL( |
2346 | | - seconds2ntp( (this.getDuration() * perc) + this.start_offset) |
2347 | | - ) |
2348 | | - ); |
2349 | | - } |
2350 | | - js_log('f:doUpdateTimeThumb: update thumb to: '+ perc + ' os:'+ org_thum_src); |
| 2353 | + this.last_thumb_url = getUpdateTimeURL(org_thum_src,seconds2ntp( (this.getDuration() * perc) + parseInt(this.start_offset))); |
| 2354 | + if(!this.thumbnail_updating){ |
| 2355 | + this.updateThumbnail(this.last_thumb_url ,false); |
| 2356 | + this.last_thumb_url =null; |
| 2357 | + } |
| 2358 | + } |
2351 | 2359 | }, |
2352 | 2360 | //updates the thumbnail if the thumbnail is being displayed |
2353 | 2361 | updateThumbnail : function(src, quick_switch){ |
— | — | @@ -2358,8 +2366,7 @@ |
2359 | 2367 | |
2360 | 2368 | //if still animating remove new_img_thumb_ |
2361 | 2369 | if(this.thumbnail_updating==true) |
2362 | | - $j('#new_img_thumb_'+this.id).stop().remove(); |
2363 | | - |
| 2370 | + $j('#new_img_thumb_'+this.id).stop().remove(); |
2364 | 2371 | if(this.thumbnail_disp){ |
2365 | 2372 | this.thumbnail_updating=true; |
2366 | 2373 | $j('#dc_'+this.id).append('<img src="'+src+'" ' + |
— | — | @@ -2374,9 +2381,14 @@ |
2375 | 2382 | $j('#img_thumb_'+_this.id).css('zindex','1'); |
2376 | 2383 | _this.thumbnail_updating=false; |
2377 | 2384 | //js_log("done fadding in "+ $j('#img_thumb_'+_this.id).attr("src")); |
| 2385 | + |
| 2386 | + //if we have a thumb queued update to that |
| 2387 | + if(_this.last_thumb_url){ |
| 2388 | + var src_url =_this.last_thumb_url; |
| 2389 | + _this.last_thumb_url=null; |
| 2390 | + _this.updateThumbnail(src_url); |
| 2391 | + } |
2378 | 2392 | }); |
2379 | | - }else{ |
2380 | | - //do a quick switch |
2381 | 2393 | } |
2382 | 2394 | } |
2383 | 2395 | }, |
— | — | @@ -2739,10 +2751,10 @@ |
2740 | 2752 | return null |
2741 | 2753 | }, |
2742 | 2754 | /* |
2743 | | - * base embed stop (should be overwritten by the plugin) |
| 2755 | + * base embed stop (can be overwritten by the plugin) |
2744 | 2756 | */ |
2745 | 2757 | stop: function(){ |
2746 | | - js_log('base stop:'+this.id); |
| 2758 | + js_log('mvEmbed:stop:'+this.id); |
2747 | 2759 | //check if thumbnail is being displayed in which case do nothing |
2748 | 2760 | if(this.thumbnail_disp){ |
2749 | 2761 | //already in stooped state |
— | — | @@ -2751,6 +2763,7 @@ |
2752 | 2764 | //rewrite the html to thumbnail disp |
2753 | 2765 | this.doThumbnailHTML(); |
2754 | 2766 | this.setSliderValue(0); |
| 2767 | + this.setStatus(this.getTimeReq()); |
2755 | 2768 | } |
2756 | 2769 | if(this.update_interval) |
2757 | 2770 | { |
— | — | @@ -2851,7 +2864,7 @@ |
2852 | 2865 | //js_log('currentTime:'+ this.currentTime); |
2853 | 2866 | |
2854 | 2867 | var val = Math.round( perc * $j('#mv_seeker_'+id).width() - (this.mv_seeker_width*perc)); |
2855 | | - $j('#mv_seeker_slider_'+id).css('left', (val+41)+'px' ); |
| 2868 | + $j('#mv_seeker_slider_'+id).css('left', (val)+'px' ); |
2856 | 2869 | //js_log('perc in: ' + perc + ' * ' + $j('#mv_seeker_'+id).width() + ' = set to: '+ val + ' - '+ Math.round(this.mv_seeker_width*perc) ); |
2857 | 2870 | //js_log('op:' + offset_perc + ' *('+perc+' * ' + $j('#slider_'+id).width() + ')'); |
2858 | 2871 | }, |
— | — | @@ -2878,15 +2891,15 @@ |
2879 | 2892 | /* |
2880 | 2893 | * utility functions: |
2881 | 2894 | */ |
2882 | | -function getUpdateTimeURL(url, new_time){ |
2883 | | - pSrc = parseUri(url); |
| 2895 | +function getUpdateTimeURL(url, new_time){ |
| 2896 | + pSrc =parseUri(url); |
2884 | 2897 | var new_url = pSrc.protocol +'://'+ pSrc.host + pSrc.path +'?'; |
2885 | 2898 | var amp = ''; |
2886 | 2899 | for(i in pSrc.queryKey){ |
2887 | 2900 | new_url +=(i=='t')? amp + 't=' + new_time: |
2888 | 2901 | amp+i+'='+ pSrc.queryKey[i]; |
2889 | 2902 | amp = '&'; |
2890 | | - } |
| 2903 | + } |
2891 | 2904 | return new_url; |
2892 | 2905 | } |
2893 | 2906 | function seconds2ntp(sec){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skin/styles.css |
— | — | @@ -162,6 +162,7 @@ |
163 | 163 | height: 12px; |
164 | 164 | background: url(images/player_seek_bg_loaded.png) 0 1px repeat-x; |
165 | 165 | margin: 9px 0px 0 0px; |
| 166 | + position:relative; |
166 | 167 | } |
167 | 168 | .videoPlayer .seeker .seeker_bar_outer { |
168 | 169 | width: 100%; |
— | — | @@ -185,7 +186,7 @@ |
186 | 187 | background: url(images/player_slider.png) 0 0 no-repeat; |
187 | 188 | width: 14px; |
188 | 189 | height: 14px; |
189 | | - position: absolute; |
| 190 | + position: relative; |
190 | 191 | z-index: 2; |
191 | 192 | margin: -13px 0 0 0px; |
192 | 193 | cursor: pointer; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js |
— | — | @@ -621,7 +621,7 @@ |
622 | 622 | }, |
623 | 623 | //playlist stops playback for the current clip (and resets state for start clips) |
624 | 624 | stop:function(){ |
625 | | - js_log("pl stop:"+ this.start_clip.id + ' c:'+this.cur_clip.id); |
| 625 | + /*js_log("pl stop:"+ this.start_clip.id + ' c:'+this.cur_clip.id); |
626 | 626 | //if start clip |
627 | 627 | if(this.start_clip.id!=this.cur_clip.id){ |
628 | 628 | //restore clipDesc visibility & hide desc for start clip: |
— | — | @@ -634,11 +634,12 @@ |
635 | 635 | this.start_clip.embed.thumbnail_disp=true; |
636 | 636 | } |
637 | 637 | //empty the play-back container |
638 | | - $j('#mv_ebct_'+this.id).empty(); |
639 | | - //set the current clip desc to visable: |
| 638 | + $j('#mv_ebct_'+this.id).empty();*/ |
| 639 | + |
| 640 | + //make sure the current clip is visable: |
640 | 641 | $j('#clipDesc_'+this.cur_clip.id).css({display:'inline'}); |
641 | 642 | |
642 | | - //do an animated stop of the current clip |
| 643 | + //do stop current clip |
643 | 644 | this.cur_clip.embed.stop(); |
644 | 645 | }, |
645 | 646 | //gets playlist controls large control height for sporting |
— | — | @@ -1147,8 +1148,7 @@ |
1148 | 1149 | //set up connivance pointer to parent playlist |
1149 | 1150 | var plObj = this.pc.pp; |
1150 | 1151 | var plEmbed = this; |
1151 | | - |
1152 | | - //now animate rezie back to small size: |
| 1152 | + |
1153 | 1153 | js_log('do stop'); |
1154 | 1154 | var th=Math.round(pl_layout.clip_desc*plObj.height); |
1155 | 1155 | var tw=Math.round(th*pl_layout.clip_aspect); |
— | — | @@ -1580,9 +1580,7 @@ |
1581 | 1581 | _pClip.transIn.overlay_selector_id =this.getOverlaySelector(_pClip, 'transIn_'); |
1582 | 1582 | } |
1583 | 1583 | |
1584 | | - js_log('selector element: '+$j('#'+_pClip.transIn.overlay_selector_id).length); |
1585 | | - |
1586 | | - |
| 1584 | + js_log('selector element: '+$j('#'+_pClip.transIn.overlay_selector_id).length); |
1587 | 1585 | //start running the transition animation (will stop once pClip time > transition duration |
1588 | 1586 | js_log("ABOUT TO RUN transIn"); |
1589 | 1587 | js_log("cid: "+_pClip.transIn.pClip.id); |