Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php |
— | — | @@ -181,7 +181,7 @@ |
182 | 182 | $fistValid = true; |
183 | 183 | for ( $i = 0; $i < count( $cspan_person_ary ); $i++ ) { |
184 | 184 | // print "looking at: ". $cspan_person_ary[$i]['Spoken_by'] . "\n"; |
185 | | - print "\tCSPAN: " . $cspan_person_ary[$i]['Spoken_by'] . ' on screen for ' . $cspan_person_ary[$i]['length'] . ' or:' . ntp2seconds( $cspan_person_ary[$i]['length'] ) . "\n"; |
| 185 | + print "\tCSPAN: " . $cspan_person_ary[$i]['Spoken_by'] . ' on screen for ' . $cspan_person_ary[$i]['length'] . ' or:' . npt2seconds( $cspan_person_ary[$i]['length'] ) . "\n"; |
186 | 186 | // set up cur, the next and prev pointers: |
187 | 187 | $cur_person = $cspan_person_ary[$i]['Spoken_by']; |
188 | 188 | |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | } |
228 | 228 | |
229 | 229 | // check how long they where on screen (also check subquent) |
230 | | - $cspan_on_screen_time = ntp2seconds( $cspan_person_ary[$i]['length'] ); |
| 230 | + $cspan_on_screen_time = npt2seconds( $cspan_person_ary[$i]['length'] ); |
231 | 231 | |
232 | 232 | // print "NOW STARTING AT: $cur_db_inx of " . count($db_person_ary) . "\n"; |
233 | 233 | for ( $j = $cur_db_inx; $j < count( $db_person_ary ); $j++ ) { |
— | — | @@ -275,7 +275,7 @@ |
276 | 276 | while ( $cur_person == $cspan_person_ary[$i + $k]['Spoken_by'] ) { |
277 | 277 | // use the last cspan_person for start case |
278 | 278 | $cspan_person_ary[$i + $k]['wiki_start_time'] = $cur_start_time; |
279 | | - if ( ntp2seconds( $cspan_person_ary[$i + $k]['length'] ) > |
| 279 | + if ( npt2seconds( $cspan_person_ary[$i + $k]['length'] ) > |
280 | 280 | $db_person_ary[$j]['end_time'] - $cur_start_time ) { |
281 | 281 | $cspan_person_ary[$i + $k]['wiki_end_time'] = $db_person_ary[$j]['end_time']; |
282 | 282 | // already used up our db_person_ary continue: |
— | — | @@ -287,9 +287,9 @@ |
288 | 288 | break; |
289 | 289 | } else { |
290 | 290 | $cspan_person_ary[$i + $k]['wiki_end_time'] = $cur_start_time + |
291 | | - ntp2seconds( $cspan_person_ary[$i + $k]['length'] ); |
292 | | - // print "add " . ntp2seconds($cspan_person_ary[$i+$k]['length']) . "\n"; |
293 | | - $cur_start_time += ntp2seconds( $cspan_person_ary[$i + $k]['length'] ); |
| 291 | + npt2seconds( $cspan_person_ary[$i + $k]['length'] ); |
| 292 | + // print "add " . npt2seconds($cspan_person_ary[$i+$k]['length']) . "\n"; |
| 293 | + $cur_start_time += npt2seconds( $cspan_person_ary[$i + $k]['length'] ); |
294 | 294 | } |
295 | 295 | print "p cspan insert sync " . |
296 | 296 | ' ' . $cspan_person_ary[$i + $k]['wiki_start_time'] . " to " . |
Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php |
— | — | @@ -232,7 +232,7 @@ |
233 | 233 | if ( strpos( $len, '.' ) !== false ) { |
234 | 234 | $len = substr( $len, 0, strpos( $len, '.' ) ); |
235 | 235 | } |
236 | | - $dur = ntp2seconds( $len ); |
| 236 | + $dur = npt2seconds( $len ); |
237 | 237 | } else { |
238 | 238 | echo "empty nfo file: $nfo_url \n"; |
239 | 239 | $dur = 0; |
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php |
— | — | @@ -149,9 +149,9 @@ |
150 | 150 | $this->start_time_sec = 0; |
151 | 151 | $this->start_time = seconds2ntp( $this->start_time_sec ); |
152 | 152 | } else { |
153 | | - $this->start_time_sec = ntp2seconds( $this->start_time ); |
| 153 | + $this->start_time_sec = npt2seconds( $this->start_time ); |
154 | 154 | } |
155 | | - if ( $this->end_time == null || ntp2seconds( $this->end_time ) < $this->start_time_sec ) { |
| 155 | + if ( $this->end_time == null || npt2seconds( $this->end_time ) < $this->start_time_sec ) { |
156 | 156 | if ( $this->start_time_sec == 0 ) { |
157 | 157 | $this->end_time = seconds2ntp( $mvDefaultStreamViewLength ); |
158 | 158 | $this->end_time_sec = $mvDefaultStreamViewLength; |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | */ |
174 | 174 | function getStartTimeSeconds() { |
175 | 175 | if ( isset( $this->start_time_sec ) )return $this->start_time_sec; |
176 | | - $this->start_time_sec = ntp2seconds( $this->start_time ); |
| 176 | + $this->start_time_sec = npt2seconds( $this->start_time ); |
177 | 177 | return $this->start_time_sec; |
178 | 178 | } |
179 | 179 | /* |
— | — | @@ -181,7 +181,7 @@ |
182 | 182 | function getEndTimeSeconds() { |
183 | 183 | if ( isset( $this->end_time ) ) { |
184 | 184 | if ( isset( $this->end_time_sec ) )return $this->end_time_sec; |
185 | | - $this->end_time_sec = ntp2seconds( $this->end_time ); |
| 185 | + $this->end_time_sec = npt2seconds( $this->end_time ); |
186 | 186 | return $this->end_time_sec; |
187 | 187 | } |
188 | 188 | return null; |
— | — | @@ -494,7 +494,7 @@ |
495 | 495 | // (support null endtimes) |
496 | 496 | // if the endtime is unset set it to the default length after the start time: |
497 | 497 | // if(!isset($end_time)){ |
498 | | - // $this->end_time = seconds2ntp(ntp2seconds($this->start_time) + $mvDefaultClipLength) ; |
| 498 | + // $this->end_time = seconds2ntp(npt2seconds($this->start_time) + $mvDefaultClipLength) ; |
499 | 499 | // } |
500 | 500 | |
501 | 501 | // @@todo make sure start time is not negative & end time is not > duration |
— | — | @@ -507,7 +507,7 @@ |
508 | 508 | if ( mvIsNtpTime( $this->end_time ) == false )$this->end_time = null; |
509 | 509 | |
510 | 510 | // make sure the end time is > than the start time: |
511 | | - if ( ntp2seconds( $this->start_time ) > ntp2seconds( $this->end_time ) ) { |
| 511 | + if ( npt2seconds( $this->start_time ) > npt2seconds( $this->end_time ) ) { |
512 | 512 | // @@TODO better error handling |
513 | 513 | $this->start_time = null; |
514 | 514 | $this->end_time = null; |
Index: trunk/extensions/MetavidWiki/includes/MV_Hooks.php |
— | — | @@ -103,12 +103,12 @@ |
104 | 104 | if( $title->getNamespace() == MV_NS_STREAM ){ |
105 | 105 | if( substr( $param, 0, 6 ) == 'start='){ |
106 | 106 | $start_str = substr( $param, 6 ); |
107 | | - $timeSec = ntp2seconds($start_str); |
| 107 | + $timeSec = npt2seconds($start_str); |
108 | 108 | if( (int) $timeSec > 0 ) |
109 | 109 | $start_ntp = seconds2ntp($timeSec); |
110 | 110 | }else if(substr( $param, 0, 4 ) == 'end='){ |
111 | 111 | $end_str = substr( $param, 6 ); |
112 | | - $timeSec = ntp2seconds($start_str); |
| 112 | + $timeSec = npt2seconds($start_str); |
113 | 113 | if( (int) $timeSec > 0 ) |
114 | 114 | $end_ntp = seconds2ntp($timeSec); |
115 | 115 | }else{ |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php |
— | — | @@ -431,7 +431,7 @@ |
432 | 432 | |
433 | 433 | // print 'st ' . $this->start_context . "<br />" ; |
434 | 434 | // $mvd_page->start_time = $start_context; //seconds2ntp(0); |
435 | | - // $mvd_page->end_time = seconds2ntp( ntp2seconds($start_context) + $mvDefaultClipLength); |
| 435 | + // $mvd_page->end_time = seconds2ntp( npt2seconds($start_context) + $mvDefaultClipLength); |
436 | 436 | $mvd_page->wiki_title = $mvdType . ':' . strtolower( $baseTitle ) . '/_new'; |
437 | 437 | $this->get_edit_disp( $mvd_page->wiki_title, 'new' ); |
438 | 438 | |
— | — | @@ -472,8 +472,8 @@ |
473 | 473 | if ( $do_adjust ) { |
474 | 474 | $tmpMvPage = new MV_Title( $wgRequest->getVal( 'newTitle' ) ); |
475 | 475 | $mvd_page->wiki_title = $tmpMvPage->wiki_title; |
476 | | - $mvd_page->start_time = ntp2seconds( $tmpMvPage->start_time ); |
477 | | - $mvd_page->end_time = ntp2seconds( $tmpMvPage->end_time ); |
| 476 | + $mvd_page->start_time = npt2seconds( $tmpMvPage->start_time ); |
| 477 | + $mvd_page->end_time = npt2seconds( $tmpMvPage->end_time ); |
478 | 478 | } |
479 | 479 | |
480 | 480 | $out = ''; |
— | — | @@ -639,7 +639,7 @@ |
640 | 640 | global $mvDefaultClipLength; |
641 | 641 | $start_time = isset( $this->start_context ) ? $this->start_context:seconds2ntp( 0 ); |
642 | 642 | $end_time = isset( $this->end_context ) ? |
643 | | - seconds2ntp( ntp2seconds( $this->start_context ) + $mvDefaultClipLength ): |
| 643 | + seconds2ntp( npt2seconds( $this->start_context ) + $mvDefaultClipLength ): |
644 | 644 | seconds2ntp( $mvDefaultClipLength ); |
645 | 645 | } else { |
646 | 646 | $mvTitle = new MV_Title( $titleKey ); |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -44,15 +44,14 @@ |
45 | 45 | } |
46 | 46 | function mvSetupExtension() { |
47 | 47 | global $mvVersion, $mvNamespace, $mvgIP, $wgHooks, $wgExtensionCredits, $mvMasterStore, |
48 | | - $wgParser, $mvArticlePath, $mvgScriptPath, $wgServer, $wgExtensionFunctions, $markerList,$wgVersion, |
| 48 | + $wgParser, $mvArticlePath, $mvgScriptPath, $wgScriptPath, $wgServer, $wgExtensionFunctions, $markerList,$wgVersion, |
49 | 49 | $wgAjaxExportList, $mvEnableAutoComplete, $mvEnableJSMVDrewrite, |
50 | 50 | $wgAutoloadClasses, $wgSpecialPages, $wgMediaHandlers, $wgJSAutoloadClasses, |
51 | 51 | $wgAPIModules; |
52 | 52 | |
| 53 | + //setupMsg |
| 54 | + mvfInitMessages(); |
53 | 55 | |
54 | | - mvfInitMessages(); |
55 | | - //add the ALL page header |
56 | | - mvfAutoAllPageHeader(); |
57 | 56 | |
58 | 57 | /******************************** |
59 | 58 | * Ajax Hooks |
— | — | @@ -98,7 +97,13 @@ |
99 | 98 | /**********************************************/ |
100 | 99 | /***** register autoLoad javascript Classes: */ |
101 | 100 | /**********************************************/ |
102 | | - $mv_jspath = $mvgIP . '/skins/'; |
| 101 | + |
| 102 | + //build a shortcut to the local js extension path from the $mvgScriptPath setting: |
| 103 | + $mv_jspath = str_replace($wgScriptPath, '', $mvgScriptPath) . '/skins/'; |
| 104 | + //remove leading slash |
| 105 | + if($mv_jspath[0]=='/') |
| 106 | + $mv_jspath = substr($mv_jspath, 1); |
| 107 | + |
103 | 108 | $mvjsp = $mv_jspath . 'mv_embed/'; |
104 | 109 | //core: |
105 | 110 | $wgJSAutoloadClasses['window.jQuery'] = $mvjsp . 'jquery/jquery-1.2.6.js'; |
— | — | @@ -305,9 +310,10 @@ |
306 | 311 | * API extension (this may be integrated into semantic wiki at some point) |
307 | 312 | **************************************/ |
308 | 313 | |
| 314 | + //add the ALL page header |
| 315 | + mvfAutoAllPageHeader(); |
309 | 316 | |
310 | 317 | |
311 | | - |
312 | 318 | // $wgHooks['BeforePageDisplay'][] = 'mvDoSpecialPage'; |
313 | 319 | // $wgHooks['ArticleViewHeader'][] = 'mvArticleViewOpts'; |
314 | 320 | /**********************************************/ |
— | — | @@ -359,15 +365,20 @@ |
360 | 366 | $unique_req_param = MV_VERSION; |
361 | 367 | } |
362 | 368 | |
| 369 | + //if scriptload is off manually load the requested js: |
363 | 370 | if( $wgEnableScriptLoader ){ |
364 | | - $debug_param = ( $mvgJSDebug || |
| 371 | + /*$debug_param = ( $mvgJSDebug || |
365 | 372 | $wgRequest->getVal('debug')=='true' || |
366 | 373 | $wgRequest->getVal('debug')=='1' ) |
367 | 374 | ? '&debug=true' : ''; |
368 | 375 | $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$wgScriptPath}/mvwScriptLoader.php?" . |
369 | 376 | "class=window.jQuery,j.fn.autocomplete,j.fn.hoverIntent,mv_embed,mv_allpages,mv_search" . |
370 | 377 | '&urid=' .$unique_req_param . $debug_param . "\"></script>" |
371 | | - ); |
| 378 | + );*/ |
| 379 | + $classes = array( 'window.jQuery','j.fn.autocomplete','j.fn.hoverIntent','mv_embed','mv_allpages','mv_search'); |
| 380 | + foreach($classes as $js_class){ |
| 381 | + $wgOut->addScriptClass( $js_class ); |
| 382 | + } |
372 | 383 | }else{ |
373 | 384 | $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_embed/jquery/jquery-1.2.6.min.js?{$unique_req_param}\"></script>" ); |
374 | 385 | $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_embed/jquery/plugins/jquery.autocomplete.js?{$unique_req_param}\"></script>" ); |
— | — | @@ -647,7 +658,7 @@ |
648 | 659 | /* |
649 | 660 | * takes ntp time of format hh:mm:ss and converts to seconds |
650 | 661 | */ |
651 | | -function ntp2seconds( $str_time ) { |
| 662 | +function npt2seconds( $str_time ) { |
652 | 663 | $time_ary = explode( ':', $str_time ); |
653 | 664 | $hours = $min = $sec = 0; |
654 | 665 | if ( count( $time_ary ) == 3 ) { |
Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | if ( !$req_time )$req_time = '0'; |
135 | 135 | |
136 | 136 | if ( count( explode( ":", $req_time ) ) >= 2 ) { |
137 | | - $req_time = ntp2seconds( $req_time ); |
| 137 | + $req_time = npt2seconds( $req_time ); |
138 | 138 | } else { |
139 | 139 | if ( !is_numeric( $req_time ) && $req_time >= 0 ) { |
140 | 140 | throw "error in req time format"; |
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js |
— | — | @@ -309,7 +309,7 @@ |
310 | 310 | mv_scroll2Time(evid.currentTime); |
311 | 311 | } |
312 | 312 | if( evid.userSlide ){ |
313 | | - var mvd_id = mv_scroll2Time( ntp2seconds( evid.jump_time ) ); |
| 313 | + var mvd_id = mv_scroll2Time( npt2seconds( evid.jump_time ) ); |
314 | 314 | if( mvd_id ){ |
315 | 315 | //also update the image: |
316 | 316 | var img_url = $j('#mv_fd_mvd_'+mvd_id).attr('image_url'); |
— | — | @@ -369,8 +369,8 @@ |
370 | 370 | parts = this.name.split('/'); |
371 | 371 | this.start_ntp = parts[1]; |
372 | 372 | this.end_ntp = parts[2]; |
373 | | - this.start_time = ntp2seconds(this.start_ntp); |
374 | | - this.end_time = ntp2seconds(this.end_ntp); |
| 373 | + this.start_time = npt2seconds(this.start_ntp); |
| 374 | + this.end_time = npt2seconds(this.end_ntp); |
375 | 375 | } |
376 | 376 | }); |
377 | 377 | } |
— | — | @@ -657,8 +657,8 @@ |
658 | 658 | parts = this.title.split('/'); |
659 | 659 | this.start_ntp = parts[1]; |
660 | 660 | this.end_ntp = parts[2]; |
661 | | - this.start_time = ntp2seconds(this.start_ntp); |
662 | | - this.end_time = ntp2seconds(this.end_ntp); |
| 661 | + this.start_time = npt2seconds(this.start_ntp); |
| 662 | + this.end_time = npt2seconds(this.end_ntp); |
663 | 663 | } |
664 | 664 | }); |
665 | 665 | titleObj.parseTitle(); |
— | — | @@ -904,7 +904,7 @@ |
905 | 905 | //check if we are out of range: |
906 | 906 | if(mvd_id){ |
907 | 907 | var time_ary = $j('#mv_fd_mvd_'+mvd_id).attr('name').split('/'); |
908 | | - if( ntp2seconds( time_ary[1] ) < ntp2seconds( $j('#embed_vid').get(0).start_ntp ) ){ |
| 908 | + if( npt2seconds( time_ary[1] ) < npt2seconds( $j('#embed_vid').get(0).start_ntp ) ){ |
909 | 909 | window.location = wgArticlePath.replace( '$1', wgPageName +'/'+ time_ary[1] + '/' + time_ary[2]) + '#autoplay'; |
910 | 910 | return ; |
911 | 911 | } |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php |
— | — | @@ -52,10 +52,10 @@ |
53 | 53 | //@@todo support more time request formats |
54 | 54 | if(strpos( $time_req,'/')!==false){ |
55 | 55 | list($start_time_ntp, $end_time_ntp)=explode('/',$time_req); |
56 | | - $start_sec = ntp2seconds($start_time_ntp); |
57 | | - $end_sec = ntp2seconds($end_time_ntp); |
| 56 | + $start_sec = npt2seconds($start_time_ntp); |
| 57 | + $end_sec = npt2seconds($end_time_ntp); |
58 | 58 | }else{ |
59 | | - $start_sec = ntp2seconds($time_req); |
| 59 | + $start_sec = npt2seconds($time_req); |
60 | 60 | $end_sec = null; |
61 | 61 | if($start_sec==0)output_full_file($file_loc); |
62 | 62 | } |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | die(); |
95 | 95 | } |
96 | 96 | |
97 | | -function ntp2seconds($str_time){ |
| 97 | +function npt2seconds($str_time){ |
98 | 98 | $time_ary = explode(':', $str_time); |
99 | 99 | $hours=$min=$sec=0; |
100 | 100 | if(count($time_ary)==3){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvSequencer.js |
— | — | @@ -1275,7 +1275,7 @@ |
1276 | 1276 | clip_desc+='length: ' + seconds2ntp(new_clip_dur) +'('+clip_dif_str+')'; |
1277 | 1277 | if(this_seq.resize_mode=='resize_end'){ |
1278 | 1278 | //expanding right |
1279 | | - var new_end = seconds2ntp(ntp2seconds(clip.embed.end_ntp)+clip_dif); |
| 1279 | + var new_end = seconds2ntp(npt2seconds(clip.embed.end_ntp)+clip_dif); |
1280 | 1280 | clip_desc+='<br>end time: ' + new_end; |
1281 | 1281 | //also shift all the other clips (after the current) |
1282 | 1282 | //js_log("track_inx: " + track_inx + ' clip inx:'+clip_inx); |
— | — | @@ -1288,7 +1288,7 @@ |
1289 | 1289 | }); |
1290 | 1290 | }else{ |
1291 | 1291 | //expanding left (resize_start) |
1292 | | - var new_start = seconds2ntp(ntp2seconds(clip.embed.start_ntp)+clip_dif); |
| 1292 | + var new_start = seconds2ntp(npt2seconds(clip.embed.start_ntp)+clip_dif); |
1293 | 1293 | clip_desc+='<br>start time: ' + new_start; |
1294 | 1294 | } |
1295 | 1295 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js |
— | — | @@ -597,8 +597,8 @@ |
598 | 598 | do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() ); |
599 | 599 | }); |
600 | 600 | //read the ntp time from the fields |
601 | | - var start_sec = ntp2seconds( $j('#mv_start_hr_'+mvd_id).val() ); |
602 | | - var end_sec = ntp2seconds( $j('#mv_end_hr_'+mvd_id).val() ); |
| 601 | + var start_sec = npt2seconds( $j('#mv_start_hr_'+mvd_id).val() ); |
| 602 | + var end_sec = npt2seconds( $j('#mv_end_hr_'+mvd_id).val() ); |
603 | 603 | js_log('start_sec:'+start_sec + ' end: ' + end_sec); |
604 | 604 | if(start_sec > end_sec){ |
605 | 605 | js_log('start > end : ' + start_sec + ' > ' + end_sec); |
— | — | @@ -708,7 +708,7 @@ |
709 | 709 | adj_callback(); |
710 | 710 | }, |
711 | 711 | resize: function(e,ui) { |
712 | | - base_offset = ntp2seconds( $j('#track_time_start_'+mvd_id).html()); |
| 712 | + base_offset = npt2seconds( $j('#track_time_start_'+mvd_id).html()); |
713 | 713 | mv_slider_update_stats(mvd_id); |
714 | 714 | } |
715 | 715 | }); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -1082,14 +1082,14 @@ |
1083 | 1083 | /* |
1084 | 1084 | * takes hh:mm:ss,ms or hh:mm:ss.ms input returns number of seconds |
1085 | 1085 | */ |
1086 | | -function ntp2seconds(ntp){ |
| 1086 | +function npt2seconds(ntp){ |
1087 | 1087 | if(!ntp){ |
1088 | | - //js_log('ntp2seconds:not valid ntp:'+ntp); |
| 1088 | + //js_log('npt2seconds:not valid ntp:'+ntp); |
1089 | 1089 | return false; |
1090 | 1090 | } |
1091 | 1091 | times = ntp.split(':'); |
1092 | 1092 | if(times.length!=3){ |
1093 | | - js_log('ntp2seconds:not valid ntp:'+ntp); |
| 1093 | + js_log('npt2seconds:nnpt2secondsp:'+ntp); |
1094 | 1094 | return false; |
1095 | 1095 | } |
1096 | 1096 | //sometimes the comma is used inplace of pereid for ms |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_htmlEmbed.js |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | }, |
163 | 163 | updateVideoTime:function(start_ntp, end_ntp){ |
164 | 164 | //since we don't really have timeline for html elements just take the delta and set it as the duration |
165 | | - this.pc.dur = ntp2seconds(end_ntp) - ntp2seconds(start_ntp); |
| 165 | + this.pc.dur = npt2seconds(end_ntp) - npt2seconds(start_ntp); |
166 | 166 | }, |
167 | 167 | //gives a chance to make any nesseary external requests |
168 | 168 | //@@todo we can "start loading images" if we want |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_vlcEmbed.js |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | //js_log('set buffer: ' + flash_state.bufferEnd + ' at time: ' + flash_state.time +' of total dur: ' + this.getDuration()); |
208 | 208 | |
209 | 209 | //if we are way out of range... add offset (hack) |
210 | | - if( ( this.currentTime + 10 ) < ntp2seconds( this.start_ntp) ){ |
| 210 | + if( ( this.currentTime + 10 ) < npt2seconds( this.start_ntp) ){ |
211 | 211 | this.currentTime = (this.vlc.input.time/1000) + this.media_element.selected_source.start_offset; |
212 | 212 | } |
213 | 213 | }else{ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | $j('#big_play_link_'+id).fadeOut('fast'); |
124 | 124 | //if playlist always start at 0 |
125 | 125 | embedObj.start_time_sec = (embedObj.instanceOf == 'mvPlayList')?0: |
126 | | - ntp2seconds(embedObj.getTimeReq().split('/')[0]); |
| 126 | + npt2seconds(embedObj.getTimeReq().split('/')[0]); |
127 | 127 | }, |
128 | 128 | drag:function(e, ui){ |
129 | 129 | //@@todo get the -14 number from the skin somehow |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | js_log('do jump to: '+embedObj.jump_time + ' perc:' +perc); |
155 | 155 | |
156 | 156 | //set seek time (in case we have to do a url seek) |
157 | | - embedObj.seek_time_sec=ntp2seconds(embedObj.jump_time); |
| 157 | + embedObj.seek_time_sec=npt2seconds(embedObj.jump_time); |
158 | 158 | var test = embedObj; |
159 | 159 | embedObj.doSeek(perc); |
160 | 160 | } |
— | — | @@ -342,10 +342,10 @@ |
343 | 343 | //if we have time we can use: |
344 | 344 | if( this.serverSideSeeking ){ |
345 | 345 | //make sure its a valid start time / end time (else set default) |
346 | | - if( !ntp2seconds(start_ntp) ) |
| 346 | + if( !npt2seconds(start_ntp) ) |
347 | 347 | start_ntp = this.start_ntp; |
348 | 348 | |
349 | | - if( !ntp2seconds(end_ntp) ) |
| 349 | + if( !npt2seconds(end_ntp) ) |
350 | 350 | end_ntp = this.end_ntp; |
351 | 351 | |
352 | 352 | if( this.timeFormat == 'anx' ){ |
— | — | @@ -353,8 +353,8 @@ |
354 | 354 | }else if ( this.timeFormat =='mp4'){ |
355 | 355 | var mp4URL = parseUri( this.src ); |
356 | 356 | this.src = mp4URL.protocol+'://'+mp4URL.authority + mp4URL.path + |
357 | | - '?start=' + ( ntp2seconds( start_ntp ) ) + |
358 | | - '&end=' + ( ntp2seconds( end_ntp ) ); |
| 357 | + '?start=' + ( npt2seconds( start_ntp ) ) + |
| 358 | + '&end=' + ( npt2seconds( end_ntp ) ); |
359 | 359 | } |
360 | 360 | |
361 | 361 | //update the duration |
— | — | @@ -442,8 +442,8 @@ |
443 | 443 | } |
444 | 444 | } |
445 | 445 | this.serverSideSeeking = true; |
446 | | - this.start_offset = ntp2seconds(this.start_ntp); |
447 | | - this.duration = ntp2seconds( this.end_ntp ) - this.start_offset; |
| 446 | + this.start_offset = npt2seconds(this.start_ntp); |
| 447 | + this.duration = npt2seconds( this.end_ntp ) - this.start_offset; |
448 | 448 | } //time format |
449 | 449 | |
450 | 450 | if( !this.serverSideSeeking ){ |
— | — | @@ -820,7 +820,7 @@ |
821 | 821 | } |
822 | 822 | } |
823 | 823 | if( this.duration!=null && this.duration.split(':').length >= 2) |
824 | | - this.duration = ntp2seconds( this.duration ); |
| 824 | + this.duration = npt2seconds( this.duration ); |
825 | 825 | |
826 | 826 | //if style is set override width and height |
827 | 827 | var dwh = mv_default_video_size.split('x'); |
— | — | @@ -1156,8 +1156,8 @@ |
1157 | 1157 | //grab all metadata and put it into the anno_data_cache: |
1158 | 1158 | $j.each(cmml_data.getElementsByTagName('clip'), function(inx, clip){ |
1159 | 1159 | _this.anno_data_cache[ $j(clip).attr("id") ]={ |
1160 | | - 'start_time_sec':ntp2seconds($j(clip).attr("start").replace('npt:','')), |
1161 | | - 'end_time_sec':ntp2seconds($j(clip).attr("end").replace('npt:','')), |
| 1160 | + 'start_time_sec':npt2seconds($j(clip).attr("start").replace('npt:','')), |
| 1161 | + 'end_time_sec':npt2seconds($j(clip).attr("end").replace('npt:','')), |
1162 | 1162 | 'time_req':$j(clip).attr("start").replace('npt:','')+'/'+$j(clip).attr("end").replace('npt:','') |
1163 | 1163 | }; |
1164 | 1164 | //grab all its meta |
— | — | @@ -1186,8 +1186,8 @@ |
1187 | 1187 | } |
1188 | 1188 | var curTime = this.getTimeReq().split('/'); |
1189 | 1189 | |
1190 | | - var s_sec = ntp2seconds(curTime[0]); |
1191 | | - var e_sec = ntp2seconds(curTime[1]); |
| 1190 | + var s_sec = npt2seconds(curTime[0]); |
| 1191 | + var e_sec = npt2seconds(curTime[1]); |
1192 | 1192 | js_log('showNextPrevLinks: req time: '+ s_sec + ' to ' + e_sec); |
1193 | 1193 | //now we have all the data in anno_data_cache |
1194 | 1194 | var current_done=false; |
— | — | @@ -1344,7 +1344,7 @@ |
1345 | 1345 | if(this.media_element.selected_source.serverSideSeeking) |
1346 | 1346 | this.seek_time_sec=0; |
1347 | 1347 | else |
1348 | | - this.seek_time_sec=ntp2seconds(start_ntp); |
| 1348 | + this.seek_time_sec=npt2seconds(start_ntp); |
1349 | 1349 | }, |
1350 | 1350 | //@@todo overwite by embed library if we can render frames natavily |
1351 | 1351 | renderTimelineThumbnail:function( options ){ |
— | — | @@ -1364,7 +1364,7 @@ |
1365 | 1365 | '</div>'; |
1366 | 1366 | }, |
1367 | 1367 | updateThumbTimeNTP:function( time){ |
1368 | | - this.updateThumbTime( ntp2seconds(time) - parseInt(this.start_offset) ); |
| 1368 | + this.updateThumbTime( npt2seconds(time) - parseInt(this.start_offset) ); |
1369 | 1369 | }, |
1370 | 1370 | updateThumbTime:function( float_sec ){ |
1371 | 1371 | //js_log('updateThumbTime:'+float_sec); |
— | — | @@ -1998,7 +1998,7 @@ |
1999 | 1999 | var dur = this.getDuration(); |
2000 | 2000 | var hide_progress = true; |
2001 | 2001 | //set the left percet and update the slider: |
2002 | | - rel_start_sec = ( ntp2seconds( options['start']) - this.start_offset ); |
| 2002 | + rel_start_sec = ( npt2seconds( options['start']) - this.start_offset ); |
2003 | 2003 | |
2004 | 2004 | var slider_perc=0; |
2005 | 2005 | if( rel_start_sec <= 0 ){ |
— | — | @@ -2014,7 +2014,7 @@ |
2015 | 2015 | this.setSliderValue( slider_perc , hide_progress); |
2016 | 2016 | } |
2017 | 2017 | |
2018 | | - width_perc = parseInt( (( ntp2seconds( options['end'] ) - ntp2seconds( options['start'] ) ) / dur)*100 ) ; |
| 2018 | + width_perc = parseInt( (( npt2seconds( options['end'] ) - npt2seconds( options['start'] ) ) / dur)*100 ) ; |
2019 | 2019 | if( (width_perc + left_perc) > 100 ){ |
2020 | 2020 | width_perc = 100 - left_perc; |
2021 | 2021 | } |
— | — | @@ -2025,7 +2025,7 @@ |
2026 | 2026 | }).show(); |
2027 | 2027 | |
2028 | 2028 | this.jump_time = options['start']; |
2029 | | - this.seek_time_sec = ntp2seconds( options['start']); |
| 2029 | + this.seek_time_sec = npt2seconds( options['start']); |
2030 | 2030 | //trim output to |
2031 | 2031 | this.setStatus( gM('seek_to')+' '+ seconds2ntp( this.seek_time_sec ) ); |
2032 | 2032 | js_log('DO update: ' + this.jump_time); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_flashEmbed.js |
— | — | @@ -1737,7 +1737,7 @@ |
1738 | 1738 | } |
1739 | 1739 | } |
1740 | 1740 | |
1741 | | - if(this.currentTime > ntp2seconds(this.start_ntp) && !this.startedTimedPlayback){ |
| 1741 | + if(this.currentTime > npt2seconds(this.start_ntp) && !this.startedTimedPlayback){ |
1742 | 1742 | var fail = false; |
1743 | 1743 | try |
1744 | 1744 | { |
— | — | @@ -1762,9 +1762,9 @@ |
1763 | 1763 | |
1764 | 1764 | //checks to see if we reached the end of playback: |
1765 | 1765 | if(this.duration && this.startedTimedPlayback && |
1766 | | - ( this.currentTime > (ntp2seconds(this.end_ntp)+1) |
| 1766 | + ( this.currentTime > (npt2seconds(this.end_ntp)+1) |
1767 | 1767 | || |
1768 | | - ( this.currentTime > (ntp2seconds(this.end_ntp)-1) |
| 1768 | + ( this.currentTime > (npt2seconds(this.end_ntp)-1) |
1769 | 1769 | && this.prevTime == this.currentTime) ) |
1770 | 1770 | ){ |
1771 | 1771 | js_log('prbally reached end of stream: '+this.currentTime); |
— | — | @@ -1776,7 +1776,7 @@ |
1777 | 1777 | |
1778 | 1778 | |
1779 | 1779 | this.prevTime = this.currentTime; |
1780 | | - //js_log('cur perc loaded: ' + this.fla.getPercentLoaded() +' cur time : ' + (this.currentTime - ntp2seconds(this.start_ntp)) +' / ' +(ntp2seconds(this.end_ntp)-ntp2seconds(this.start_ntp))); |
| 1780 | + //js_log('cur perc loaded: ' + this.fla.getPercentLoaded() +' cur time : ' + (this.currentTime - npt2seconds(this.start_ntp)) +' / ' +(npt2seconds(this.end_ntp)-npt2seconds(this.start_ntp))); |
1781 | 1781 | }, |
1782 | 1782 | restorePlayer:function(){ |
1783 | 1783 | if(!this.fla) |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libTimedText/mvTextInterface.js |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | //make sure the clip does not already exist: |
117 | 117 | if($j('#tc_'+text_clip.id).length==0){ |
118 | 118 | var inserted = false; |
119 | | - var text_clip_start_time = ntp2seconds( text_clip.start ); |
| 119 | + var text_clip_start_time = npt2seconds( text_clip.start ); |
120 | 120 | |
121 | 121 | var insertHTML = '<div style="border:solid thin black;" id="tc_'+text_clip.id+'" ' + |
122 | 122 | 'start="'+text_clip.start+'" end="'+text_clip.end+'" class="mvtt tt_'+text_clip.type_id+'">' + |
— | — | @@ -128,8 +128,8 @@ |
129 | 129 | //js_log("ADDING CLIP: " + text_clip_start_time + ' html: ' + insertHTML); |
130 | 130 | $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){ |
131 | 131 | if(!inserted){ |
132 | | - //js_log( ntp2seconds($j(this).attr('start')) + ' > ' + text_clip_start_time); |
133 | | - if( ntp2seconds($j(this).attr('start')) > text_clip_start_time){ |
| 132 | + //js_log( npt2seconds($j(this).attr('start')) + ' > ' + text_clip_start_time); |
| 133 | + if( npt2seconds($j(this).attr('start')) > text_clip_start_time){ |
134 | 134 | inserted=true; |
135 | 135 | $j(this).before(insertHTML); |
136 | 136 | } |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | //search for current time: flash red border trascript |
248 | 248 | _this = this; |
249 | 249 | $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){ |
250 | | - if(ntp2seconds($j(this).attr('start')) == cur_time){ |
| 250 | + if(npt2seconds($j(this).attr('start')) == cur_time){ |
251 | 251 | _this.prevTimeScroll=cur_time; |
252 | 252 | $j('#mmbody_'+_this.pe.id).animate({scrollTop: $j(this).get(0).offsetTop}, 'slow'); |
253 | 253 | } |
— | — | @@ -268,7 +268,7 @@ |
269 | 269 | _this = this; |
270 | 270 | var scroll_to_id=''; |
271 | 271 | $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){ |
272 | | - if(cur_time > ntp2seconds($j(this).attr('start')) ){ |
| 272 | + if(cur_time > npt2seconds($j(this).attr('start')) ){ |
273 | 273 | _this.prevTimeScroll=cur_time; |
274 | 274 | if( $j(this).attr('id') ) |
275 | 275 | scroll_to_id = $j(this).attr('id'); |
— | — | @@ -359,8 +359,8 @@ |
360 | 360 | |
361 | 361 | var pcurl = parseUri( _this.getSRC() ); |
362 | 362 | var req_time = pcurl.queryKey['t'].split('/'); |
363 | | - req_time[0]=ntp2seconds(req_time[0]); |
364 | | - req_time[1]=ntp2seconds(req_time[1]); |
| 363 | + req_time[0]=npt2seconds(req_time[0]); |
| 364 | + req_time[1]=npt2seconds(req_time[1]); |
365 | 365 | if(req_time[1]-req_time[0]> _this.request_length){ |
366 | 366 | //longer than 5 min will only issue a (request 5 min) |
367 | 367 | req_time[1] = req_time[0]+_this.request_length; |
Property changes on: trunk/extensions/MetavidWiki/skins |
___________________________________________________________________ |
Added: svn:ignore |
368 | 368 | + temp.js |