Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | // Stores the smil document for this object ( for relative image paths ) |
42 | 42 | smilUrl: null, |
43 | 43 | |
44 | | - // The abstract embeed player parent |
| 44 | + // The abstract embed player parent |
45 | 45 | embedPlayer: null, |
46 | 46 | |
47 | 47 | /** |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js |
— | — | @@ -108,8 +108,12 @@ |
109 | 109 | // Update the interface |
110 | 110 | this.parent_play(); |
111 | 111 | |
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: |
114 | 118 | _this.smil.startBuffer(); |
115 | 119 | |
116 | 120 | // Set start clock time: |
— | — | @@ -117,18 +121,14 @@ |
118 | 122 | |
119 | 123 | // Start up monitor: |
120 | 124 | _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; |
125 | 131 | doPlay(); |
126 | | - } else { |
127 | | - this.getSmil( function( smil ){ |
128 | | - // update the smil element |
129 | | - _this.smil = smil; |
130 | | - doPlay(); |
131 | | - }) |
132 | | - } |
| 132 | + }) |
133 | 133 | }, |
134 | 134 | |
135 | 135 | stop: function(){ |