Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | /** |
478 | 478 | * Shows the timed text edit ui |
479 | 479 | * |
480 | | - * @param {String} mode Mode or page to display ( to diffrenciate between edit vs new transcript) |
| 480 | + * @param {String} mode Mode or page to display ( to differentiate between edit vs new transcript) |
481 | 481 | */ |
482 | 482 | showTimedTextEditUI: function( mode ){ |
483 | 483 | var _this = this; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedTextEdit.js |
— | — | @@ -290,14 +290,14 @@ |
291 | 291 | |
292 | 292 | }, |
293 | 293 | /** |
294 | | - * Uploads the text conntent |
| 294 | + * Uploads the text content |
295 | 295 | */ |
296 | 296 | uploadTextFile: function(){ |
297 | 297 | //put a dialog ontop |
298 | 298 | mw.addLoaderDialog( gM( 'mwe-uploading-text') ); |
299 | 299 | |
300 | | - //Get timed text target title |
301 | | - // NOTE: this should be cleanned up with accessors |
| 300 | + // Get timed text target title |
| 301 | + // NOTE: this should be cleaned up with accessors |
302 | 302 | var targetTitleKey = this.parentTimedText.embedPlayer.wikiTitleKey; |
303 | 303 | |
304 | 304 | // Add TimedText NS and language key and ".srt" |
— | — | @@ -376,7 +376,7 @@ |
377 | 377 | }, |
378 | 378 | getLangMenuItem: function( langKey , source_icon){ |
379 | 379 | return this.parentTimedText.getLi( |
380 | | - unescape( mw.languages[ langKey ] ), |
| 380 | + langKey + ' - ' + unescape( mw.languages[ langKey ] ), |
381 | 381 | source_icon, |
382 | 382 | function(){ |
383 | 383 | mw.log( "Selected: " + langKey ); |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/jquery.simpleUploadForm.js |
— | — | @@ -1,4 +1,4 @@ |
2 | | -/* |
| 2 | +/** |
3 | 3 | * simple form output jquery binding |
4 | 4 | * enables dynamic form output to a given target |
5 | 5 | * |
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.FirefoggRender.js |
— | — | @@ -52,18 +52,19 @@ |
53 | 53 | 'only_fogg':true |
54 | 54 | }); |
55 | 55 | |
56 | | - // check for firefogg: |
| 56 | + // Check for firefogg: |
57 | 57 | if ( this.myFogg.getFirefogg() ) { |
58 | 58 | this.enabled = true; |
59 | 59 | } else { |
60 | 60 | this.enabled = false; |
| 61 | + mw.log('Error firefogg not installed'); |
61 | 62 | return this; |
62 | 63 | } |
63 | 64 | |
64 | | - // set up local fogg pointer: |
| 65 | + // Setup local fogg pointer: |
65 | 66 | this.fogg = this.myFogg.fogg; |
66 | 67 | |
67 | | - // setup player instance |
| 68 | + // Setup player instance |
68 | 69 | this.player_target = options.player_target; |
69 | 70 | |
70 | 71 | // Extend the render options with any provided details |
— | — | @@ -93,6 +94,7 @@ |
94 | 95 | } ) |
95 | 96 | this.target_startRender = options.target_startRender; |
96 | 97 | } |
| 98 | + // Bind stopRender target button |
97 | 99 | if ( options.target_stopRender ) { |
98 | 100 | $j( options.target_stopRender ).click( function() { |
99 | 101 | _this.stopRender(); |
— | — | @@ -136,6 +138,7 @@ |
137 | 139 | _this.doNextFrame(); |
138 | 140 | }); |
139 | 141 | }, |
| 142 | + // Do the next frame in the render target |
140 | 143 | doNextFrame: function(){ |
141 | 144 | var _this = this; |
142 | 145 | // internal function to handle updates: |
— | — | @@ -146,22 +149,24 @@ |
147 | 150 | //mw.log( 'addFrame:' + $j( _this.player_target ).attr( 'id' ) ); |
148 | 151 | _this.fogg.addFrame( $j( _this.player_target ).attr( 'id' ) ); |
149 | 152 | _this.render_time += _this.interval; |
150 | | - if ( _this.render_time >= _this.player.getDuration() ) { |
| 153 | + if ( _this.render_time >= _this.player.getDuration() && _this.continue_rendering) { |
151 | 154 | _this.doFinalRender(); |
152 | | - } else { |
153 | | - if ( _this.continue_rendering ) { |
154 | | - _this.doNextFrame(); |
155 | | - } else { |
156 | | - mw.log('render stoped'); |
157 | | - // else quit: |
158 | | - _this.doFinalRender(); |
159 | | - } |
| 155 | + } else { |
| 156 | + _this.doNextFrame(); |
160 | 157 | } |
161 | 158 | } ); |
162 | 159 | }, |
| 160 | + |
| 161 | + /** |
| 162 | + * Stop the current render proccess on the next frame |
| 163 | + */ |
163 | 164 | stopRender:function() { |
164 | 165 | this.continue_rendering = false; |
165 | 166 | }, |
| 167 | + |
| 168 | + /** |
| 169 | + * Issue the call to firefogg to render out the ogg video |
| 170 | + */ |
166 | 171 | doFinalRender: function() { |
167 | 172 | var _this = this; |
168 | 173 | mw.log( " do final render: " ); |
— | — | @@ -169,19 +174,20 @@ |
170 | 175 | this.fogg.render(); |
171 | 176 | this.updateStatus(); |
172 | 177 | }, |
173 | | - updateStatus:function() { |
| 178 | + |
| 179 | + /** |
| 180 | + * Update the render status |
| 181 | + */ |
| 182 | + updateStatus: function() { |
174 | 183 | var _this = this; |
175 | | - var doUpdateStatus = function() { |
176 | | - var rstatus = _this.fogg.renderstatus() |
177 | | - $j( _this.target_timeStatus ).val( rstatus ); |
178 | | - if ( rstatus != 'done' && rstatus != 'rendering failed' ) { |
179 | | - setTimeout( doUpdateStatus, 100 ); |
180 | | - } else { |
181 | | - $j( _this.target_startRender ).attr( "disabled", false ); |
182 | | - } |
183 | | - } |
184 | | - doUpdateStatus(); |
| 184 | + var rstatus = _this.fogg.renderstatus() |
| 185 | + $j( _this.target_timeStatus ).val( rstatus ); |
| 186 | + if ( rstatus != 'done' && rstatus != 'rendering failed' ) { |
| 187 | + setTimeout( function(){ |
| 188 | + _this.updateStatus(); |
| 189 | + }, 100 ); |
| 190 | + } else { |
| 191 | + $j( _this.target_startRender ).attr( "disabled", false ); |
| 192 | + } |
185 | 193 | } |
186 | | - |
187 | | - |
188 | 194 | } |
\ No newline at end of file |
Index: branches/js2-work/phase3/js/mwEmbed/tests/Sequence_Editor.html |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | 'mv_pl_src':'media/sample_smil.xml', |
13 | 13 | //set the add media wizard to only include commons: |
14 | 14 | 'amw_conf':{ |
15 | | - 'enabled_cps':['wiki_commons'] |
| 15 | + 'enabled_providers':['wiki_commons'] |
16 | 16 | } |
17 | 17 | }); |
18 | 18 | }); |