r52373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52372‎ | r52373 | r52374 >
Date:20:11, 24 June 2009
Author:dale
Status:deferred
Tags:
Comment:
improved archive.org timed Text example
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/example_usage/Player_Timed_Text.html (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/Player_Timed_Text.html
@@ -20,8 +20,8 @@
2121 <tr>
2222 <td valign="top" width="410">
2323 <video poster="http://ia340929.us.archive.org/0/items/princess_iron_fan/princess_iron_fan.thumbs/princess_iron_fan_000360.jpg"
24 - duration="1:13:0" linkback="http://www.archive.org/details/princess_iron_fan">
25 - <source type="video/ogg" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan.ogv"></source>
 24+ duration="1:13:0" linkback="http://www.archive.org/details/princess_iron_fan" >
 25+ <source type="video/ogg" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan.ogv" URLTimeEncoding="true"></source>
2626 <source type="video/h264" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan_512kb.mp4"></source>
2727 <text category="SUB" lang="en" type="text/x-srt" default="true"
2828 title="English subtitles" src="media/princess_archive_org/princess_iron_fan.srt">
@@ -38,7 +38,7 @@
3939 <td valign="top">
4040 <h4>Archive.org video with local SRTs (copied locally until we get srt over json for archive.org ;)</h4>
4141 <textarea cols="120" rows="12">
42 -<video poster="http://www.archive.org/download/princess_iron_fan/format=thumbnail"
 42+<video poster="http://www.archive.org/download/princess_iron_fan/format=thumbnail" URLTimeEncoding="true"
4343 duration="1:13:0" linkback="http://www.archive.org/details/princess_iron_fan">
4444 <source type="video/ogg" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan.ogv"></source>
4545 <source type="video/h264" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan_512kb.mp4"></source>
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -246,11 +246,11 @@
247247
248248 //set up the progress display for status updates:
249249 _this.dispProgressOverlay();
250 - var req ={
 250+ var req = {
251251 'action' : 'upload',
252252 'httpstatus' : 'true',
253253 'sessionkey' : _this.upload_session_key
254 - };
 254+ };
255255 //add token if present:
256256 if(this.etoken)
257257 req['token'] = this.etoken;
Index: branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
@@ -277,8 +277,9 @@
278278 var curhl = $j('#mmbody_'+this.pe.id +' .tt_scroll_highlight').get(0);
279279 if(npt2seconds($j(curhl).attr('start') ) < cur_time &&
280280 npt2seconds($j(curhl).attr('end') ) > cur_time){
281 - js_log('in range of current hl: ' +
282 - npt2seconds($j(curhl).attr('start')) + ' to ' + npt2seconds($j(curhl).attr('end')));
 281+ /*js_log('in range of current hl: ' +
 282+ npt2seconds($j(curhl).attr('start')) + ' to ' + npt2seconds($j(curhl).attr('end')));
 283+ */
283284 search_for_range = false;
284285 }else{
285286 search_for_range = true;
@@ -286,8 +287,12 @@
287288 $j('#mmbody_'+this.pe.id +' .tt_scroll_highlight').removeClass('tt_scroll_highlight');
288289 }
289290 };
 291+ /*js_log('search_for_range:'+search_for_range + ' for: '+ cur_time);*/
290292 if(search_for_range){
291 - //search for current time: flash red border trascript
 293+ //search for current time: add tt_scroll_highlight to clip
 294+ // optimize:
 295+ // should do binnary search not iterative
 296+ // avoid jquery function calls do native loops
292297 $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){
293298 if(npt2seconds($j(this).attr('start') ) < cur_time &&
294299 npt2seconds($j(this).attr('end') ) > cur_time){
@@ -296,7 +301,7 @@
297302 scrollTop: $j(this).get(0).offsetTop
298303 }, 'slow');
299304 $j(this).addClass('tt_scroll_highlight');
300 - js_log('should add class to: ' + $j(this).attr('id'));
 305+ //js_log('should add class to: ' + $j(this).attr('id'));
301306 //done with loop
302307 return false;
303308 }

Status & tagging log