r44416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44415‎ | r44416 | r44417 >
Date:19:08, 10 December 2008
Author:dale
Status:deferred
Tags:
Comment:
* updates to stream interface
* style updates
* improved time text support
** inline timed text jumping for remote embeds
** improved language SRT selection example
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_vlcEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_timed_text.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/timedTextLibs/mv_timed_text.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -292,7 +292,7 @@
293293 //js_log('vid elm is playing delay restore:')
294294 if(!vid_elm.userSlide){ //dont' restore if userSlide is true
295295 if( ! this.monitorTimerId ){
296 - this.monitorTimerId = setInterval('mv_stream_interface.doRestore()', 250);
 296+ // this.monitorTimerId = setInterval('mv_stream_interface.doRestore()', 250);
297297 }
298298 }
299299 }else{
@@ -395,6 +395,8 @@
396396 return ;
397397 }
398398 mv_open_edit_mvd=mvd_type;
 399+ $j('#embed_vid').get(0).preview_mode=true;//turn on clip preivew mode:
 400+
399401 sajax_request_type='GET';
400402 sajax_do_call( "mv_add_disp",[wgTitle, mvd_type, org_vid_time_req], f );
401403 //insert before the first mvd:
@@ -492,7 +494,9 @@
493495 }
494496 //free the editor slot:
495497 js_log('mv_disp_mvd: nset mv_open_edit_mvd');
496 - mv_open_edit_mvd=null;
 498+ mv_open_edit_mvd=null;
 499+ $j('#embed_vid').get(0).preview_mode=false;//turn off clip preivew mode:
 500+
497501 function f( request ) {
498502 result= request.responseText;
499503 if (request.status != 200) result= "<div class='error'> " + request.status + " " + request.statusText + ": " + result + "</div>";
@@ -529,12 +533,11 @@
530534 }*/
531535
532536 /* non-ajax preview of clip adjustment*/
533 -function mv_adjust_preview(mvd_id){
534 -
535 -
 537+function mv_adjust_preview(mvd_id){
536538 js_log('start val:#mv_start_hr_'+mvd_id+' ' + $j('#mv_start_hr_'+mvd_id).val() + ' end:'+ $j('#mv_end_hr_'+mvd_id).val() );
537 -
 539+ $j('#embed_vid').get(0).hideHighlight();
538540 $j('#embed_vid').get(0).stop();
 541+ $j('#embed_vid').get(0).preview_mode=true;
539542 mv_lock_vid_updates=false;
540543 do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
541544 mv_lock_vid_updates=true;
@@ -764,7 +767,7 @@
765768 //do edit action specific calls:
766769 switch(edit_action){
767770 case 'save':
768 - var setHtmlId ='#mv_fcontent_'+mvd_id;
 771+ var setHtmlId ='#mv_fcontent_'+mvd_id;
769772 break;
770773 case 'preview':
771774 mv_lock_vid_updates=true;
@@ -863,6 +866,7 @@
864867 mv_lock_vid_updates=false;
865868 //free the editor slot:
866869 mv_open_edit_mvd=null;
 870+ $j('#embed_vid').get(0).preview_mode=false;//turn off clip preivew mode:
867871 }
868872 }
869873 //return false to prevent the form being submitted
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_timed_text.php
@@ -11,21 +11,21 @@
1212 <?php
1313 run_examples();
1414 function run_examples(){
15 -
 15+$examples = Array();
1616 //set up tags for easy display:
1717 $roe_url = 'http://metavid.org/w/index.php?title=Special:MvExportStream&stream_name=House_proceeding_07-18-06_00&t=1:23:16/1:23:44&feed_format=roe';
1818 $examples[] = array( 'tag' => '<video roe="'.$roe_url.'" ></video>',
1919 'desc' => 'Metavid based ROE file using CMML<br> ' .
2020 '<iframe width="500" height="300" src="'.$roe_url.'" ></iframe>'
2121 );
22 -
 22+$examples = Array();
2323 $srt_tag = ''.
24 -'<video src="sample_fish.ogg" poster="sample_fish.jpg">
 24+'<video src="sample_fish.ogg" poster="sample_fish.jpg" duration="26">
2525 <text category="SUB" lang="en" type="text/x-srt" default="true"
26 - src="sample_fish_text_en.srt">
 26+ title="english SRT subtitles" src="sample_fish_text_en.srt">
2727 </text>
2828 <text category="SUB" lang="es" type="text/x-srt"
29 - src="sample_fish_text_es.srt">
 29+ title="spanish SRT subtitles" src="sample_fish_text_es.srt">
3030 </text>
3131 </video>';
3232 $examples[] = array( 'tag' => $srt_tag,
Index: trunk/extensions/MetavidWiki/skins/mv_embed/timedTextLibs/mv_timed_text.js
@@ -9,53 +9,57 @@
1010 default_time_range: "source", //by default just use the source don't get a time-range
1111 transcript_set:null,
1212 autoscroll:true,
13 - scrollTimerId:0,
14 - availableTracks:{},
 13+ scrollTimerId:0,
1514 init:function( parentEmbed ){
 15+ //init a new availableTracks obj:
 16+ this.availableTracks={};
1617 //set the parent embed object:
1718 this.pe=parentEmbed;
1819 //parse roe if not already done:
19 - this.getTimedTextTracks();
 20+ this.getTimedTextTracks();
2021 },
2122 //@@todo separate out data loader & data display
2223 getTimedTextTracks:function(){
2324 js_log("load timed text from roe: "+ this.pe.roe);
24 -
 25+ var _this = this;
2526 //if roe not yet loaded do load it:
2627 if(this.pe.roe){
2728 if(!this.pe.media_element.addedROEData){
2829 js_log("load roe data!");
29 - var _this = this;
 30+ $j('#mv_txt_load_'+_this.pe.id).show(); //show the loading icon
3031 do_request(this.pe.roe, function(data)
3132 {
3233 //continue
3334 _this.pe.media_element.addROE(data);
34 - _this.getParseCMML_rowReady();
 35+ _this.getParseTimedText_rowReady();
3536 });
3637 }else{
3738 js_log('row data ready (no roe request)');
38 - this.getParseTimedText_rowReady();
 39+ _this.getParseTimedText_rowReady();
3940 }
4041 }else{
4142 if( this.pe.media_element.timedTextSources() ){
42 - this.getParseTimedText_rowReady();
 43+ _this.getParseTimedText_rowReady();
4344 }else{
4445 js_log('no roe data or timed text sources');
4546 }
4647 }
4748 },
4849 getParseTimedText_rowReady: function (){
49 - _this = this;
 50+ var _this = this;
5051 //create timedTextObj
51 - var default_found=false;
 52+ var default_found=false;
 53+ js_log("mv_txt_load_:SHOW mv_txt_load_");
5254 $j('#mv_txt_load_'+_this.pe.id).show(); //show the loading icon
5355
5456 $j.each( this.pe.media_element.sources, function(inx, source){
55 - if( typeof source.id == 'undefined' )
 57+
 58+ if( typeof source.id == 'undefined' || source.id == null )
5659 source.id = 'tt_' + inx;
5760 var tObj = new timedTextObj( source );
5861 //make sure its a valid timed text format (we have not loaded or parsed yet) : (
5962 if( tObj.lib != null ){
 63+ js_log('adding Track: ' + source.id + ' to ' + _this.pe.id);
6064 _this.availableTracks[ source.id ] = tObj;
6165 //debugger;
6266 js_log( 'is : ' + source.id + ' default: ' + source.default );
@@ -73,7 +77,7 @@
7478 });
7579 //no default clip found take the first_id
7680 if(!default_found)
77 - $j.each( _this.availableTracks, function(inx, sourceTrack){
 81+ $j.each( _this.availableTracks, function(inx, sourceTrack){
7882 _this.loadAndDisplay( sourceTrack.id );
7983 default_found=true;
8084 //retun after loading first available
@@ -87,8 +91,8 @@
8892 },
8993 loadAndDisplay: function ( track_id){
9094 var _this = this;
 95+ $j('#mv_txt_load_'+_this.pe.id).show();//show the loading icon
9196 _this.availableTracks[ track_id ].load(_this.default_time_range, function(){
92 - //hide the loading icon
9397 $j('#mv_txt_load_'+_this.pe.id).hide();
9498 _this.addTrack( track_id );
9599 });
@@ -100,23 +104,27 @@
101105 _this.availableTracks[ track_id ].display=true;
102106 //setup the layout:
103107 this.setup_layout();
 108+ js_log("SHOULD ADD: "+ track_id + ' count:' + _this.availableTracks[ track_id ].textNodes.length);
104109 $j.each(_this.availableTracks[ track_id ].textNodes, function(inx, text_clip){
105110 _this.add_merge_text_clip( text_clip );
106111 });
107112 },
108 - add_merge_text_clip:function(text_clip){
 113+ add_merge_text_clip: function(text_clip){
 114+ var _this = this;
109115 //make sure the clip does not already exist:
110116 if($j('#tc_'+text_clip.id).length==0){
111117 var inserted = false;
112 - var text_clip_start_time = ntp2seconds(text_clip.start);
 118+ var text_clip_start_time = ntp2seconds( text_clip.start );
 119+
113120 var insertHTML = '<div style="border:solid thin black;" id="tc_'+text_clip.id+'" ' +
114 - 'start="'+text_clip.start+'" end="'+text_clip.end+'" class="mvtt '+text_clip.type_id+'">' +
115 - '<div style="top:0px;left:0px;right:0px;height:20px;font-size:small">'+
 121+ 'start="'+text_clip.start+'" end="'+text_clip.end+'" class="mvtt tt_'+text_clip.type_id+'">' +
 122+ '<div class="mvttseek" style="top:0px;left:0px;right:0px;height:20px;font-size:small">'+
116123 '<img style="display:inline;" src="'+mv_embed_path+'/images/control_play_blue.png">'+
117124 text_clip.start + ' to ' +text_clip.end+
118125 '</div>'+
119126 text_clip.body +
120127 '</div>';
 128+ //js_log("ADDING CLIP: " + text_clip_start_time + ' html: ' + insertHTML);
121129 $j('#mmbody_'+this.pe.id +' .mvtt').each(function(){
122130 if(!inserted){
123131 //js_log( ntp2seconds($j(this).attr('start')) + ' > ' + text_clip_start_time);
@@ -125,11 +133,32 @@
126134 $j(this).before(insertHTML);
127135 }
128136 }
129 - });
130 - //js_log('should just append: '+insertHTML);
 137+ });
 138+ //js_log('should just add to end: '+insertHTML);
131139 if(!inserted){
132140 $j('#mmbody_'+this.pe.id ).append(insertHTML);
133141 }
 142+
 143+ //apply the mouse over transcript seek/click functions:
 144+ $j(".mvttseek").click( function() {
 145+ _this.pe.play();
 146+ });
 147+ $j(".mvttseek").hover(
 148+ function () {
 149+ js_log('mvttseek: over');
 150+ $j(this).parent().addClass('tt_highlight');
 151+ //do section highlight
 152+ _this.pe.highlightPlaySection( {
 153+ 'start' : $j(this).parent().attr("start"),
 154+ 'end' : $j(this).parent().attr("end")
 155+ });
 156+ },
 157+ function () {
 158+ $j(this).parent().removeClass('tt_highlight');
 159+ //de highlight section
 160+ _this.pe.hideHighlight();
 161+ }
 162+ );
134163 }
135164 },
136165 setup_layout:function(){
@@ -161,29 +190,28 @@
162191 'style="position:absolute;top:20px;left:0px;' +
163192 'right:0px;bottom:0px;' +
164193 'height:'+(this.pe.height-20)+
165 - 'px;overflow:auto;"><span id="mv_txt_load_' + this.pe.id + '">'+
 194+ 'px;overflow:auto;"><span style="display:none;" id="mv_txt_load_' + this.pe.id + '">'+
166195 getMsg('loading_txt')+'</span>' +
167196 '</div>';
168197 },
169198 getTsSelect:function(){
170199 var _this = this;
171 - js_log('getTsSelect');
172 - //check if menu already present
 200+ js_log('getTsSelect');
173201 var selHTML = '<div id="mvtsel_' + this.pe.id + '" style="position:absolute;background:#FFF;top:20px;left:0px;right:0px;bottom:0px;overflow:auto;">';
174202 selHTML+='<b>' + getMsg('select_transcript_set') + '</b><ul>';
175 - for(var i in _this.availableTracks){ //for in loop ok on object
176 - var checked = (_this.availableTracks[i].display)?'checked':'';
 203+ //debugger;
 204+ for(var i in _this.availableTracks){ //for in loop ok on object
 205+ var checked = ( _this.availableTracks[i].display ) ? 'checked' : '';
177206 selHTML+='<li><input name="'+i+'" class="mvTsSelect" type="checkbox" ' + checked + '>'+
178207 _this.availableTracks[i].getTitle() + '</li>';
179208 }
180209 selHTML+='</ul>' +
181210 '<a href="#" onClick="document.getElementById(\'' + this.pe.id + '\').textInterface.applyTsSelect();return false;">'+getMsg('close')+'</a>'+
182 - '</div>';
 211+ '</div>';
183212 $j('#metaBox_'+_this.pe.id).append( selHTML );
184213 },
185214 applyTsSelect:function(){
186 - var _this = this;
187 -
 215+ var _this = this;
188216 //update availableTracks
189217 $j('#mvtsel_'+this.pe.id+' .mvTsSelect').each(function(){
190218 if(this.checked){
@@ -193,12 +221,14 @@
194222 _this.loadAndDisplay( track_id);
195223 }else{
196224 _this.availableTracks[this.name].display=true;
197 - $j('#mmbody_'+_this.pe.id +' .'+this.name ).fadeIn("fast");
 225+ //display the named class:
 226+ $j('#mmbody_'+_this.pe.id +' .tt_'+this.name ).fadeIn("fast");
198227 }
199228 }else{
200229 if(_this.availableTracks[this.name].display){
201230 _this.availableTracks[this.name].display=false;
202 - $j('#mmbody_'+_this.pe.id +' .'+this.name ).fadeOut("fast");
 231+ //hide unchecked
 232+ $j('#mmbody_'+_this.pe.id +' .tt_'+this.name ).fadeOut("fast");
203233 }
204234 }
205235 });
@@ -271,7 +301,8 @@
272302 * @@todo allow loading from external lib set
273303 */
274304 var timedTextObj = function( source ){
275 - //@@todo in the future we could support timed text in oggs if they can be accessed via javascript
 305+ //@@todo in the future we could support timed text in oggs if they can be accessed via javascript
 306+ //we should be able to do a HEAD request to see if we can read transcripts from the file.
276307 switch( source.mime_type ){
277308 case 'text/cmml':
278309 this.lib = 'CMML';
@@ -319,7 +350,7 @@
320351 var _this = this;
321352 js_log('textCMML: loading track: '+ this.src);
322353
323 - //:: Load transcript range :: (currently disabled)
 354+ //:: Load transcript range ::
324355
325356 var pcurl = parseUri( _this.getSRC() );
326357 var req_time = pcurl.queryKey['t'].split('/');
@@ -394,8 +425,8 @@
395426 var text_clip = {
396427 "start": i,
397428 "end": o,
398 - "type_id": _this.id,
399 - "id": n,
 429+ "type_id": this.id,
 430+ "id": this.id + '_' + n,
400431 "body": t
401432 }
402433 this.textNodes.push( text_clip );
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js
@@ -25,6 +25,7 @@
2626 //we want to let mv_embed handle the controls so notice the absence of control attribute
2727 // controls=false results in controls being displayed:
2828 //http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-August/016159.html
 29+ js_log("play url:" + this.getURI( this.seek_time_sec ));
2930 return '<video ' +
3031 'id="'+this.pid + '" ' +
3132 'style="width:'+this.width+'px;height:'+this.height+'px;" ' +
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_vlcEmbed.js
@@ -221,10 +221,10 @@
222222 if( this.duration > 0 || this.vlc.input.time > 0){
223223 this.start_offset=this.media_element.selected_source.start_offset;
224224
225 - //if we have media duration procceed
 225+ //if we have media duration proceed
226226 if(this.duration){
227227 //as long as the user is not interacting with the playhead update:
228 - if(! this.userSlide){
 228+ if(! this.userSlide){
229229 //slider pos is not accurate with flash:
230230 if(this.vlc.input.position!=0 && this.media_element.selected_source.mime_type!='video/x-flv'){
231231 /*js_log(' set slider via input.position: ' +
@@ -238,7 +238,7 @@
239239 ' ='+ ((this.vlc.input.time/1000)-this.start_offset)/this.duration );
240240 */
241241 this.setSliderValue( ((this.vlc.input.time/1000) -this.start_offset) / this.duration);
242 - }
 242+ }
243243 //js_log('set status: '+ seconds2ntp(this.currentTime) + ' e:'+seconds2ntp(this.duration+this.start_offset));
244244 this.setStatus(seconds2ntp(this.currentTime) + '/' + seconds2ntp(this.duration+this.start_offset) );
245245 }
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css
@@ -286,7 +286,13 @@
287287 margin: -13px 0 0 0px;
288288 cursor: pointer;
289289 }
290 -
 290+.tt_highlight{
 291+ border: solid thin blue;
 292+ background: #CCC;
 293+}
 294+.mvttseek{
 295+ cursor:pointer;
 296+}
291297 .large_play_button {
292298 background: url(images/player_big_play_button.png) 0 0 no-repeat;
293299 display:block;
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -160,10 +160,10 @@
161161 "paused":true,
162162 "readyState":0, //http://www.whatwg.org/specs/web-apps/current-work/#readystate
163163 "currentTime":0, //current playback position (should be updated by plugin)
164 - "duration":NaN, //media duration (read from file or the temporal url)
 164+ "duration":null, //media duration (read from file or the temporal url)
165165
166166 //custom attributes for mv_embed:
167 - "play_button":true,
 167+ "play_button":true,
168168 "thumbnail":null,
169169 "linkback":null,
170170 "embed_link":true,
@@ -1649,6 +1649,7 @@
16501650 embedVideo.prototype = {
16511651 /** The mediaElement object containing all mediaSource objects */
16521652 media_element:null,
 1653+ preview_mode:false,
16531654 slider:null,
16541655 ready_to_play:false, //should use html5 ready state
16551656 load_error:false, //used to set error in case of error
@@ -1708,8 +1709,12 @@
17091710 this[attr]=default_video_attributes[attr];
17101711 //js_log('attr:' + attr + ' val: ' + video_attributes[attr] +" "+ 'elm_val:' + element.getAttribute(attr) + "\n (set by attr)");
17111712 }
1712 - }
1713 - //js_log("ROE SET: "+ this.roe);
 1713+ }
 1714+ if( this.duration!=null && this.duration.split(':').length >= 2)
 1715+ this.duration = ntp2seconds( this.duration );
 1716+
 1717+ js_log("DD:Init:Duration set:: "+ this.duration);
 1718+
17141719 //if style is set override width and height
17151720 var dwh = mv_default_video_size.split('x');
17161721 this.width = element.style.width ? element.style.width : dwh[0];
@@ -1722,7 +1727,7 @@
17231728 if(element.innerHTML!='' && element.getElementsByTagName('source').length==0){
17241729 js_log('innerHTML: ' + element.innerHTML);
17251730 this.user_missing_plugin_html=element.innerHTML;
1726 - }
 1731+ }
17271732 // load all of the specified sources
17281733 this.media_element = new mediaElement(element);
17291734 },
@@ -1841,8 +1846,8 @@
18421847 }
18431848 },
18441849 getTimeReq:function(){
1845 - js_log('f:getTimeReq');
1846 - var default_time_req = '0:00:00/0:00:00';
 1850+ js_log('f:getTimeReq:'+ this.getDurationNTP());
 1851+ var default_time_req = '0:00:00/' + this.getDurationNTP() ;
18471852 if(!this.media_element)
18481853 return default_time_req;
18491854 if(!this.media_element.selected_source)
@@ -1851,12 +1856,13 @@
18521857 return default_time_req;
18531858 return this.media_element.selected_source.start_ntp+'/'+this.media_element.selected_source.end_ntp;
18541859 },
1855 - getDuration:function(){
1856 - //update some local pointers for the selected source:
1857 - this.duration = this.media_element.selected_source.duration;
 1860+ getDuration:function(){
 1861+ //update some local pointers for the selected source:
 1862+ if( this.media_element.selected_source.duration != 0 )
 1863+ this.duration = this.media_element.selected_source.duration;
18581864 this.start_offset = this.media_element.selected_source.start_offset;
18591865 this.start_ntp = this.media_element.selected_source.start_ntp;
1860 - this.end_ntp = this.media_element.selected_source.end_ntp;
 1866+ this.end_ntp = this.media_element.selected_source.end_ntp;
18611867 //return the duration
18621868 return this.duration;
18631869 },
@@ -1934,6 +1940,10 @@
19351941 }
19361942 this.onClipDone_disp=true;
19371943 this.thumbnail_disp=true;
 1944+ //make sure we are not in preview mode( no end clip actions in preview mode)
 1945+ if( this.preview_mode )
 1946+ return ;
 1947+
19381948 $j('#img_thumb_'+this.id).css('zindex',1);
19391949 $j('#big_play_link_'+this.id).hide();
19401950 //add the liks_info_div black back
@@ -1966,7 +1976,7 @@
19671977 }
19681978 }
19691979 )
1970 - //now load roe if nessesaryand showNextPrevLinks
 1980+ //now load roe if run the showNextPrevLinks
19711981 if(this.roe && this.media_element.addedROEData==false){
19721982 do_request(this.roe, function(data)
19731983 {
@@ -2422,9 +2432,14 @@
24232433 mvJsLoader.doLoad({
24242434 'textInterface':'timedTextLibs/mv_timed_text.js'
24252435 }, function(){
2426 - _this.textInterface = new textInterface( _this );
 2436+
 2437+ _this.textInterface = new textInterface( _this );
24272438 //show interface
24282439 _this.textInterface.show();
 2440+ js_log("NEW TEXT INTERFACE");
 2441+ for(var i in _this.textInterface.availableTracks){
 2442+ js_log("tracks in new interface: "+_this.id+ ' tid:' + i);
 2443+ }
24292444 }
24302445 );
24312446 }else{
@@ -2724,6 +2739,12 @@
27252740 }
27262741 return null;
27272742 },
 2743+ /*
 2744+ * returns the selected source url for players to play
 2745+ */
 2746+ getURI : function(seek_time_sec){
 2747+ return this.media_element.selected_source.getURI( this.seek_time_sec );
 2748+ },
27282749 setSliderValue: function(perc, hide_progress){
27292750
27302751 //js_log('setSliderValue:'+perc+' ct:'+ this.currentTime);
@@ -2740,6 +2761,9 @@
27412762 //update the playback progress bar
27422763 if( ! hide_progress ){
27432764 $j('#mv_seeker_' + this_id + ' .mv_playback').css("width", Math.round( val + (this.mv_seeker_width*.5) ) + 'px' );
 2765+ }else{
 2766+ //hide the progress bar
 2767+ $j('#mv_seeker_' + this_id + ' .mv_playback').css("width", "0px");
27442768 }
27452769
27462770 //update the buffer progress bar (if available )
@@ -2756,21 +2780,23 @@
27572781 //js_log('op:' + offset_perc + ' *('+perc+' * ' + $j('#slider_'+id).width() + ')');
27582782 },
27592783 highlightPlaySection:function(options){
2760 - js_log('highlightPlaySection');
2761 -
 2784+ js_log('highlightPlaySection');
27622785 var this_id = (this.pc)?this.pc.pp.id:this.id;
27632786 var dur = this.getDuration();
27642787 var hide_progress = true;
27652788 //set the left percet and update the slider:
27662789 rel_start_sec = ( ntp2seconds( options['start']) - this.start_offset );
2767 - if( rel_start_sec < 0 ){
2768 - left_perc =0;
2769 -
 2790+
 2791+ if( rel_start_sec <= 0 ){
 2792+ left_perc =0;
 2793+ options['start'] = seconds2ntp( this.start_offset );
 2794+ rel_start_sec=0;
27702795 this.setSliderValue( 0 , hide_progress);
27712796 }else{
27722797 left_perc = parseInt( (rel_start_sec / dur)*100 ) ;
27732798 this.setSliderValue( (left_perc / 100) , hide_progress);
27742799 }
 2800+
27752801 width_perc = parseInt( (( ntp2seconds( options['end'] ) - ntp2seconds( options['start'] ) ) / dur)*100 ) ;
27762802 if( (width_perc + left_perc) > 100 ){
27772803 width_perc = 100 - left_perc;
@@ -2780,14 +2806,19 @@
27812807 'left':left_perc+'%',
27822808 'width':width_perc+'%',
27832809 }).show();
 2810+
27842811 this.jump_time = options['start'];
2785 - this.seek_time_sec = ntp2seconds( options['start']);
2786 - this.setStatus( getMsg('seek_to')+' '+this.jump_time );
2787 - this.updateThumbTime( ntp2seconds( this.jump_time ) );
 2812+ this.seek_time_sec = ntp2seconds( options['start']);
 2813+ //trim output to
 2814+ this.setStatus( getMsg('seek_to')+' '+ seconds2ntp( this.seek_time_sec ) );
 2815+ js_log('DO update: ' + this.jump_time);
 2816+ this.updateThumbTime( rel_start_sec );
27882817 },
27892818 hideHighlight:function(){
27902819 var this_id = (this.pc)?this.pc.pp.id:this.id;
27912820 $j('#mv_seeker_' + this_id + ' .mv_highlight').hide();
 2821+ this.setStatus( this.getTimeReq() );
 2822+ this.setSliderValue( 0 );
27922823 },
27932824 setStatus:function(value){
27942825 var id = (this.pc)?this.pc.pp.id:this.id;
@@ -2832,7 +2863,7 @@
28332864 return hours+":"+minutes+":"+seconds;
28342865 }
28352866 /*
2836 - * takes hh:mm:ss input returns number of seconds
 2867+ * takes hh:mm:ss,ms or hh:mm:ss.ms input returns number of seconds
28372868 */
28382869 function ntp2seconds(ntp){
28392870 if(!ntp){
@@ -2843,6 +2874,8 @@
28442875 if(times.length!=3){
28452876 return js_log('ntp2seconds:not valid ntp:'+ntp);
28462877 }
 2878+ //sometimes the comma is used inplace of pereid for ms
 2879+ times[2] = times[2].replace(/,\s?/,'.');
28472880 //return seconds float (ie take seconds float value if present):
28482881 return parseInt(times[0]*3600)+parseInt(times[1]*60)+parseFloat(times[2]);
28492882 }
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js
@@ -474,6 +474,7 @@
475475 setSliderValue:function(value){
476476 //js_log('calling original embed slider with val: '+value);
477477 this.cur_clip.embed.pe_setSliderValue( value );
 478+ //call seq playline update here
478479 },
479480 getSeqThumb: function(){
480481 //for each clip
@@ -545,7 +546,7 @@
546547 this.cur_clip=new_clip;
547548 $j('#clipDesc_'+this.cur_clip.id).show();
548549 //update the playhead:
549 - this.setSliderValue( this.cur_clip.dur_offset / this.getDuration() );
 550+ this.setSliderValue( this.cur_clip.dur_offset / this.getDuration() );
550551 },
551552 prev: function(){
552553 //advance the playhead to the previous clip
@@ -1154,7 +1155,7 @@
11551156 //status updates handled by playlist obj
11561157 },
11571158 setSliderValue:function(value){
1158 - //setSlider value handled by playlist obj
 1159+ //setSlider value handled by playlist obj
11591160 }
11601161 }
11611162

Status & tagging log