r68950 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68949‎ | r68950 | r68951 >
Date:15:54, 3 July 2010
Author:dale
Status:deferred
Tags:
Comment:
small smil core refactoring
Modified paths:
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js
@@ -40,7 +40,7 @@
4141 // Stores the smil document for this object ( for relative image paths )
4242 smilUrl: null,
4343
44 - // The abstract embeed player parent
 44+ // The abstract embed player parent
4545 embedPlayer: null,
4646
4747 /**
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
@@ -108,8 +108,12 @@
109109 // Update the interface
110110 this.parent_play();
111111
112 - var doPlay = function(){
113 - // Start bufering the movie if not already doing so:
 112+ // Make sure this.smil is ready :
 113+ this.getSmil( function( smil ){
 114+ // update the smil element
 115+ _this.smil = smil;
 116+
 117+ // Start buffering the movie if not already doing so:
114118 _this.smil.startBuffer();
115119
116120 // Set start clock time:
@@ -117,18 +121,14 @@
118122
119123 // Start up monitor:
120124 _this.monitor();
121 - }
122 -
123 - // Make sure this.smil is ready :
124 - if( this.smil ){
 125+ })
 126+ },
 127+ load: function(){
 128+ this.getSmil( function( smil ){
 129+ // update the smil element
 130+ _this.smil = smil;
125131 doPlay();
126 - } else {
127 - this.getSmil( function( smil ){
128 - // update the smil element
129 - _this.smil = smil;
130 - doPlay();
131 - })
132 - }
 132+ })
133133 },
134134
135135 stop: function(){

Status & tagging log