Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/Player_Timed_Text.html |
— | — | @@ -20,8 +20,8 @@ |
21 | 21 | <tr> |
22 | 22 | <td valign="top" width="410"> |
23 | 23 | <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> |
26 | 26 | <source type="video/h264" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan_512kb.mp4"></source> |
27 | 27 | <text category="SUB" lang="en" type="text/x-srt" default="true" |
28 | 28 | title="English subtitles" src="media/princess_archive_org/princess_iron_fan.srt"> |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | <td valign="top"> |
40 | 40 | <h4>Archive.org video with local SRTs (copied locally until we get srt over json for archive.org ;)</h4> |
41 | 41 | <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" |
43 | 43 | duration="1:13:0" linkback="http://www.archive.org/details/princess_iron_fan"> |
44 | 44 | <source type="video/ogg" src="http://www.archive.org/download/princess_iron_fan/princess_iron_fan.ogv"></source> |
45 | 45 | <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 @@ |
247 | 247 | |
248 | 248 | //set up the progress display for status updates: |
249 | 249 | _this.dispProgressOverlay(); |
250 | | - var req ={ |
| 250 | + var req = { |
251 | 251 | 'action' : 'upload', |
252 | 252 | 'httpstatus' : 'true', |
253 | 253 | 'sessionkey' : _this.upload_session_key |
254 | | - }; |
| 254 | + }; |
255 | 255 | //add token if present: |
256 | 256 | if(this.etoken) |
257 | 257 | req['token'] = this.etoken; |
Index: branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js |
— | — | @@ -277,8 +277,9 @@ |
278 | 278 | var curhl = $j('#mmbody_'+this.pe.id +' .tt_scroll_highlight').get(0); |
279 | 279 | if(npt2seconds($j(curhl).attr('start') ) < cur_time && |
280 | 280 | 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 | + */ |
283 | 284 | search_for_range = false; |
284 | 285 | }else{ |
285 | 286 | search_for_range = true; |
— | — | @@ -286,8 +287,12 @@ |
287 | 288 | $j('#mmbody_'+this.pe.id +' .tt_scroll_highlight').removeClass('tt_scroll_highlight'); |
288 | 289 | } |
289 | 290 | }; |
| 291 | + /*js_log('search_for_range:'+search_for_range + ' for: '+ cur_time);*/ |
290 | 292 | 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 |
292 | 297 | $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){ |
293 | 298 | if(npt2seconds($j(this).attr('start') ) < cur_time && |
294 | 299 | npt2seconds($j(this).attr('end') ) > cur_time){ |
— | — | @@ -296,7 +301,7 @@ |
297 | 302 | scrollTop: $j(this).get(0).offsetTop |
298 | 303 | }, 'slow'); |
299 | 304 | $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')); |
301 | 306 | //done with loop |
302 | 307 | return false; |
303 | 308 | } |