r48887 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48886‎ | r48887 | r48888 >
Date:16:49, 26 March 2009
Author:dale
Status:deferred
Tags:
Comment:
fixes to media stream export rss
fixes to #autoplay hash ( when player is broken caused many refreshes )
removes non-ogg stream results in export
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Index.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/add_media_wizard.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_nativeEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvPlayList.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -354,7 +354,6 @@
355355 $unique_req_param = MV_VERSION;
356356 }
357357
358 - /* (moved to on_dom ready) but here as well*/
359358 if( $wgEnableScriptLoader ){
360359 $debug_param = ( $mvgJSDebug ||
361360 $wgRequest->getVal('debug')=='true' ||
Index: trunk/extensions/MetavidWiki/includes/MV_Index.php
@@ -444,8 +444,8 @@
445445 $dbr->tableName( 'mv_stream_files' ) . '.stream_id ' .
446446 ' AND (' . $dbr->tableName( 'mv_stream_files' ) . '.file_desc_msg = ' .
447447 $dbr->addQuotes( $mvDefaultVideoQualityKey ) .
448 - ' OR '. $dbr->tableName( 'mv_stream_files' ) .'.file_desc_msg = ' .
449 - $dbr->addQuotes( $mvDefaultFlashQualityKey ) .
 448+ //' OR '. $dbr->tableName( 'mv_stream_files' ) .'.file_desc_msg = ' .
 449+ // $dbr->addQuotes( $mvDefaultFlashQualityKey ) .
450450 ')'.
451451 ') ';
452452
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php
@@ -631,17 +631,19 @@
632632 <?php echo mvRSSFeed::xmlEncode( $talkpage->getFullUrl() )?>
633633 </comments>
634634 <?php
 635+
635636 $person='';
636637 if($pmvd && $pmvd->Speech_by ){
637638 $personTitle = Title :: newFromText( $pmvd->Speech_by );
638639 ?>
639 -<media:person label="<?php echo $personTitle->getText() ?>" url="<?php echo mvRSSFeed::xmlEncode( $personTitle->getFullURL() ); ?>
 640+<media:person label="<?php echo $personTitle->getText() ?>" url="<?php echo mvRSSFeed::xmlEncode( $personTitle->getFullURL() ); ?>" />
640641 <?php
641642 }
642643 //handle any parent clip tag info:
643644 if( $pmvd ){ ?>
644645 <media:parent_clip label="<?php echo $parent_clip_desc ?>" url="<?php echo mvRSSFeed::xmlEncode( $pAnnoStreamTitle->getFullUrl() ) ?>" />
645 - <?php if( $pmvd->Bill ){
 646+<?php
 647+ if( $pmvd->Bill ){
646648 $bTitle = Title :: newFromText( $pmvd->Bill );
647649 ?>
648650 <media:bill label="<?php echo $bTitle->getText() ?>" url="<?php echo mvRSSFeed::xmlEncode( $bTitle->getFullURL() );?>" />
@@ -650,11 +652,12 @@
651653 foreach($pmvd->category as $cat_titlekey ){
652654 $cTitle = $cTitle = Title :: MakeTitle( NS_CATEGORY, $cat_titlekey );
653655 ?>
654 - <media:category label="<?php echo $cTitle->getText()?>" url=<?php echo mvRSSFeed::xmlEncode( $cTitle->getFullUrl()) ?>" />
655 -<?php
 656+<media:category label="<?php echo $cTitle->getText()?>" url="<?php echo mvRSSFeed::xmlEncode( $cTitle->getFullUrl()) ?>" />
 657+<?php
656658 }
657659 }
658660 }
 661+
659662 ?>
660663 <media:thumbnail
661664 url="<?php echo mvRSSFeed::xmlEncode( $thumb_ref ) ?>" />
Index: trunk/extensions/MetavidWiki/skins/add_media_wizard.js
@@ -11,7 +11,6 @@
1212
1313 var MV_EMBED_VIDEO_HANDLER = true; // if we should use mv_embed for all ogg_hanlder video embeds.
1414
15 -
1615 if( MV_EMBED_VIDEO_HANDLER ){
1716 var vidIdList = new Array();
1817 addOnloadHook( function(){
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -169,7 +169,7 @@
170170 //check for #autoplay ancor
171171 var hash = window.location.hash.toString();
172172 js_log(" hash is: " + hash);
173 - if( hash == '#autoplay'){
 173+ if( hash == '#autoplay'){
174174 //window.location.hash = '';
175175 setTimeout('mv_do_play()', 500);
176176 }
@@ -904,7 +904,7 @@
905905 //check if we are out of range:
906906 if(mvd_id){
907907 var time_ary = $j('#mv_fd_mvd_'+mvd_id).attr('name').split('/');
908 - if( ntp2seconds( time_ary[1] ) < ntp2seconds( $j('#embed_vid').get(0).start_ntp ) ){
 908+ if( ntp2seconds( time_ary[1] ) < ntp2seconds( $j('#embed_vid').get(0).start_ntp ) ){
909909 window.location = wgArticlePath.replace( '$1', wgPageName +'/'+ time_ary[1] + '/' + time_ary[2]) + '#autoplay';
910910 return ;
911911 }
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js
@@ -17,7 +17,8 @@
1818 upload_mode:'autodetect', //can be 'post', 'chunks' or autodetect. (autodetect issues an api call)
1919 encoder_settings:{ //@@todo allow server to set this
2020 'maxSize': 400,
21 - 'videoBitrate': 400
 21+ 'videoBitrate': 400,
 22+ 'noUpscaling':true
2223 },
2324 formData:{}, //the form to be submitted
2425
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvPlayList.js
@@ -678,7 +678,7 @@
679679 //ads colors/dividers between tracks
680680 colorPlayHead: function(){
681681 if( !this.mv_seeker_width)
682 - this.mv_seeker_width = $j('#mv_seeker_slider_'+this.id).width();
 682+ this.mv_seeker_width = $j('#mv_seeker_slider_'+this.id).width();
683683
684684 if( !this.track_len )
685685 this.track_len = $j('#seeker_bar_'+this.id).css('width').replace(/px/, '');
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js
@@ -406,7 +406,7 @@
407407 applyInsertControlBindings:function(){
408408 var _this = this;
409409 $j('.mv_insert_image_page').click(function(){
410 - _this.applyEdit();
 410+ _this.applyEdit();
411411 //copy over the desc text to the resource object
412412 _this.rObj['inlineDesc']= $j('#mv_inline_img_desc').val();
413413 _this.p_rsdObj.insertResource( _this.rObj );
@@ -470,8 +470,13 @@
471471 //if the video is "roe" based select the ogg stream
472472 if( this.rObj.roe_url && this.rObj.pSobj.cp.stream_import_key){
473473 var source = $j('#embed_vid').get(0).media_element.getSourceById( this.rObj.pSobj.cp.stream_import_key );
474 - this.rObj['src'] = source.getURI();
475 - js_log("g src_key: " + this.rObj.pSobj.cp.stream_import_key + ' src:' + this.rObj['src']) ;
 474+ if(!source){
 475+ js_error('Error::could not find source: ' + this.rObj.pSobj.cp.stream_import_key);
 476+ }else{
 477+ this.rObj['src'] = source.getURI();
 478+ js_log("g src_key: " + this.rObj.pSobj.cp.stream_import_key + ' src:' + this.rObj['src']) ;
 479+ return true;
 480+ }
476481 }
477482 },
478483 applyCrop:function(){
@@ -494,6 +499,7 @@
495500 '</div>'
496501 );
497502 }
 503+ return true;
498504 },
499505 //right now enableCrop loads "just in time"
500506 //@@todo we really need an "auto loader" type system.
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_nativeEmbed.js
@@ -86,9 +86,9 @@
8787 * native callbacks for the video tag:
8888 */
8989 oncanplaythrough : function(){
90 - js_log("f:oncanplaythrough start playback");
 90+ //js_log("f:oncanplaythrough start playback");
9191 //start playback (we don't yet support pre-loading clips)
92 - this.play();
 92+ //this.play();
9393 },
9494 onloadedmetadata: function(){
9595 js_log('f:onloadedmetadata get duration: ' +this.vid.duration);
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed
___________________________________________________________________
Name: svn:ignore
9696 + test.js

Status & tagging log