r49961 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49960‎ | r49961 | r49962 >
Date:16:49, 27 April 2009
Author:dale
Status:deferred
Tags:
Comment:
fixed npt typo
other fixes for scriptLoader
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Hooks.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_StreamImage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Title.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_flashEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_htmlEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_vlcEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvSequencer.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libTimedText/mvTextInterface.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php
@@ -181,7 +181,7 @@
182182 $fistValid = true;
183183 for ( $i = 0; $i < count( $cspan_person_ary ); $i++ ) {
184184 // 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";
186186 // set up cur, the next and prev pointers:
187187 $cur_person = $cspan_person_ary[$i]['Spoken_by'];
188188
@@ -226,7 +226,7 @@
227227 }
228228
229229 // 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'] );
231231
232232 // print "NOW STARTING AT: $cur_db_inx of " . count($db_person_ary) . "\n";
233233 for ( $j = $cur_db_inx; $j < count( $db_person_ary ); $j++ ) {
@@ -275,7 +275,7 @@
276276 while ( $cur_person == $cspan_person_ary[$i + $k]['Spoken_by'] ) {
277277 // use the last cspan_person for start case
278278 $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'] ) >
280280 $db_person_ary[$j]['end_time'] - $cur_start_time ) {
281281 $cspan_person_ary[$i + $k]['wiki_end_time'] = $db_person_ary[$j]['end_time'];
282282 // already used up our db_person_ary continue:
@@ -287,9 +287,9 @@
288288 break;
289289 } else {
290290 $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'] );
294294 }
295295 print "p cspan insert sync " .
296296 ' ' . $cspan_person_ary[$i + $k]['wiki_start_time'] . " to " .
Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php
@@ -232,7 +232,7 @@
233233 if ( strpos( $len, '.' ) !== false ) {
234234 $len = substr( $len, 0, strpos( $len, '.' ) );
235235 }
236 - $dur = ntp2seconds( $len );
 236+ $dur = npt2seconds( $len );
237237 } else {
238238 echo "empty nfo file: $nfo_url \n";
239239 $dur = 0;
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php
@@ -149,9 +149,9 @@
150150 $this->start_time_sec = 0;
151151 $this->start_time = seconds2ntp( $this->start_time_sec );
152152 } else {
153 - $this->start_time_sec = ntp2seconds( $this->start_time );
 153+ $this->start_time_sec = npt2seconds( $this->start_time );
154154 }
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 ) {
156156 if ( $this->start_time_sec == 0 ) {
157157 $this->end_time = seconds2ntp( $mvDefaultStreamViewLength );
158158 $this->end_time_sec = $mvDefaultStreamViewLength;
@@ -172,7 +172,7 @@
173173 */
174174 function getStartTimeSeconds() {
175175 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 );
177177 return $this->start_time_sec;
178178 }
179179 /*
@@ -181,7 +181,7 @@
182182 function getEndTimeSeconds() {
183183 if ( isset( $this->end_time ) ) {
184184 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 );
186186 return $this->end_time_sec;
187187 }
188188 return null;
@@ -494,7 +494,7 @@
495495 // (support null endtimes)
496496 // if the endtime is unset set it to the default length after the start time:
497497 // if(!isset($end_time)){
498 - // $this->end_time = seconds2ntp(ntp2seconds($this->start_time) + $mvDefaultClipLength) ;
 498+ // $this->end_time = seconds2ntp(npt2seconds($this->start_time) + $mvDefaultClipLength) ;
499499 // }
500500
501501 // @@todo make sure start time is not negative & end time is not > duration
@@ -507,7 +507,7 @@
508508 if ( mvIsNtpTime( $this->end_time ) == false )$this->end_time = null;
509509
510510 // 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 ) ) {
512512 // @@TODO better error handling
513513 $this->start_time = null;
514514 $this->end_time = null;
Index: trunk/extensions/MetavidWiki/includes/MV_Hooks.php
@@ -103,12 +103,12 @@
104104 if( $title->getNamespace() == MV_NS_STREAM ){
105105 if( substr( $param, 0, 6 ) == 'start='){
106106 $start_str = substr( $param, 6 );
107 - $timeSec = ntp2seconds($start_str);
 107+ $timeSec = npt2seconds($start_str);
108108 if( (int) $timeSec > 0 )
109109 $start_ntp = seconds2ntp($timeSec);
110110 }else if(substr( $param, 0, 4 ) == 'end='){
111111 $end_str = substr( $param, 6 );
112 - $timeSec = ntp2seconds($start_str);
 112+ $timeSec = npt2seconds($start_str);
113113 if( (int) $timeSec > 0 )
114114 $end_ntp = seconds2ntp($timeSec);
115115 }else{
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php
@@ -431,7 +431,7 @@
432432
433433 // print 'st ' . $this->start_context . "<br />" ;
434434 // $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);
436436 $mvd_page->wiki_title = $mvdType . ':' . strtolower( $baseTitle ) . '/_new';
437437 $this->get_edit_disp( $mvd_page->wiki_title, 'new' );
438438
@@ -472,8 +472,8 @@
473473 if ( $do_adjust ) {
474474 $tmpMvPage = new MV_Title( $wgRequest->getVal( 'newTitle' ) );
475475 $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 );
478478 }
479479
480480 $out = '';
@@ -639,7 +639,7 @@
640640 global $mvDefaultClipLength;
641641 $start_time = isset( $this->start_context ) ? $this->start_context:seconds2ntp( 0 );
642642 $end_time = isset( $this->end_context ) ?
643 - seconds2ntp( ntp2seconds( $this->start_context ) + $mvDefaultClipLength ):
 643+ seconds2ntp( npt2seconds( $this->start_context ) + $mvDefaultClipLength ):
644644 seconds2ntp( $mvDefaultClipLength );
645645 } else {
646646 $mvTitle = new MV_Title( $titleKey );
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -44,15 +44,14 @@
4545 }
4646 function mvSetupExtension() {
4747 global $mvVersion, $mvNamespace, $mvgIP, $wgHooks, $wgExtensionCredits, $mvMasterStore,
48 - $wgParser, $mvArticlePath, $mvgScriptPath, $wgServer, $wgExtensionFunctions, $markerList,$wgVersion,
 48+ $wgParser, $mvArticlePath, $mvgScriptPath, $wgScriptPath, $wgServer, $wgExtensionFunctions, $markerList,$wgVersion,
4949 $wgAjaxExportList, $mvEnableAutoComplete, $mvEnableJSMVDrewrite,
5050 $wgAutoloadClasses, $wgSpecialPages, $wgMediaHandlers, $wgJSAutoloadClasses,
5151 $wgAPIModules;
5252
 53+ //setupMsg
 54+ mvfInitMessages();
5355
54 - mvfInitMessages();
55 - //add the ALL page header
56 - mvfAutoAllPageHeader();
5756
5857 /********************************
5958 * Ajax Hooks
@@ -98,7 +97,13 @@
9998 /**********************************************/
10099 /***** register autoLoad javascript Classes: */
101100 /**********************************************/
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+
103108 $mvjsp = $mv_jspath . 'mv_embed/';
104109 //core:
105110 $wgJSAutoloadClasses['window.jQuery'] = $mvjsp . 'jquery/jquery-1.2.6.js';
@@ -305,9 +310,10 @@
306311 * API extension (this may be integrated into semantic wiki at some point)
307312 **************************************/
308313
 314+ //add the ALL page header
 315+ mvfAutoAllPageHeader();
309316
310317
311 -
312318 // $wgHooks['BeforePageDisplay'][] = 'mvDoSpecialPage';
313319 // $wgHooks['ArticleViewHeader'][] = 'mvArticleViewOpts';
314320 /**********************************************/
@@ -359,15 +365,20 @@
360366 $unique_req_param = MV_VERSION;
361367 }
362368
 369+ //if scriptload is off manually load the requested js:
363370 if( $wgEnableScriptLoader ){
364 - $debug_param = ( $mvgJSDebug ||
 371+ /*$debug_param = ( $mvgJSDebug ||
365372 $wgRequest->getVal('debug')=='true' ||
366373 $wgRequest->getVal('debug')=='1' )
367374 ? '&debug=true' : '';
368375 $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$wgScriptPath}/mvwScriptLoader.php?" .
369376 "class=window.jQuery,j.fn.autocomplete,j.fn.hoverIntent,mv_embed,mv_allpages,mv_search" .
370377 '&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+ }
372383 }else{
373384 $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_embed/jquery/jquery-1.2.6.min.js?{$unique_req_param}\"></script>" );
374385 $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_embed/jquery/plugins/jquery.autocomplete.js?{$unique_req_param}\"></script>" );
@@ -647,7 +658,7 @@
648659 /*
649660 * takes ntp time of format hh:mm:ss and converts to seconds
650661 */
651 -function ntp2seconds( $str_time ) {
 662+function npt2seconds( $str_time ) {
652663 $time_ary = explode( ':', $str_time );
653664 $hours = $min = $sec = 0;
654665 if ( count( $time_ary ) == 3 ) {
Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php
@@ -133,7 +133,7 @@
134134 if ( !$req_time )$req_time = '0';
135135
136136 if ( count( explode( ":", $req_time ) ) >= 2 ) {
137 - $req_time = ntp2seconds( $req_time );
 137+ $req_time = npt2seconds( $req_time );
138138 } else {
139139 if ( !is_numeric( $req_time ) && $req_time >= 0 ) {
140140 throw "error in req time format";
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -309,7 +309,7 @@
310310 mv_scroll2Time(evid.currentTime);
311311 }
312312 if( evid.userSlide ){
313 - var mvd_id = mv_scroll2Time( ntp2seconds( evid.jump_time ) );
 313+ var mvd_id = mv_scroll2Time( npt2seconds( evid.jump_time ) );
314314 if( mvd_id ){
315315 //also update the image:
316316 var img_url = $j('#mv_fd_mvd_'+mvd_id).attr('image_url');
@@ -369,8 +369,8 @@
370370 parts = this.name.split('/');
371371 this.start_ntp = parts[1];
372372 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);
375375 }
376376 });
377377 }
@@ -657,8 +657,8 @@
658658 parts = this.title.split('/');
659659 this.start_ntp = parts[1];
660660 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);
663663 }
664664 });
665665 titleObj.parseTitle();
@@ -904,7 +904,7 @@
905905 //check if we are out of range:
906906 if(mvd_id){
907907 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 ) ){
909909 window.location = wgArticlePath.replace( '$1', wgPageName +'/'+ time_ary[1] + '/' + time_ary[2]) + '#autoplay';
910910 return ;
911911 }
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php
@@ -52,10 +52,10 @@
5353 //@@todo support more time request formats
5454 if(strpos( $time_req,'/')!==false){
5555 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);
5858 }else{
59 - $start_sec = ntp2seconds($time_req);
 59+ $start_sec = npt2seconds($time_req);
6060 $end_sec = null;
6161 if($start_sec==0)output_full_file($file_loc);
6262 }
@@ -93,7 +93,7 @@
9494 die();
9595 }
9696
97 -function ntp2seconds($str_time){
 97+function npt2seconds($str_time){
9898 $time_ary = explode(':', $str_time);
9999 $hours=$min=$sec=0;
100100 if(count($time_ary)==3){
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvSequencer.js
@@ -1275,7 +1275,7 @@
12761276 clip_desc+='length: ' + seconds2ntp(new_clip_dur) +'('+clip_dif_str+')';
12771277 if(this_seq.resize_mode=='resize_end'){
12781278 //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);
12801280 clip_desc+='<br>end time: ' + new_end;
12811281 //also shift all the other clips (after the current)
12821282 //js_log("track_inx: " + track_inx + ' clip inx:'+clip_inx);
@@ -1288,7 +1288,7 @@
12891289 });
12901290 }else{
12911291 //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);
12931293 clip_desc+='<br>start time: ' + new_start;
12941294 }
12951295
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js
@@ -597,8 +597,8 @@
598598 do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
599599 });
600600 //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() );
603603 js_log('start_sec:'+start_sec + ' end: ' + end_sec);
604604 if(start_sec > end_sec){
605605 js_log('start > end : ' + start_sec + ' > ' + end_sec);
@@ -708,7 +708,7 @@
709709 adj_callback();
710710 },
711711 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());
713713 mv_slider_update_stats(mvd_id);
714714 }
715715 });
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -1082,14 +1082,14 @@
10831083 /*
10841084 * takes hh:mm:ss,ms or hh:mm:ss.ms input returns number of seconds
10851085 */
1086 -function ntp2seconds(ntp){
 1086+function npt2seconds(ntp){
10871087 if(!ntp){
1088 - //js_log('ntp2seconds:not valid ntp:'+ntp);
 1088+ //js_log('npt2seconds:not valid ntp:'+ntp);
10891089 return false;
10901090 }
10911091 times = ntp.split(':');
10921092 if(times.length!=3){
1093 - js_log('ntp2seconds:not valid ntp:'+ntp);
 1093+ js_log('npt2seconds:nnpt2secondsp:'+ntp);
10941094 return false;
10951095 }
10961096 //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 @@
162162 },
163163 updateVideoTime:function(start_ntp, end_ntp){
164164 //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);
166166 },
167167 //gives a chance to make any nesseary external requests
168168 //@@todo we can "start loading images" if we want
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_vlcEmbed.js
@@ -206,7 +206,7 @@
207207 //js_log('set buffer: ' + flash_state.bufferEnd + ' at time: ' + flash_state.time +' of total dur: ' + this.getDuration());
208208
209209 //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) ){
211211 this.currentTime = (this.vlc.input.time/1000) + this.media_element.selected_source.start_offset;
212212 }
213213 }else{
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js
@@ -122,7 +122,7 @@
123123 $j('#big_play_link_'+id).fadeOut('fast');
124124 //if playlist always start at 0
125125 embedObj.start_time_sec = (embedObj.instanceOf == 'mvPlayList')?0:
126 - ntp2seconds(embedObj.getTimeReq().split('/')[0]);
 126+ npt2seconds(embedObj.getTimeReq().split('/')[0]);
127127 },
128128 drag:function(e, ui){
129129 //@@todo get the -14 number from the skin somehow
@@ -153,7 +153,7 @@
154154 js_log('do jump to: '+embedObj.jump_time + ' perc:' +perc);
155155
156156 //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);
158158 var test = embedObj;
159159 embedObj.doSeek(perc);
160160 }
@@ -342,10 +342,10 @@
343343 //if we have time we can use:
344344 if( this.serverSideSeeking ){
345345 //make sure its a valid start time / end time (else set default)
346 - if( !ntp2seconds(start_ntp) )
 346+ if( !npt2seconds(start_ntp) )
347347 start_ntp = this.start_ntp;
348348
349 - if( !ntp2seconds(end_ntp) )
 349+ if( !npt2seconds(end_ntp) )
350350 end_ntp = this.end_ntp;
351351
352352 if( this.timeFormat == 'anx' ){
@@ -353,8 +353,8 @@
354354 }else if ( this.timeFormat =='mp4'){
355355 var mp4URL = parseUri( this.src );
356356 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 ) );
359359 }
360360
361361 //update the duration
@@ -442,8 +442,8 @@
443443 }
444444 }
445445 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;
448448 } //time format
449449
450450 if( !this.serverSideSeeking ){
@@ -820,7 +820,7 @@
821821 }
822822 }
823823 if( this.duration!=null && this.duration.split(':').length >= 2)
824 - this.duration = ntp2seconds( this.duration );
 824+ this.duration = npt2seconds( this.duration );
825825
826826 //if style is set override width and height
827827 var dwh = mv_default_video_size.split('x');
@@ -1156,8 +1156,8 @@
11571157 //grab all metadata and put it into the anno_data_cache:
11581158 $j.each(cmml_data.getElementsByTagName('clip'), function(inx, clip){
11591159 _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:','')),
11621162 'time_req':$j(clip).attr("start").replace('npt:','')+'/'+$j(clip).attr("end").replace('npt:','')
11631163 };
11641164 //grab all its meta
@@ -1186,8 +1186,8 @@
11871187 }
11881188 var curTime = this.getTimeReq().split('/');
11891189
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]);
11921192 js_log('showNextPrevLinks: req time: '+ s_sec + ' to ' + e_sec);
11931193 //now we have all the data in anno_data_cache
11941194 var current_done=false;
@@ -1344,7 +1344,7 @@
13451345 if(this.media_element.selected_source.serverSideSeeking)
13461346 this.seek_time_sec=0;
13471347 else
1348 - this.seek_time_sec=ntp2seconds(start_ntp);
 1348+ this.seek_time_sec=npt2seconds(start_ntp);
13491349 },
13501350 //@@todo overwite by embed library if we can render frames natavily
13511351 renderTimelineThumbnail:function( options ){
@@ -1364,7 +1364,7 @@
13651365 '</div>';
13661366 },
13671367 updateThumbTimeNTP:function( time){
1368 - this.updateThumbTime( ntp2seconds(time) - parseInt(this.start_offset) );
 1368+ this.updateThumbTime( npt2seconds(time) - parseInt(this.start_offset) );
13691369 },
13701370 updateThumbTime:function( float_sec ){
13711371 //js_log('updateThumbTime:'+float_sec);
@@ -1998,7 +1998,7 @@
19991999 var dur = this.getDuration();
20002000 var hide_progress = true;
20012001 //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 );
20032003
20042004 var slider_perc=0;
20052005 if( rel_start_sec <= 0 ){
@@ -2014,7 +2014,7 @@
20152015 this.setSliderValue( slider_perc , hide_progress);
20162016 }
20172017
2018 - width_perc = parseInt( (( ntp2seconds( options['end'] ) - ntp2seconds( options['start'] ) ) / dur)*100 ) ;
 2018+ width_perc = parseInt( (( npt2seconds( options['end'] ) - npt2seconds( options['start'] ) ) / dur)*100 ) ;
20192019 if( (width_perc + left_perc) > 100 ){
20202020 width_perc = 100 - left_perc;
20212021 }
@@ -2025,7 +2025,7 @@
20262026 }).show();
20272027
20282028 this.jump_time = options['start'];
2029 - this.seek_time_sec = ntp2seconds( options['start']);
 2029+ this.seek_time_sec = npt2seconds( options['start']);
20302030 //trim output to
20312031 this.setStatus( gM('seek_to')+' '+ seconds2ntp( this.seek_time_sec ) );
20322032 js_log('DO update: ' + this.jump_time);
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_flashEmbed.js
@@ -1737,7 +1737,7 @@
17381738 }
17391739 }
17401740
1741 - if(this.currentTime > ntp2seconds(this.start_ntp) && !this.startedTimedPlayback){
 1741+ if(this.currentTime > npt2seconds(this.start_ntp) && !this.startedTimedPlayback){
17421742 var fail = false;
17431743 try
17441744 {
@@ -1762,9 +1762,9 @@
17631763
17641764 //checks to see if we reached the end of playback:
17651765 if(this.duration && this.startedTimedPlayback &&
1766 - ( this.currentTime > (ntp2seconds(this.end_ntp)+1)
 1766+ ( this.currentTime > (npt2seconds(this.end_ntp)+1)
17671767 ||
1768 - ( this.currentTime > (ntp2seconds(this.end_ntp)-1)
 1768+ ( this.currentTime > (npt2seconds(this.end_ntp)-1)
17691769 && this.prevTime == this.currentTime) )
17701770 ){
17711771 js_log('prbally reached end of stream: '+this.currentTime);
@@ -1776,7 +1776,7 @@
17771777
17781778
17791779 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)));
17811781 },
17821782 restorePlayer:function(){
17831783 if(!this.fla)
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libTimedText/mvTextInterface.js
@@ -115,7 +115,7 @@
116116 //make sure the clip does not already exist:
117117 if($j('#tc_'+text_clip.id).length==0){
118118 var inserted = false;
119 - var text_clip_start_time = ntp2seconds( text_clip.start );
 119+ var text_clip_start_time = npt2seconds( text_clip.start );
120120
121121 var insertHTML = '<div style="border:solid thin black;" id="tc_'+text_clip.id+'" ' +
122122 'start="'+text_clip.start+'" end="'+text_clip.end+'" class="mvtt tt_'+text_clip.type_id+'">' +
@@ -128,8 +128,8 @@
129129 //js_log("ADDING CLIP: " + text_clip_start_time + ' html: ' + insertHTML);
130130 $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){
131131 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){
134134 inserted=true;
135135 $j(this).before(insertHTML);
136136 }
@@ -246,7 +246,7 @@
247247 //search for current time: flash red border trascript
248248 _this = this;
249249 $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){
251251 _this.prevTimeScroll=cur_time;
252252 $j('#mmbody_'+_this.pe.id).animate({scrollTop: $j(this).get(0).offsetTop}, 'slow');
253253 }
@@ -268,7 +268,7 @@
269269 _this = this;
270270 var scroll_to_id='';
271271 $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')) ){
273273 _this.prevTimeScroll=cur_time;
274274 if( $j(this).attr('id') )
275275 scroll_to_id = $j(this).attr('id');
@@ -359,8 +359,8 @@
360360
361361 var pcurl = parseUri( _this.getSRC() );
362362 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]);
365365 if(req_time[1]-req_time[0]> _this.request_length){
366366 //longer than 5 min will only issue a (request 5 min)
367367 req_time[1] = req_time[0]+_this.request_length;
Property changes on: trunk/extensions/MetavidWiki/skins
___________________________________________________________________
Added: svn:ignore
368368 + temp.js

Status & tagging log