r44925 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44924‎ | r44925 | r44926 >
Date:08:31, 23 December 2008
Author:dale
Status:deferred
Tags:
Comment:
hides out of range flash video so that its in-sync with ogg segment requests
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -6,7 +6,7 @@
77 * for more info visit http://metavid.org/wiki/Code
88 *
99 */
10 -define( 'MV_VERSION', '1.0r44460' );
 10+define( 'MV_VERSION', '1.0r44924' );
1111
1212 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
1313
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php
@@ -47,7 +47,7 @@
4848 $sample_embed[2]['desc'] = 'simple video with controls and thumbnail';
4949
5050
51 -$sample_embed[3]['tag'] = '<video style="width:320px;height:240px" roe="http://metavid.org/w/index.php?title=Special:MvExportStream&stream_name=Senate_proceeding_08-01-07&t=0:00:00/0:20:00&feed_format=roe" ></video>';
 51+$sample_embed[3]['tag'] = '<video style="width:400px;height:300px" roe="http://metavid.org/w/index.php?title=Special:MvExportStream&stream_name=Senate_proceeding_08-01-07&t=0:05:38/0:05:58&feed_format=roe" ></video>';
5252 $sample_embed[3]['desc'] = 'Demo of ROE only attribute';
5353
5454
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js
@@ -1545,6 +1545,7 @@
15461546 instanceOf:'flashEmbed',
15471547 monitorTimerId : 0,
15481548 old_pid:0,
 1549+ didSeekJump:false,
15491550 startedTimedPlayback:false,
15501551 supports: {
15511552 'play_head':true,
@@ -1595,8 +1596,11 @@
15961597 autoHide:'always',
15971598 top:'95%',
15981599 right:'0px'
1599 - }
1600 - }
 1600+ }
 1601+ },
 1602+ screen: {
 1603+ opacity: 0.2
 1604+ }
16011605 };
16021606
16031607 $f(this.pid, mv_embed_path + 'flowplayer/flowplayer-3.0.1.swf', flowConfig);
@@ -1609,6 +1613,9 @@
16101614 this.fla.onResume( function(){
16111615 _this.parent_play(); //update the interface
16121616 });
 1617+ //hide by default (untill its ready)
 1618+ this.fla.setVolume(0);
 1619+
16131620 //start monitor:
16141621 this.monitor();
16151622 this.old_pid++;
@@ -1665,7 +1672,11 @@
16661673 if( $j('#'+this.id).length != 0 )
16671674 this.monitorTimerId = window.setInterval('$j(\'#'+_this.id+'\').get(0).monitor()', 250);
16681675 }
1669 -
 1676+ //set the start & end ntp
 1677+ var end_ntp = (this.media_element.selected_source.end_ntp)?
 1678+ this.media_element.selected_source.end_ntp : seconds2ntp(0);
 1679+ var start_ntp = this.media_element.selected_source.start_ntp;
 1680+
16701681 var flash_state = this.fla.getStatus();
16711682 if( typeof flash_state == 'undefined' ){
16721683 var flash_state = {
@@ -1674,7 +1685,7 @@
16751686 }else{
16761687 //simplification of buffer state ... should move to support returning time rages like:
16771688 //http://www.whatwg.org/specs/web-apps/current-work/#normalized-timeranges-object
1678 - this.bufferedPercent = flash_state.bufferEnd / this.getDuration();
 1689+ this.bufferedPercent = flash_state.bufferEnd / this.getDuration();
16791690 }
16801691 //set the current Time (based on timeFormat)
16811692 if( this.media_element.selected_source.timeFormat =='anx' ){
@@ -1687,15 +1698,13 @@
16881699 //js_log('should stop buffering (does not seem to work)' + flash_state.bufferEnd + ' > dur: ' + this.getDuration() );
16891700 this.fla.stopBuffering();
16901701 }
1691 - }
1692 -
1693 - var end_ntp = (this.media_element.selected_source.end_ntp)?
1694 - this.media_element.selected_source.end_ntp : seconds2ntp(0);
1695 - var start_ntp = this.media_element.selected_source.start_ntp;
 1702+ }
16961703
16971704 if(this.currentTime > ntp2seconds(start_ntp) && !this.startedTimedPlayback){
1698 - this.startedTimedPlayback=true;
1699 - js_log("time is "+ this.currentTime + " started playback");
 1705+ this.startedTimedPlayback=true;
 1706+ js_log("time is "+ this.currentTime + " started playback");
 1707+ this.fla.setVolume(90);
 1708+ $f().getPlugin('screen').css({'opacity':'1.0'});
17001709 }
17011710 /* to support local seeks */
17021711 if(this.currentTime > 1 && this.seek_time_sec != 0 && !this.media_element.selected_source.supports_url_time_encoding)
@@ -1713,6 +1722,7 @@
17141723 if(!this.userSlide){
17151724 if((this.currentTime - ntp2seconds(start_ntp))<0){
17161725 this.setStatus('buffering...');
 1726+ this.fla.setVolume(0);
17171727 }else{
17181728 this.setStatus( seconds2ntp(this.currentTime) + '/' + end_ntp);
17191729 this.setSliderValue((this.currentTime - ntp2seconds(start_ntp)) / (ntp2seconds(end_ntp)-ntp2seconds(start_ntp)) );

Status & tagging log