r73336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73335‎ | r73336 | r73337 >
Date:16:39, 19 September 2010
Author:dale
Status:deferred
Tags:
Comment:
* add 'for best playback' note to google chrome while http://code.google.com/p/chromium/issues/detail?id=56180
is outstanding
Modified paths:
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/mw.PlayerControlBuilder.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/mw.PlayerControlBuilder.js
@@ -557,7 +557,7 @@
558558 // Add recommend firefox if we have non-native playback:
559559 if ( _this.checkNativeWarning( ) ) {
560560 _this.doWarningBindinng(
561 - 'showNativePlayerWarning',
 561+ 'EmbedPlayer.ShowNativeWarning',
562562 gM( 'mwe-embedplayer-for_best_experience' )
563563 );
564564 }
@@ -673,17 +673,22 @@
674674 // If the resolution is too small don't display the warning
675675 if( this.embedPlayer.getPlayerHeight() < 199 ){
676676 return false;
677 - }
678 -
 677+ }
679678 // See if we have we have ogg support
680679 var supportingPlayers = mw.EmbedTypes.players.getMIMETypePlayers( 'video/ogg' );
681680 for ( var i = 0; i < supportingPlayers.length; i++ ) {
682 - if ( supportingPlayers[i].id == 'oggNative' ) {
 681+
 682+ if ( supportingPlayers[i].id == 'oggNative'
 683+ &&
 684+ // xxx google chrome has broken oggNative playback:
 685+ // http://code.google.com/p/chromium/issues/detail?id=56180
 686+ ! /chrome/.test(navigator.userAgent.toLowerCase() )
 687+ ){
683688 return false;
684689 }
685690 }
686691
687 - // Check for h264 and or flash/flv source and playback support and dont' show wanring
 692+ // Check for h264 and or flash/flv source and playback support and don't show warning
688693 if(
689694 ( mw.EmbedTypes.players.getMIMETypePlayers( 'video/h264' ).length
690695 && this.embedPlayer.mediaElement.getSources( 'video/h264' ).length )
@@ -713,9 +718,8 @@
714719
715720 $j( embedPlayer ).hoverIntent({
716721 'timeout': 2000,
717 - 'over': function() {
718 - if ( $j( '#warningOverlay_' + embedPlayer.id ).length == 0 ) {
719 - var toppos = ( embedPlayer.instanceOf == 'mvPlayList' ) ? 25 : 10;
 722+ 'over': function() {
 723+ if ( $j( '#warningOverlay_' + embedPlayer.id ).length == 0 ) {
720724
721725 $j( this ).append(
722726 $j('<div />')
@@ -728,7 +732,7 @@
729733 'display' : 'none',
730734 'background' : '#FFF',
731735 'color' : '#111',
732 - 'top' : toppos + 'px',
 736+ 'top' : '10px',
733737 'left' : '10px',
734738 'right' : '10px',
735739 'padding' : '4px'

Status & tagging log