r61322 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61321‎ | r61322 | r61323 >
Date:01:04, 21 January 2010
Author:dale
Status:deferred
Tags:
Comment:
* fix htmlEmbed inherit
* minor sequence editor fixes
* added image & text types to example sequence
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/htmlEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/nativeEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.PlayList.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/Player_Themable.html (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/media/sequence_transition_smil.xml (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/tests/media/sequence_transition_smil.xml
@@ -23,7 +23,14 @@
2424 </head>
2525 <body>
2626 <seq>
 27+ <ref type="text/html" dur="8" uri="Template:My_Video_Intro_Text"><![CDATA[
 28+<h3> <span class="mw-headline" id="cat">cat</span></h3>
 29+<div class="thumb tright"><div class="thumbinner" style="width:102px;"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Nos_kota.jpg/120px-Nos_kota.jpg"></div></div>
 30+<div style="color:gray"> MY Date: 21 January, 2010 00:45</div>
2731
 32+]]><param name="videoTitle">cat</param><param name="MyDate">{{CURRENTDAY}} {{CURRENTMONTHNAME}}, {{CURRENTYEAR}} {{CURRENTTIME}}</param></ref>
 33+
 34+
2835 <video src="http://upload.wikimedia.org/wikipedia/commons/d/d3/Okapia_johnstoni5.ogg"
2936 region="video_region"
3037 transIn="fromGreen"
@@ -42,7 +49,14 @@
4350 durationHint="70"
4451 type="video/ogg"
4552 poster="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/B-36_bomber.ogg/mid-B-36_bomber.ogg.jpg"
 53+ />
 54+
 55+ <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/USS_Bunker_Hill_hit_by_two_Kamikazes.jpg/400px-USS_Bunker_Hill_hit_by_two_Kamikazes.jpg"
 56+ region="video_region"
 57+ dur="5s"
 58+ type="image/jpeg"
4659 />
 60+
4761 </seq>
4862
4963 </body>
Index: branches/js2-work/phase3/js/mwEmbed/tests/Player_Themable.html
@@ -3,14 +3,15 @@
44 <html>
55 <head>
66 <title>Sample Themed Player</title>
7 - <!-- Pre-loading demo ( stuff ) likely needed for video display
8 - <script type="text/javascript" src="../jsScriptLoader.php?urid=1.1a&class=window.jQuery,mwEmbed,$j.ui,mw.EmbedPlayer,nativeEmbed,kplayerEmbed,javaEmbed,vlcEmbed,ctrlBuilder,mvpcfConfig,kskinConfig,$j.fn.menu,$j.cookie,$j.ui.slider,mw.TimedText"></script>
 7+ <!-- Pre-loading demo ( stuff ) likely needed for video display -->
 8+ <script type="text/javascript" src="../jsScriptLoader.php?urid=1.1d&class=window.jQuery,mwEmbed,$j.ui,mw.EmbedPlayer,nativeEmbed,kplayerEmbed,javaEmbed,vlcEmbed,ctrlBuilder,mvpcfConfig,kskinConfig,$j.fn.menu,$j.cookie,$j.ui.slider,mw.TimedText"></script>
99 <link rel="stylesheet" href="../skins/styles.css" type="text/css" media="screen" />
1010 <link rel="stylesheet" href="../skins/mvpcf/playerSkin.css" type="text/css" media="screen" />
11 - <link rel="stylesheet" href="../skins/kskin/playerSkin.css" type="text/css" media="screen" />
 11+ <link rel="stylesheet" href="../skins/kskin/playerSkin.css" type="text/css" media="screen" />
 12+
 13+ <!--
 14+ <script type="text/javascript" src="../mwEmbed.js?debug=true"></script>
1215 -->
13 -
14 - <script type="text/javascript" src="../mwEmbed.js?debug=true"></script>
1516
1617 </head>
1718 <script type="text/javascript">
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -1473,8 +1473,8 @@
14741474 if ( this.instanceOf ) {
14751475 eval( 'var tmpObj = ' + this.instanceOf );
14761476 for ( var i in tmpObj ) { // for in loop oky for object
1477 - if ( this['parent_' + i] ) {
1478 - this[i] = this['parent_' + i];
 1477+ if ( this[ 'parent_' + i ] ) {
 1478+ this[i] = this[ 'parent_' + i];
14791479 } else {
14801480 this[i] = null;
14811481 }
@@ -1491,7 +1491,7 @@
14921492 eval( ' var playerInterface =' + _this.selected_player.library + 'Embed;' );
14931493
14941494 for ( var method in playerInterface ) {
1495 - if ( _this[method] ){
 1495+ if ( _this[method] && !_this['parent_' + method] ){
14961496 _this['parent_' + method] = _this[method];
14971497 }
14981498 _this[ method ] = playerInterface[method];
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/htmlEmbed.js
@@ -41,7 +41,8 @@
4242 /**
4343 * Play function starts the v
4444 */
45 - play:function() {
 45+ play: function() {
 46+ mw.log(" parent: " + this.parent_play);
4647 // call the parent
4748 this.parent_play();
4849
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/nativeEmbed.js
@@ -62,7 +62,8 @@
6363 'id="' + this.pid + '" ' +
6464 'style="width:' + this.width + 'px;height:' + this.height + 'px;" ' +
6565 'width="' + this.width + '" height="' + this.height + '" ' +
66 - 'src="' + this.getSrc() + '" ' +
 66+ 'autobuffer="true" ' +
 67+ 'src="' + this.getSrc() + '" >' +
6768 '</video>';
6869 return eb;
6970 },
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.PlayList.js
@@ -196,7 +196,9 @@
197197 // import methods from the plObj to this
198198 for ( var method in plObj ) {
199199 // js parent preservation for local overwritten methods
200 - if ( this[method] )this['parent_' + method] = this[method];
 200+ if ( this[method] && !this[ 'parent_' + method ] ){
 201+ this[ 'parent_' + method ] = this[ method ];
 202+ }
201203 this[method] = plObj[method];
202204 }
203205
@@ -748,7 +750,7 @@
749751 var _this = this;
750752 mw.log( 'pl play' );
751753 // hide the playlist play button:
752 - this.$interface.find('.play-btn-large' ).hide();
 754+ this.$interface.find( '.play-btn-large' ).hide();
753755
754756 // un-pause if paused:
755757 if ( this.paused )
@@ -1846,7 +1848,7 @@
18471849 mvTransLib.doUpdate( this, percentage );
18481850
18491851 if ( percentage >= 1 ) {
1850 - mw.log( "transition done update with percentage " + percentage );
 1852+ //mw.log( "transition done update with percentage " + percentage );
18511853 this.animation_state = 2;
18521854 mvTransLib.doCloseTransition( this )
18531855 return true;

Status & tagging log