Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -39,9 +39,7 @@ |
40 | 40 | |
41 | 41 | // All playback types support kalturaAttribution |
42 | 42 | // to enable or disable use mw.setConfig( 'kalturaAttribution', [true|false] ) |
43 | | - 'kalturaAttribution' : true, |
44 | | - |
45 | | - 'playButtonLarge' : true |
| 43 | + 'kalturaAttribution' : true |
46 | 44 | }, |
47 | 45 | /** |
48 | 46 | * Initialization Object for the control builder |
— | — | @@ -129,6 +127,11 @@ |
130 | 128 | // Build component output: |
131 | 129 | for ( var component_id in this.components ) { |
132 | 130 | |
| 131 | + // Check for explit skip (component === false ) |
| 132 | + if( this.components[ component_id ] === false ){ |
| 133 | + continue; |
| 134 | + } |
| 135 | + |
133 | 136 | // Special case with playhead skip if we have > 30px of space for it |
134 | 137 | if ( component_id == 'playHead' && this.available_width < 30 ){ |
135 | 138 | continue; |
— | — | @@ -187,16 +190,14 @@ |
188 | 191 | |
189 | 192 | // Setup target shortcut to control-bar |
190 | 193 | $target = embedPlayer.$interface; |
191 | | - |
192 | | - |
193 | 194 | |
194 | 195 | // Add recommend firefox if we have non-native playback: |
195 | 196 | if ( _this.checkNativeWarning( ) ) { |
196 | 197 | _this.doNativeWarning(); |
197 | 198 | } |
198 | | - |
199 | | - if ( $j.browser.msie && $j.browser.version <= 6 ) { |
200 | | - $j( embedPlayer.id + ' .play-btn-large' ).pngFix(); |
| 199 | + |
| 200 | + if ( $j.browser.msie && $j.browser.version <= 6 ) { |
| 201 | + $j('#' + embedPlayer.id + ' .play-btn-large' ).pngFix(); |
201 | 202 | } |
202 | 203 | |
203 | 204 | |
— | — | @@ -298,8 +299,9 @@ |
299 | 300 | this.doVolumeBinding(); |
300 | 301 | |
301 | 302 | // Check if we have any custom skin Bindings to run |
302 | | - if ( this.addSkinControlBindings && typeof( this.addSkinControlBindings ) == 'function' ) |
| 303 | + if ( this.addSkinControlBindings && typeof( this.addSkinControlBindings ) == 'function' ){ |
303 | 304 | this.addSkinControlBindings(); |
| 305 | + } |
304 | 306 | }, |
305 | 307 | closeMenuOverlay: function(){ |
306 | 308 | var _this = this; |
— | — | @@ -452,7 +454,7 @@ |
453 | 455 | }, |
454 | 456 | function() { |
455 | 457 | hoverOverDelay = false; |
456 | | - setTimeout( function doHideVolume() { |
| 458 | + setTimeout( function() { |
457 | 459 | if ( !hoverOverDelay ) { |
458 | 460 | $targetvol.fadeOut( 'fast' ); |
459 | 461 | } |
— | — | @@ -587,16 +589,19 @@ |
588 | 590 | 'o' : function( ctrlObj ){ |
589 | 591 | return $j( '<div />' ) |
590 | 592 | .attr( 'title', gM( 'mwe-kaltura-platform-title' ) ) |
591 | | - .addClass( 'ui-state-default ui-corner-all ui-icon_link rButton k-attribution' ) |
| 593 | + .addClass( 'ui-state-default ui-corner-all ui-icon_link rButton' ) |
592 | 594 | .append( |
593 | 595 | $j('<span />') |
594 | | - .addClass( 'ui-icon k-attribution' ) |
| 596 | + .addClass( 'ui-icon kaltura-icon' ) |
595 | 597 | ) |
| 598 | + .unbind() |
| 599 | + .buttonHover() |
596 | 600 | .click( function( ) { |
597 | 601 | window.location = 'http://kaltura.com'; |
598 | 602 | } ); |
599 | 603 | } |
600 | 604 | }, |
| 605 | + |
601 | 606 | /** |
602 | 607 | * The options button, invokes display of the options menu |
603 | 608 | */ |
— | — | @@ -668,7 +673,7 @@ |
669 | 674 | 'volumeControl': { |
670 | 675 | 'w' : 28, |
671 | 676 | 'o' : function( ctrlObj ) { |
672 | | - $volumeOut = $j( '<div />' ); |
| 677 | + $volumeOut = $j( '<span />' ); |
673 | 678 | if ( ctrlObj.volume_layout == 'horizontal' ) { |
674 | 679 | $volumeOut.append( |
675 | 680 | $j( '<div />' ) |
— | — | @@ -687,7 +692,7 @@ |
688 | 693 | ); |
689 | 694 | |
690 | 695 | if ( ctrlObj.volume_layout == 'vertical' ) { |
691 | | - $volumeOut.append( |
| 696 | + $volumeOut.find('.volume_control').append( |
692 | 697 | $j( '<div />' ) |
693 | 698 | .css( { |
694 | 699 | 'position' : 'absolute', |
— | — | @@ -701,7 +706,8 @@ |
702 | 707 | ) |
703 | 708 | ); |
704 | 709 | } |
705 | | - return $volumeOut; |
| 710 | + //Return the inner html |
| 711 | + return $volumeOut.html(); |
706 | 712 | } |
707 | 713 | }, |
708 | 714 | |
Index: branches/js2-work/phase3/js/mwEmbed/skins/common/common.css |
— | — | @@ -468,3 +468,13 @@ |
469 | 469 | .interface_wrap{ |
470 | 470 | position:relative; |
471 | 471 | } |
| 472 | + |
| 473 | +.kaltura-icon { |
| 474 | + background-image:url('images/kaltura_logo_sm_transparent.png') !important; |
| 475 | + background-repeat:no-repeat; |
| 476 | + display: block; |
| 477 | + height: 12px; |
| 478 | + width: 12px; |
| 479 | + margin-top: -6px !important; |
| 480 | + margin-left: 3px !important; |
| 481 | +} |
\ No newline at end of file |
Index: branches/js2-work/phase3/js/mwEmbed/skins/common/images/kaltura_logo_sm_transparent.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/js2-work/phase3/js/mwEmbed/skins/common/images/kaltura_logo_sm_transparent.png |
___________________________________________________________________ |
Added: svn:mime-type |
472 | 482 | + application/octet-stream |
Index: branches/js2-work/phase3/js/mwEmbed/skins/common/images/kaltura_logo_sm_white.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/js2-work/phase3/js/mwEmbed/skins/common/images/kaltura_logo_sm_white.png |
___________________________________________________________________ |
Added: svn:mime-type |
473 | 483 | + application/octet-stream |
Index: branches/js2-work/phase3/js/mwEmbed/skins/mvpcf/EmbedPlayer.css |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | width:10px; |
160 | 160 | height:15px; |
161 | 161 | margin-left:-5px; |
162 | | - margin-top:1px; |
| 162 | + margin-top:0px; |
163 | 163 | } |
164 | 164 | |
165 | 165 | .mv-player .inOutSlider .ui-slider-handle{ |
Property changes on: branches/js2-work/phase3/js/mwEmbed/skins/kskin/images/kaltura_open_source_video_platform.png |
___________________________________________________________________ |
Added: svn:mergeinfo |
166 | 166 | Merged /branches/sqlite/js2/mwEmbed/skins/kskin/images/kaltura_open_source_video_platform.png:r58211-58321 |
167 | 167 | Merged /branches/REL1_15/phase3/js2/mwEmbed/skins/kskin/images/kaltura_open_source_video_platform.png:r51646 |
Index: branches/js2-work/phase3/js/mwEmbed/skins/kskin/kskinConfig.js |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 'playerSelect', |
26 | 26 | 'download', |
27 | 27 | 'share', |
28 | | - 'credits', |
| 28 | + 'credits' |
29 | 29 | ], |
30 | 30 | |
31 | 31 | // Extends base components with kskin specific options: |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | .addClass( 'k-menu ui-widget-content' ) |
81 | 81 | .css( { |
82 | 82 | 'width' : ctrlObj.getOverlayWidth(), |
83 | | - 'height' : ctrlObj.getOverlayHeight(), |
| 83 | + 'height' : ctrlObj.getOverlayHeight() |
84 | 84 | } ); |
85 | 85 | |
86 | 86 | // Setup menu offset ( if player height < getOverlayHeight ) |
— | — | @@ -268,14 +268,6 @@ |
269 | 269 | embedPlayer.$interface.find( '.menu-' + menu_item ) |
270 | 270 | ); |
271 | 271 | } |
272 | | - }, |
273 | | - |
274 | | - /** |
275 | | - * Show the "edit with kaltura" screen ( specific to kaltura skin ) |
276 | | - * NOTE: stub function |
277 | | - */ |
278 | | - showKalturaEdit: function(){ |
279 | | - |
280 | 272 | }, |
281 | 273 | |
282 | 274 | /** |
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js |
— | — | @@ -1335,7 +1335,7 @@ |
1336 | 1336 | $.fn.timedText = function ( action, target ){ |
1337 | 1337 | if( !target ) |
1338 | 1338 | options = action; |
1339 | | - if( !options ) |
| 1339 | + if( typeof options == 'undefined' ) |
1340 | 1340 | options = {}; |
1341 | 1341 | |
1342 | 1342 | $j( this.selector ).each(function(){ |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.Firefogg.js |
— | — | @@ -4,14 +4,14 @@ |
5 | 5 | */ |
6 | 6 | |
7 | 7 | mw.addMessages({ |
8 | | - "mwe-upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)", |
9 | | - |
| 8 | + "mwe-upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)", |
10 | 9 | "fogg-transcoding" : "Encoding video to ogg", |
11 | 10 | "fogg-select_file" : "Select file", |
12 | 11 | "fogg-select_new_file" : "Select new file", |
13 | 12 | "fogg-select_url" : "Select URL", |
14 | 13 | "fogg-check_for_firefogg" : "Checking for Firefogg...", |
15 | | - "fogg-installed" : "Firefogg is installed", |
| 14 | + "fogg-installed" : "Firefogg is installed,", |
| 15 | + "fogg-not-installed" : "Firefogg is not installed", |
16 | 16 | "fogg-for_improved_uploads" : "For improved uploads:", |
17 | 17 | "fogg-please-install" : "$1. More $2", |
18 | 18 | "fogg-please-install-install-linktext" : "Install firefogg", |
— | — | @@ -21,7 +21,8 @@ |
22 | 22 | "fogg-encoding-done" : "Encoding complete", |
23 | 23 | "fogg-badtoken" : "Token is not valid", |
24 | 24 | "fogg-preview" : "Preview video", |
25 | | - "fogg-hidepreview" : "Hide preview" |
| 25 | + "fogg-hidepreview" : "Hide preview", |
| 26 | + "fogg-warning-firebug" : "<b>Firebug</b> can cause conflicts with <i>Firefogg</i>. Please disable <b>Firebug</b> for this page." |
26 | 27 | }); |
27 | 28 | |
28 | 29 | var firefogg_install_links = { |
— | — | @@ -127,12 +128,18 @@ |
128 | 129 | 'audioBitrate' : '96', |
129 | 130 | 'noUpscaling' : true |
130 | 131 | }, |
131 | | - have_firefogg: null, // lazy initialised, use getFirefogg() |
132 | | - current_encoder_settings: null, // lazy initialised, use getEncoderSettings() |
133 | | - sourceFileInfo: null, // lazy initialised, use getSourceFileInfo() |
| 132 | + // lazy initialised, use getFirefogg() |
| 133 | + have_firefogg: null, |
| 134 | + |
| 135 | + // lazy initialised, use getEncoderSettings() |
| 136 | + current_encoder_settings: null, |
| 137 | + |
| 138 | + // lazy initialised, use getSourceFileInfo() |
| 139 | + sourceFileInfo: null, |
| 140 | + |
| 141 | + // Valid ogg extensions |
134 | 142 | ogg_extensions: [ 'ogg', 'ogv', 'oga' ], |
135 | | - video_extensions: [ 'avi', 'mov', 'mp4', 'mp2', 'mpeg', 'mpeg2', 'mpeg4', 'dv', 'wmv' ], |
136 | | - |
| 143 | + |
137 | 144 | passthrough: false, |
138 | 145 | sourceMode: 'file', |
139 | 146 | |
— | — | @@ -168,8 +175,7 @@ |
169 | 176 | this[i] = myBUI[i]; |
170 | 177 | } |
171 | 178 | } |
172 | | - } |
173 | | - |
| 179 | + } |
174 | 180 | if ( !this.selector ) { |
175 | 181 | mw.log('firefogg: missing selector '); |
176 | 182 | } |
— | — | @@ -289,47 +295,9 @@ |
290 | 296 | .click( function() { |
291 | 297 | _this.selectSourceFile(); |
292 | 298 | }); |
293 | | - } else { |
294 | | - // Firefogg disabled |
295 | | - // FIXME: move this elsewhere. None of this is related to binding. |
| 299 | + } |
| 300 | + |
296 | 301 | |
297 | | - // Show the "use latest Firefox" message if necessary |
298 | | - if ( !( $j.browser.mozilla && $j.browser.version >= '1.9.1' ) ) { |
299 | | - mw.log( 'show use latest::' + _this.target_use_latest_firefox ); |
300 | | - if ( _this.target_use_latest_firefox ) { |
301 | | - if ( _this.form_type == 'upload' ) |
302 | | - $j( _this.target_use_latest_firefox ) |
303 | | - .prepend( gM( 'fogg-for_improved_uploads' ) ); |
304 | | - |
305 | | - $j( _this.target_use_latest_firefox ).show(); |
306 | | - } |
307 | | - return; |
308 | | - } |
309 | | - |
310 | | - // Otherwise show the "install Firefogg" message |
311 | | - var upMsg = ( _this.form_type == 'upload' ) ? gM( 'fogg-for_improved_uploads' ) : ''; |
312 | | - var firefoggUrl = _this.getFirefoggInstallUrl(); |
313 | | - if( firefoggUrl ){ |
314 | | - $j( _this.target_please_install ) |
315 | | - .html( upMsg + |
316 | | - gM( 'fogg-please-install', [ |
317 | | - // Install link |
318 | | - $j('<a />') |
319 | | - .text( gM( "fogg-please-install-install-linktext" ) ) |
320 | | - .attr('href', firefoggUrl ), |
321 | | - |
322 | | - // About link |
323 | | - $j('<a />') |
324 | | - .text( gM( "fogg-please-install-about-linktext" ) ) |
325 | | - .attr( 'href', 'http://commons.wikimedia.org/wiki/Commons:Firefogg' ) |
326 | | - |
327 | | - ]) |
328 | | - ) |
329 | | - .css( 'padding', '10px' ) |
330 | | - .show(); |
331 | | - } |
332 | | - } |
333 | | - |
334 | 302 | // Set up the click handler for the "save local file" button |
335 | 303 | if( _this.target_btn_save_local_file ){ |
336 | 304 | $j( _this.target_btn_save_local_file ) |
— | — | @@ -339,7 +307,67 @@ |
340 | 308 | } ); |
341 | 309 | } |
342 | 310 | }, |
| 311 | + |
| 312 | + /** |
| 313 | + * Show the install firefogg msg |
| 314 | + */ |
| 315 | + showInstallFirefog: function(){ |
| 316 | + var _this = this; |
| 317 | + |
| 318 | + var upMsg = ( _this.form_type == 'upload' ) ? |
| 319 | + gM( 'fogg-for_improved_uploads' ) + ' ' : gM( 'fogg-not-installed') + ' '; |
| 320 | + |
| 321 | + // Show the "use latest Firefox" message if necessary |
| 322 | + mw.log( 'bv: ' + mw.versionIsAtLeast( '1.9.1', $j.browser.version ) ); |
| 323 | + if ( !( $j.browser.mozilla && mw.versionIsAtLeast( '1.9.1', $j.browser.version ) ) ) { |
| 324 | + mw.log( 'show use latest::' + _this.target_use_latest_firefox ); |
| 325 | + |
| 326 | + // Add the use_latest if not present: |
| 327 | + if ( !this.target_use_latest_firefox ) { |
| 328 | + $j( this.selector ).after( this.getControlHtml( 'target_use_latest_firefox' ) ); |
| 329 | + this.target_use_latest_firefox = this.selector + ' ~ .target_use_latest_firefox'; |
| 330 | + } |
| 331 | + |
| 332 | + // Add the upload msg if we are "uploading" |
| 333 | + if ( _this.form_type == 'upload' ){ |
| 334 | + $j( _this.target_use_latest_firefox ) |
| 335 | + .prepend( upMsg ); |
| 336 | + } |
| 337 | + |
| 338 | + $j( _this.target_use_latest_firefox ).show(); |
| 339 | + return ; |
| 340 | + } |
| 341 | + mw.log( 'should show install link'); |
343 | 342 | |
| 343 | + // Otherwise show the "install Firefogg" message |
| 344 | + var firefoggUrl = _this.getFirefoggInstallUrl(); |
| 345 | + if( firefoggUrl ){ |
| 346 | + |
| 347 | + // Add the target please install in not present: |
| 348 | + if ( !this.target_please_install ) { |
| 349 | + $j( this.selector ).after( this.getControlHtml( 'target_please_install' ) ); |
| 350 | + this.target_please_install = this.selector + ' ~ .target_please_install'; |
| 351 | + } |
| 352 | + // Add the install msg |
| 353 | + $j( _this.target_please_install ) |
| 354 | + .html( upMsg + |
| 355 | + gM( 'fogg-please-install', [ |
| 356 | + // Install link |
| 357 | + $j('<a />') |
| 358 | + .text( gM( "fogg-please-install-install-linktext" ) ) |
| 359 | + .attr('href', firefoggUrl ), |
| 360 | + |
| 361 | + // About link |
| 362 | + $j('<a />') |
| 363 | + .text( gM( "fogg-please-install-about-linktext" ) ) |
| 364 | + .attr( 'href', 'http://commons.wikimedia.org/wiki/Commons:Firefogg' ) |
| 365 | + ]) |
| 366 | + ) |
| 367 | + .css( 'padding', '10px' ) |
| 368 | + .show(); |
| 369 | + } |
| 370 | + }, |
| 371 | + |
344 | 372 | /* |
345 | 373 | * Get the URL for installing firefogg on the client OS |
346 | 374 | */ |
— | — | @@ -362,7 +390,7 @@ |
363 | 391 | getFirefogg: function() { |
364 | 392 | if ( this.have_firefogg == null ) { |
365 | 393 | if ( typeof( Firefogg ) != 'undefined' |
366 | | - && Firefogg().version >= this.min_firefogg_version ) |
| 394 | + && mw.versionIsAtLeast(this.min_firefogg_version, Firefogg().version ) ) |
367 | 395 | { |
368 | 396 | this.have_firefogg = true; |
369 | 397 | this.fogg = new Firefogg(); |
— | — | @@ -379,6 +407,7 @@ |
380 | 408 | */ |
381 | 409 | setupForm: function() { |
382 | 410 | mw.log( 'firefogg::setupForm::' ); |
| 411 | + |
383 | 412 | var _this = this; |
384 | 413 | // Set up the parent if we are in upload mode |
385 | 414 | if ( this.form_type == 'upload' ) { |
— | — | @@ -386,18 +415,26 @@ |
387 | 416 | } |
388 | 417 | |
389 | 418 | // If Firefogg is not available, just show a "please install" message |
390 | | - if ( ! _this.getFirefogg() ) { |
391 | | - if ( !this.target_please_install ) { |
392 | | - $j( this.selector ).after( this.getControlHtml( 'target_please_install' ) ); |
393 | | - this.target_please_install = this.selector + ' ~ .target_please_install'; |
394 | | - } |
395 | | - if ( !this.target_use_latest_firefox ) { |
396 | | - $j( this.selector ).after( this.getControlHtml( 'target_use_latest_firefox' ) ); |
397 | | - this.target_use_latest_firefox = this.selector + ' ~ .target_use_latest_firefox'; |
398 | | - } |
399 | | - // Show download link |
400 | | - this.bindControls(); |
| 419 | + if ( ! _this.getFirefogg() ) { |
| 420 | + // Show install firefogg msg |
| 421 | + this.showInstallFirefog(); |
401 | 422 | return; |
| 423 | + } |
| 424 | + |
| 425 | + // If uploading and firefogg is on show warning |
| 426 | + if ( this.form_type == 'upload' |
| 427 | + && typeof console != 'undefined' |
| 428 | + && console.firebug ){ |
| 429 | + $j( this.selector ).after( |
| 430 | + $j( '<div />' ) |
| 431 | + .addClass( 'ui-state-error ui-corner-all' ) |
| 432 | + .html( gM( 'fogg-warning-firebug' ) ) |
| 433 | + .css({ |
| 434 | + 'width' : 'auto', |
| 435 | + 'margin' : '5px', |
| 436 | + 'padding' : '5px' |
| 437 | + }) |
| 438 | + ); |
402 | 439 | } |
403 | 440 | |
404 | 441 | // Change the file browser to type text. We can't simply change the attribute so |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.FirefoggGUI.js |
— | — | @@ -321,10 +321,20 @@ |
322 | 322 | } |
323 | 323 | return this; |
324 | 324 | }, |
325 | | - |
| 325 | + |
| 326 | + /** |
| 327 | + * Setup the form |
| 328 | + */ |
326 | 329 | setupForm: function() { |
327 | 330 | //empty out the selector: |
328 | 331 | $j( this.selector ).empty(); |
| 332 | + // Check for firefogg: |
| 333 | + if ( ! this.getFirefogg() ) { |
| 334 | + // Show install firefogg msg |
| 335 | + this.showInstallFirefog(); |
| 336 | + $j('.target_please_install').css( { 'width': 400, 'margin':'auto' } ); |
| 337 | + return; |
| 338 | + } |
329 | 339 | this.createControls(); |
330 | 340 | this.bindControls(); |
331 | 341 | }, |
— | — | @@ -372,7 +382,7 @@ |
373 | 383 | }, |
374 | 384 | |
375 | 385 | // Custom advanced target rewrites |
376 | | - getControlHtml: function( target ) { |
| 386 | + getControlHtml: function( target ) { |
377 | 387 | switch ( target ) { |
378 | 388 | case 'target_btn_select_file': |
379 | 389 | case 'target_btn_select_new_file': |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -362,7 +362,7 @@ |
363 | 363 | } |
364 | 364 | |
365 | 365 | // Firefox gives 300x150 css values OR -1 if video has not loaded metadata yet: |
366 | | - // We check that and delay swaping in the player interface |
| 366 | + // We check that and delay swapping in the player interface |
367 | 367 | var waitForMeta = ( |
368 | 368 | ( |
369 | 369 | ( |
— | — | @@ -388,7 +388,7 @@ |
389 | 389 | ) ? true : false; |
390 | 390 | |
391 | 391 | // Load any skins we need then swap in the interface |
392 | | - mw.load( skinClassRequest, function(){ |
| 392 | + mw.load( skinClassRequest, function(){ |
393 | 393 | switch( element.tagName.toLowerCase() ) { |
394 | 394 | case 'playlist': |
395 | 395 | // Make sure we have the necessary playlist libs loaded: |
— | — | @@ -418,7 +418,7 @@ |
419 | 419 | ranPlayerSwapFlag = true; |
420 | 420 | var playerInterface = new mw.EmbedPlayer( element , attributes); |
421 | 421 | _this.swapEmbedPlayerElement( element, playerInterface ); |
422 | | - // Issue the checkPlayerSources call to the new player interface: |
| 422 | + // Issue the checkPlayerSources call to the new player interface: |
423 | 423 | $j( '#' + $j( element ).attr('id') ).get(0).checkPlayerSources(); |
424 | 424 | } |
425 | 425 | |
— | — | @@ -1214,8 +1214,9 @@ |
1215 | 1215 | } |
1216 | 1216 | |
1217 | 1217 | // Set the default skin if unset: |
1218 | | - if ( !this.skinName ) |
| 1218 | + if ( !this.skinName ){ |
1219 | 1219 | this.skinName = mw.getConfig( 'skinName' ); |
| 1220 | + } |
1220 | 1221 | |
1221 | 1222 | |
1222 | 1223 | // Make sure startOffset is cast as an float: |
— | — | @@ -1356,10 +1357,10 @@ |
1357 | 1358 | mw.log( 'set loading_external_data=false' ); |
1358 | 1359 | _this.loading_external_data = false; |
1359 | 1360 | |
1360 | | - _this.checkForTimedText(); |
| 1361 | + _this.checkForTimedText(); |
1361 | 1362 | } ); |
1362 | 1363 | }else{ |
1363 | | - _this.checkForTimedText(); |
| 1364 | + _this.checkForTimedText(); |
1364 | 1365 | } |
1365 | 1366 | }, |
1366 | 1367 | |
— | — | @@ -1407,6 +1408,7 @@ |
1408 | 1409 | */ |
1409 | 1410 | checkForTimedText: function( ){ |
1410 | 1411 | var _this = this; |
| 1412 | + mw.log( 'checkForTimedText: ' + this.id ); |
1411 | 1413 | // Check for timedText support |
1412 | 1414 | if( this.isTimedTextSupported() ){ |
1413 | 1415 | mw.load( 'TimedText', function(){ |
— | — | @@ -1427,6 +1429,7 @@ |
1428 | 1430 | * Sets load error if no source is playable |
1429 | 1431 | */ |
1430 | 1432 | setupSourcePlayer: function(){ |
| 1433 | + mw.log("setupSourcePlayer: " + this.id ); |
1431 | 1434 | // Autoseletct the media source |
1432 | 1435 | this.mediaElement.autoSelectSource(); |
1433 | 1436 | // Auto select player based on default order |
— | — | @@ -1472,7 +1475,7 @@ |
1473 | 1476 | * @param {Function} callback Function to be called once playback-system has been inherited |
1474 | 1477 | */ |
1475 | 1478 | inheritEmbedPlayer: function( callback ) { |
1476 | | - mw.log( "inheritEmbedPlayer:duration is: " + this.getDuration() ); |
| 1479 | + mw.log( "inheritEmbedPlayer:duration is: " + this.getDuration() + ' p: ' + this.id); |
1477 | 1480 | |
1478 | 1481 | // Clear out any non-base embedObj methods: |
1479 | 1482 | if ( this.instanceOf ) { |
— | — | @@ -1493,7 +1496,7 @@ |
1494 | 1497 | // Load the selected player |
1495 | 1498 | this.selected_player.load( function() { |
1496 | 1499 | // Get the selected player Interface |
1497 | | - eval( ' var playerInterface =' + _this.selected_player.library + 'Embed;' ); |
| 1500 | + var playerInterface = window[ _this.selected_player.library + 'Embed' ]; |
1498 | 1501 | |
1499 | 1502 | for ( var method in playerInterface ) { |
1500 | 1503 | if ( _this[method] && !_this['parent_' + method] ){ |
— | — | @@ -2243,7 +2246,7 @@ |
2244 | 2247 | |
2245 | 2248 | if ( this.play_button == true && this.controls == true ){ |
2246 | 2249 | $thumb.append( |
2247 | | - this.ctrlBuilder.getComponent( 'play-btn-large' ) |
| 2250 | + this.ctrlBuilder.getComponent( 'playButtonLarge' ) |
2248 | 2251 | ); |
2249 | 2252 | } |
2250 | 2253 | return $thumb; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/vlcEmbed.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | /* |
3 | | -* vlc embed based on: http://people.videolan.org/~damienf/plugin-0.8.6.html |
| 3 | +* VLC embed based on: http://people.videolan.org/~damienf/plugin-0.8.6.html |
4 | 4 | * javascript api: http://www.videolan.org/doc/play-howto/en/ch04.html |
5 | 5 | * assume version > 0.8.5.1 |
6 | 6 | */ |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | 'overlay':false |
23 | 23 | }, |
24 | 24 | |
25 | | - // The previus state of the player instance |
| 25 | + // The previous state of the player instance |
26 | 26 | prevState : 0, |
27 | 27 | |
28 | 28 | // Counter for waiting for vlc embed to be ready |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | */ |
34 | 34 | doEmbedHTML: function() { |
35 | 35 | var _this = this; |
36 | | - /*$j( this ).html( |
| 36 | + $j( this ).html( |
37 | 37 | '<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" ' + |
38 | 38 | 'codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" ' + |
39 | 39 | 'id="' + this.pid + '" events="True" height="' + this.height + '" width="' + this.width + '"' + |
— | — | @@ -50,14 +50,14 @@ |
51 | 51 | 'style="width:' + this.width + 'px;height:' + this.height + 'px;" ' + |
52 | 52 | '>' + |
53 | 53 | '</object>' |
54 | | - )*/ |
55 | | - $j( this ).html( |
| 54 | + ) |
| 55 | + /*$j( this ).html( |
56 | 56 | '<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" '+ |
57 | 57 | 'width="' + this.width +'" ' + |
58 | 58 | 'height="' + this.height + '" ' + |
59 | 59 | 'id="' + this.pid + '"> ' + |
60 | 60 | '</embed>' |
61 | | - ); |
| 61 | + );*/ |
62 | 62 | |
63 | 63 | |
64 | 64 | // give VLC 150ms to initialize before we start playback |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/loader.js |
— | — | @@ -142,21 +142,22 @@ |
143 | 143 | dependencyRequest[0].push( mw.valid_skins[n] + 'Config' ); |
144 | 144 | } |
145 | 145 | } |
146 | | - //Also add the text library to request set if any video element has text sources: |
147 | | - if(!addTimedTextReqFlag){ |
| 146 | + // If add timed text flag not already set check for itext, and sources |
| 147 | + if( !addTimedTextReqFlag ){ |
148 | 148 | if( $j( playerElement ).find( 'itext' ).length != 0 ){ |
149 | 149 | // Has an itext child include timed text request |
150 | 150 | addTimedTextReqFlag = true; |
151 | | - }else{ |
152 | | - $j( playerElement ).find( 'source' ).each(function(na, sourceElement){ |
153 | | - if( $j( sourceElement ).attr('type') == 'text/xml' && |
154 | | - $j( sourceElement ).attr('codec') == 'roe' |
155 | | - ){ |
156 | | - // Has a roe src |
157 | | - addTimedTextReqFlag = true; |
158 | | - } |
159 | | - }); |
| 151 | + // break out of the loop |
| 152 | + return false; |
160 | 153 | } |
| 154 | + // Check for ROE pointer or apiTitleKey |
| 155 | + if ( $j( playerElement ).attr('roe') |
| 156 | + || $j( playerElement ).attr( 'apiTitleKey' ) ) |
| 157 | + { |
| 158 | + addTimedTextReqFlag = true; |
| 159 | + // break out of the loop |
| 160 | + return false; |
| 161 | + } |
161 | 162 | } |
162 | 163 | } ); |
163 | 164 | |
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js |
— | — | @@ -1227,11 +1227,11 @@ |
1228 | 1228 | { |
1229 | 1229 | break; |
1230 | 1230 | } |
1231 | | - var func = mwLoadDoneCB[ requestName ].pop(); |
| 1231 | + var func = mwLoadDoneCB[ requestName ].pop(); |
1232 | 1232 | if( typeof func == 'function' ){ |
1233 | 1233 | func( requestName ); |
1234 | 1234 | }else{ |
1235 | | - mw.log('mwLoadDoneCB: error not a callback function'); |
| 1235 | + mw.log('mwLoadDoneCB: Error non callback function on stack'); |
1236 | 1236 | } |
1237 | 1237 | } |
1238 | 1238 | // Set the load request name to done |
— | — | @@ -1248,11 +1248,11 @@ |
1249 | 1249 | if( mwLoadDoneCB[ requestName ] == 'done' ){ |
1250 | 1250 | callback( requestName ) |
1251 | 1251 | } |
1252 | | - // Add it to the function queue |
1253 | | - if( ! mwLoadDoneCB[ requestName ] || mwLoadDoneCB[ requestName ].length ){ |
| 1252 | + // Setup the function queue if unset |
| 1253 | + if( ! mwLoadDoneCB[ requestName ] ){ |
1254 | 1254 | mwLoadDoneCB[ requestName ] = []; |
1255 | 1255 | } |
1256 | | - mwLoadDoneCB[ requestName ].push( callback ); |
| 1256 | + mwLoadDoneCB[ requestName ].push( callback ); |
1257 | 1257 | }; |
1258 | 1258 | |
1259 | 1259 | /** |
— | — | @@ -1687,8 +1687,8 @@ |
1688 | 1688 | /** |
1689 | 1689 | * Old IE and non-Firebug debug: ( commented out for now ) |
1690 | 1690 | */ |
1691 | | - |
1692 | 1691 | /* |
| 1692 | + |
1693 | 1693 | var log_elm = document.getElementById('mv_js_log'); |
1694 | 1694 | if(!log_elm){ |
1695 | 1695 | document.getElementsByTagName("body")[0].innerHTML = document.getElementsByTagName("body")[0].innerHTML + |
— | — | @@ -1702,6 +1702,7 @@ |
1703 | 1703 | log_elm.value+=string+"\n"; |
1704 | 1704 | } |
1705 | 1705 | */ |
| 1706 | + |
1706 | 1707 | } |
1707 | 1708 | } |
1708 | 1709 | |
— | — | @@ -2518,7 +2519,36 @@ |
2519 | 2520 | } |
2520 | 2521 | }); |
2521 | 2522 | } |
| 2523 | + |
2522 | 2524 | /** |
| 2525 | + * A version comparison utility function |
| 2526 | + * Handles version of types {Major}.{MinorN}.{Patch} |
| 2527 | + * |
| 2528 | + * Note this just handles version numbers not patch letters. |
| 2529 | + * |
| 2530 | + * @param {String} minVersion Minnium version needed |
| 2531 | + * @param {String} clientVersion Client version to be checked |
| 2532 | + |
| 2533 | + * @return |
| 2534 | + * true if the version is at least of minVersion |
| 2535 | + * false if the version is less than minVersion |
| 2536 | + */ |
| 2537 | + mw.versionIsAtLeast = function( minVersion, clientVersion ) { |
| 2538 | + var minVersionParts = minVersion.split('.') |
| 2539 | + var clientVersionParts = clientVersion.split('.'); |
| 2540 | + for( var i =0; i < minVersionParts.length; i++ ) { |
| 2541 | + if( parseInt( clientVersionParts[i] ) > parseInt( minVersionParts[i] ) ){ |
| 2542 | + return true; |
| 2543 | + } |
| 2544 | + if( parseInt( clientVersionParts[i] ) < parseInt( minVersionParts[i] ) ){ |
| 2545 | + return false; |
| 2546 | + } |
| 2547 | + } |
| 2548 | + // Same version: |
| 2549 | + return true; |
| 2550 | + } |
| 2551 | + |
| 2552 | + /** |
2523 | 2553 | * Utility jQuery bindings |
2524 | 2554 | * Setup after jQuery is available ). |
2525 | 2555 | */ |
Index: branches/js2-work/phase3/js/mwEmbed/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r97'; |
| 8 | +var mwRemoteVersion = 'r98'; |
9 | 9 | var mwUseScriptLoader = true; |
10 | 10 | |
11 | 11 | // Log the mwRemote version ( will determine what version of js we get ) |
Index: branches/js2-work/phase3/js/mwEmbed/tests/Player_Themable.html |
— | — | @@ -10,8 +10,8 @@ |
11 | 11 | <link rel="stylesheet" href="../skins/styles.css" type="text/css" media="screen" /> |
12 | 12 | <link rel="stylesheet" href="../skins/mvpcf/EmbedPlayer.css" type="text/css" media="screen" /> |
13 | 13 | <link rel="stylesheet" href="../skins/kskin/EmbedPlayer.css" type="text/css" media="screen" /> |
14 | | - --> |
15 | | - |
| 14 | + |
| 15 | + --> |
16 | 16 | <script type="text/javascript" src="../mwEmbed.js?debug=true"></script> |
17 | 17 | |
18 | 18 | |
— | — | @@ -24,6 +24,7 @@ |
25 | 25 | |
26 | 26 | <div style="width:450px;float:left"> |
27 | 27 | <video |
| 28 | + style="width:400px;height:300px" |
28 | 29 | src="http://localhost/lucky.ogv" |
29 | 30 | poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg" |
30 | 31 | apiTitleKey="Charles_Lindbergh_flight_to_Brussels.ogg" |
— | — | @@ -31,7 +32,7 @@ |
32 | 33 | durationHint="60" > |
33 | 34 | </video> |
34 | 35 | |
35 | | -<!-- |
| 36 | + |
36 | 37 | <video |
37 | 38 | style="width:208px;height:160px;float:left" |
38 | 39 | src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg" |
— | — | @@ -48,6 +49,7 @@ |
49 | 50 | <div style="width:450px;float:left"> |
50 | 51 | <video |
51 | 52 | class="kskin" |
| 53 | + style="width:400px;height:300px" |
52 | 54 | src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg" |
53 | 55 | apiTitleKey="Charles_Lindbergh_flight_to_Brussels.ogg" |
54 | 56 | apiProvider="commons" |
— | — | @@ -62,13 +64,13 @@ |
63 | 65 | poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg" |
64 | 66 | durationHint="60"> |
65 | 67 | </video> |
66 | | - --> |
| 68 | + |
67 | 69 | <b>(kskin) Source Code used:</b><br> |
68 | 70 | <textarea cols="50" rows="7"><video class="kskin" style="width:400px;height:288px" poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg" |
69 | 71 | src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg"></video></textarea> |
70 | 72 | </div> |
| 73 | + |
71 | 74 | |
72 | | - |
73 | 75 | </body> |
74 | 76 | </html> |
75 | 77 | |
Index: branches/js2-work/phase3/js/mwEmbed/includes/languages/mwEmbed.i18n.php |
— | — | @@ -15,7 +15,6 @@ |
16 | 16 | * js file: /skins/kskin/kskinConfig.js |
17 | 17 | */ |
18 | 18 | 'mwe-credit-title' => 'Title: $1', |
19 | | - 'mwe-kaltura-platform-title' => 'Kaltura open source video platform', |
20 | 19 | |
21 | 20 | /* |
22 | 21 | * js file: /modules/Sequencer/mw.TimedEffectsEdit.js |
— | — | @@ -163,6 +162,7 @@ |
164 | 163 | 'mwe-no-player' => 'No player available for $1', |
165 | 164 | 'mwe-share_this_video' => 'Share this video', |
166 | 165 | 'mwe-video_credits' => 'Video credits', |
| 166 | + 'mwe-kaltura-platform-title' => 'Kaltura open source video platform', |
167 | 167 | 'mwe-menu_btn' => 'Menu', |
168 | 168 | 'mwe-close_btn' => 'Close', |
169 | 169 | 'mwe-ogg-player-vlc-player' => 'VLC player', |
— | — | @@ -397,7 +397,8 @@ |
398 | 398 | 'fogg-select_new_file' => 'Select new file', |
399 | 399 | 'fogg-select_url' => 'Select URL', |
400 | 400 | 'fogg-check_for_firefogg' => 'Checking for Firefogg...', |
401 | | - 'fogg-installed' => 'Firefogg is installed', |
| 401 | + 'fogg-installed' => 'Firefogg is installed,', |
| 402 | + 'fogg-not-installed' => 'Firefogg is not installed', |
402 | 403 | 'fogg-for_improved_uploads' => 'For improved uploads:', |
403 | 404 | 'fogg-please-install' => '$1. More $2', |
404 | 405 | 'fogg-please-install-install-linktext' => 'Install firefogg', |
— | — | @@ -408,6 +409,7 @@ |
409 | 410 | 'fogg-badtoken' => 'Token is not valid', |
410 | 411 | 'fogg-preview' => 'Preview video', |
411 | 412 | 'fogg-hidepreview' => 'Hide preview', |
| 413 | + 'fogg-warning-firebug' => '<b>Firebug</b> can cause conflicts with <i>Firefogg</i>. Please disable <b>Firebug</b> for this page.', |
412 | 414 | |
413 | 415 | /* |
414 | 416 | * js file: /modules/AddMedia/jquery.dragDropFile.js |