r43395 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43394‎ | r43395 | r43396 >
Date:20:46, 11 November 2008
Author:dale
Status:old
Tags:
Comment:
* minor code clean up
* removed unnecessary entry point delay_load.php
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_embed/delay_load.php (deleted) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_oggplayEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -17,7 +17,7 @@
1818 * loadExternalJs()
1919 * addLoadEvent()
2020 */
21 -var org_vid_time_req =null; //store the orginal time req:
 21+var org_vid_time_req =null; //store the original time req:
2222 var org_thum_src = null; //stores the original thumbnail src
2323 var org_vid_title = null; //stores the original title
2424 //store the original range request:
@@ -31,7 +31,7 @@
3232 //for locking the interface (locked while loading)
3333 var mv_lock_vid_updates=true;
3434 //array for storing sliders
35 -//(depricated) var mv_sliders = new Object();
 35+//(deprecated) var mv_sliders = new Object();
3636 //array of original colors for restoring field color.
3737 var mv_tl_mvd_org_color = new Array();
3838 //array to manage state transitions of shaky mouses/browsers
@@ -888,20 +888,6 @@
889889 mv_do_play();
890890 }
891891 }
892 -/*function mv_do_stop(){
893 - //re-enable interface:
894 - mv_lock_vid_updates=false;
895 - if( $j('#embed_vid').get(0).isPlaying() ){
896 - //already stoped
897 - js_log('already stoped');
898 - }else{
899 - js_log('mv_do_stop');
900 - //run the original stop:
901 - $j('#embed_vid').get(0).org_eb_stop();
902 - //re-rewrite the play button:
903 - $j('#big_play_link_embed_vid').attr('href', 'javascript:mv_do_play();');
904 - }
905 -}*/
906892 function mv_do_play(mvd_id){
907893 js_log('mv_do_play:'+mvd_id);
908894 //stop the current
@@ -911,8 +897,10 @@
912898 //foce a given mvd if set
913899 if(mvd_id){
914900 mv_lock_vid_updates=false;
915 - do_video_mvd_update(mvd_id);
916 - }
 901+ //highlight the current / update url:
 902+ mv_stream_interface.mvdOver(mvd_id);
 903+ }
 904+
917905 //disable interface actions (mouse in out etc)
918906 mv_lock_vid_updates=true;
919907 //update the src if nessesary and no mvd provided:
Index: trunk/extensions/MetavidWiki/skins/mv_embed/delay_load.php
@@ -1,23 +0,0 @@
2 -<?php
3 -die('delay load is disabled by default, should only be used for testing');
4 -
5 -sleep( 1 );
6 -if ( isset( $_SERVER['PATH_INFO'] ) ) {
7 - $file_path = dirname( __FILE__ ) . str_replace( 'delay_load.php', '', $_SERVER['PATH_INFO'] );
8 - $ext = substr( $file_path, - 4 );
9 - switch( $ext ) {
10 - case '.css':
11 - header( 'Content-type: text/css' );
12 - break;
13 - case '.js':
14 - header( 'Content-type:text/javascript' );
15 - break;
16 - default:
17 - die('delay load can only be used for delayed load of css or javascript');
18 - break;
19 - }
20 - if ( is_file( $file_path ) ) {
21 - @include( $file_path );
22 - }
23 -}
24 -?>
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_oggplayEmbed.js
@@ -90,8 +90,7 @@
9191 //finished
9292 case 2:
9393 this.onStop();
94 - //assume reached the end:
95 - this.streamEnd();
 94+ //assume reached the end:
9695 break;
9796 }
9897 }
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -2162,6 +2162,7 @@
21632163 return ;
21642164 }
21652165 this.onClipDone_disp=true;
 2166+ this.thumbnail_disp=true;
21662167 $j('#img_thumb_'+this.id).css('zindex',1);
21672168 $j('#big_play_link_'+this.id).hide();
21682169 //add the liks_info_div black back
@@ -2591,26 +2592,6 @@
25922593 return '<div onclick="$j(\'#'+id+'\').get(0).play()" id="big_play_link_'+id+'" class="large_play_button" '+
25932594 'style="left:'+((this.playerPixelWidth()-130)/2)+'px;'+
25942595 'top:'+((this.playerPixelHeight()-96)/2)+'px;"></div>';
2595 - /*;
2596 - //setup button size
2597 - var play_btn_height =
2598 - var play_btn_width = 109;
2599 - if(this.width<320){
2600 - var play_btn_width= play_btn_height = Math.round(this.width/3);
2601 - }
2602 -
2603 - var top = Math.round(this.height/2)- (play_btn_height/2);
2604 - var left = Math.round(this.width/2)- (play_btn_width/2);
2605 -
2606 - out='';
2607 - out+='<div style="border:none;position:absolute;top:'+top+'px;left:'+left+'px;z-index:1">'+
2608 - '<a id="big_play_link_'+id+'" title="Play Media" href="javascript:document.getElementById(\''+id+'\').play();">';
2609 -
2610 - //fix for IE<7 and its lack of PNG support:
2611 - out+=getTransparentPng(new Object ({id:'play_'+id, width:play_btn_width, height:play_btn_height, border:"0",
2612 - src:mv_embed_path + '/skin/images/player_big_play_button.png' }));
2613 - out+='</a></div>';
2614 - return out;*/
26152596 },
26162597 //display the code to remotely embed this video:
26172598 showEmbedCode : function(embed_code){
@@ -2856,13 +2837,6 @@
28572838 this.pause();
28582839 }
28592840 },
2860 - //called when we play to the end of a stream (load the thumbnail)
2861 - streamEnd : function(){
2862 - //if we are not in playlist mode stop:
2863 - if(!this.pc){
2864 - this.stop();
2865 - }
2866 - },
28672841 /*
28682842 * base embed stop (can be overwritten by the plugin)
28692843 */

Status & tagging log