Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/testing_page.php |
— | — | @@ -18,15 +18,8 @@ |
19 | 19 | <table border="1" cellpadding="6" width="600"> |
20 | 20 | <tr> |
21 | 21 | <td valign="top"> |
22 | | - <video id="embed_vid" |
23 | | -thumbnail="http://metavid.org/wiki/index.php?action=ajax&rs=mv_frame_server&stream_id=501&t=0:01:32&size=400x300" |
24 | | -roe="http://metavid.org/wiki/index.php?title=Special:MvExportStream&stream_name=House_proceeding_01-28-08&feed_format=roe&t=0:01:32/0:03:20" |
25 | | -style="width:400px;height:300px" |
26 | | -controls="true" embed_link="true" > |
27 | | - <source type="video/x-flv" src="http://mvbox2.cse.ucsc.edu/mvFlvServer.php/house_proceeding_01-28-08.flv?t=0:01:32/0:03:20"></source> |
28 | | - <source type="video/ogg" src="http://metavidstorage01.ucsc.edu/media/house_proceeding_01-28-08.ogg?t=0:01:32/0:03:20"></source> |
29 | | -</video> |
30 | | -</td> |
| 22 | + <video poster="sample_eclipse.jpg" src="sample_eclipse.ogg" ></video> |
| 23 | + </td> |
31 | 24 | <td valign="top"><b>Test embed</b><br /> |
32 | 25 | </td> |
33 | 26 | </tr> |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js |
— | — | @@ -279,11 +279,10 @@ |
280 | 280 | //js_log( 'done upload response is: ' + cat["responseText"] ); |
281 | 281 | _this.procPageResponse( response_text ); |
282 | 282 | |
283 | | - }else if( _this.upload_mode == 'chunks'){ |
| 283 | + }else if( _this.upload_mode == 'api'){ |
284 | 284 | if( _this.fogg.resultUrl ){ |
285 | 285 | //should have an json result: |
286 | | - $j( '#dlbox-centered' ).html( '<h3>' + gM('mv_upload_completed') + '</h3>' + |
287 | | - gM( 'mv_upload_done', _this.fogg.resultUrl) ); |
| 286 | + _this.updateUploadDone( _this.fogg.resultUrl ); |
288 | 287 | }else{ |
289 | 288 | //done state with error? ..not really possible given how firefogg works |
290 | 289 | js_log(" upload done, in chunks mode, but no resultUrl!"); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvUploader.js |
— | — | @@ -364,13 +364,18 @@ |
365 | 365 | }, |
366 | 366 | processApiResult: function( apiRes ){ |
367 | 367 | var _this = this; |
368 | | - //check for error |
369 | | - if( apiRes.upload.result == "Failure" ){ |
| 368 | + //check for simple error |
| 369 | + debugger; |
| 370 | + if( apiRes.error ){ |
| 371 | + _this.updateUploadError( apiRes.error ); |
| 372 | + //check for upload api error: |
| 373 | + }else if( apiRes.upload && apiRes.upload.result == "Failure" ){ |
370 | 374 | //error space is too large so we don't front load it |
371 | 375 | //do a remote call to get the error msg: |
372 | | - if(apiRes.upload.error != "unknown-error"){ |
373 | | - gMsgLoadRemote(apiRes.upload.error, function(msg){ |
374 | | - _this.updateUploadError( gM( apiRes.upload.error )); |
| 376 | + if( apiRes.upload.code[0]){ |
| 377 | + gMsgLoadRemote(apiRes.upload.code[0], function(){ |
| 378 | + js_log('send msg: ' + gM( apiRes.upload.code[0] )); |
| 379 | + _this.updateUploadError( gM( apiRes.upload.code[0] )); |
375 | 380 | }); |
376 | 381 | }else{ |
377 | 382 | _this.updateUploadError( gM('unknown-error')); |
— | — | @@ -380,8 +385,7 @@ |
381 | 386 | }else{ |
382 | 387 | //nothing fits assume unkown error: |
383 | 388 | _this.updateUploadError( gM('unknown-error')); |
384 | | - } |
385 | | - |
| 389 | + } |
386 | 390 | }, |
387 | 391 | updateUploadError:function( msg ){ |
388 | 392 | $j( '#dlbox-centered' ).html( '<h3>' + gM('uploaderror') + '</h3>' + |
— | — | @@ -393,7 +397,7 @@ |
394 | 398 | return false; |
395 | 399 | }); |
396 | 400 | }, |
397 | | - updateUploadDone:function(url){ |
| 401 | + updateUploadDone:function( url ){ |
398 | 402 | $j( '#dlbox-centered' ).html( '<h3>' + gM('successfulupload') + '</h3>' + |
399 | 403 | gM( 'mv_upload_done', url) ); |
400 | 404 | }, |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvPlayList.js |
— | — | @@ -755,7 +755,8 @@ |
756 | 756 | var pwidth = Math.round( perc * _this.track_len); |
757 | 757 | //var pwidth = Math.round( perc * _this.track_len - (_this.mv_seeker_width*perc) ); |
758 | 758 | |
759 | | - var barHtml = '<div id="cl_status_'+clip.id+'" class="cl_status" style="' + |
| 759 | + //add the buffer child indicator: |
| 760 | + var barHtml= '<div id="cl_status_' + clip.embed.id + '" class="cl_status" style="' + |
760 | 761 | 'left:'+cur_pixle +'px;'+ |
761 | 762 | 'width:'+pwidth + 'px;'; |
762 | 763 | //set left or right border based on track pos |
— | — | @@ -763,8 +764,11 @@ |
764 | 765 | 'border-left:solid thin black;': |
765 | 766 | 'border-right:solid thin black;'; |
766 | 767 | barHtml+= 'filter:alpha(opacity=40);'+ |
767 | | - '-moz-opacity:.40;">'+ |
768 | | - '</div>'; |
| 768 | + '-moz-opacity:.40;">'; |
| 769 | + |
| 770 | + barHtml+='<div class="mv_progress mv_buffer"></div>'; |
| 771 | + |
| 772 | + barHtml+='</div>'; |
769 | 773 | //background:#DDDclip.getColor() |
770 | 774 | $j('#seeker_bar_'+_this.id).append(barHtml); |
771 | 775 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css |
— | — | @@ -479,7 +479,7 @@ |
480 | 480 | position:absolute; |
481 | 481 | height:12px; |
482 | 482 | top:0px; |
483 | | - z-index:5; |
| 483 | + z-index:3; |
484 | 484 | } |
485 | 485 | |
486 | 486 | #SEQUENCER CSS: |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js |
— | — | @@ -469,7 +469,7 @@ |
470 | 470 | //http://www.jibbering.com/2002/4/httprequest.html (this should be done by extending jquery's ajax objects) |
471 | 471 | var end_inx = (uri.indexOf('?')!=-1)? uri.indexOf('?') : uri.length; |
472 | 472 | var no_param_uri = uri.substr(0, end_inx); |
473 | | - switch( no_param_uri.substr(no_param_uri.lastIndexOf('.'),4) ){ |
| 473 | + switch( no_param_uri.substr(no_param_uri.lastIndexOf('.'),4).toLowerCase() ){ |
474 | 474 | case '.flv':return 'video/x-flv';break; |
475 | 475 | case '.ogg': case '.ogv': return 'video/ogg';break; |
476 | 476 | case '.anx':return 'video/ogg';break; |
— | — | @@ -1932,6 +1932,8 @@ |
1933 | 1933 | this.setStatus( this.getTimeReq() ); |
1934 | 1934 | } |
1935 | 1935 | } |
| 1936 | + //update buffer information |
| 1937 | + this.updateBufferStatus(); |
1936 | 1938 | |
1937 | 1939 | //update monitorTimerId to call child monitor |
1938 | 1940 | if( ! this.monitorTimerId ){ |
— | — | @@ -1939,7 +1941,24 @@ |
1940 | 1942 | this.monitorTimerId = setInterval('$j(\'#'+this.id+'\').get(0).monitor()', 250); |
1941 | 1943 | } |
1942 | 1944 | } |
1943 | | - }, |
| 1945 | + }, |
| 1946 | + updateBufferStatus: function(){ |
| 1947 | + //build the buffer targeet based for playlist vs clip |
| 1948 | + var buffer_select = (this.pc) ? |
| 1949 | + '#cl_status_' + this.id + ' .mv_buffer': |
| 1950 | + '#mv_seeker_' + this.id + ' .mv_buffer'; |
| 1951 | + |
| 1952 | + //update the buffer progress bar (if available ) |
| 1953 | + if( this.bufferedPercent != 0 ){ |
| 1954 | + //js_log('bufferedPercent: ' + this.bufferedPercent); |
| 1955 | + if(this.bufferedPercent > 1) |
| 1956 | + this.bufferedPercent=1; |
| 1957 | + |
| 1958 | + $j(buffer_select).css("width", (this.bufferedPercent*100) +'%' ); |
| 1959 | + }else{ |
| 1960 | + $j(buffer_select).css("width", '0px' ); |
| 1961 | + } |
| 1962 | + }, |
1944 | 1963 | relativeCurrentTime: function(){ |
1945 | 1964 | if(!this.start_offset) |
1946 | 1965 | this.start_offset =0; |
— | — | @@ -1992,18 +2011,8 @@ |
1993 | 2012 | }else{ |
1994 | 2013 | //hide the progress bar |
1995 | 2014 | $j('#mv_seeker_' + this_id + ' .mv_playback').css("width", "0px"); |
1996 | | - } |
| 2015 | + } |
1997 | 2016 | |
1998 | | - //update the buffer progress bar (if available ) |
1999 | | - if( this.bufferedPercent != 0 ){ |
2000 | | - //js_log('bufferedPercent: ' + this.bufferedPercent); |
2001 | | - if(this.bufferedPercent > 1) |
2002 | | - this.bufferedPercent=1; |
2003 | | - $j('#mv_seeker_' + this_id + ' .mv_buffer').css("width", (this.bufferedPercent*100) +'%' ); |
2004 | | - }else{ |
2005 | | - $j('#mv_seeker_' + this_id + ' .mv_buffer').css("width", '0px' ); |
2006 | | - } |
2007 | | - |
2008 | 2017 | //js_log('set#mv_seeker_slider_'+this_id + ' perc in: ' + perc + ' * ' + $j('#mv_seeker_'+this_id).width() + ' = set to: '+ val + ' - '+ Math.round(this.mv_seeker_width*perc) ); |
2009 | 2018 | //js_log('op:' + offset_perc + ' *('+perc+' * ' + $j('#slider_'+id).width() + ')'); |
2010 | 2019 | }, |