http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72943
Revision: 72943 Author: dale Date: 2010-09-13 23:49:41 +0000 (Mon, 13 Sep 2010) Log Message: ----------- * better center on loading spinner * msg key consistency in embedPlayer Modified Paths: -------------- branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerHtml.js branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js branches/MwEmbedStandAlone/mwEmbed.js Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js =================================================================== --- branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js 2010-09-13 23:41:35 UTC (rev 72942) +++ branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js 2010-09-13 23:49:41 UTC (rev 72943) @@ -36,8 +36,8 @@ "mwe-embedplayer-download_text" : "Download timed text", "mwe-embedplayer-download" : "Download", "mwe-embedplayer-share" : "Share", - 'mwe-embedplayer-about-library' : 'About kaltura player', - "mwe-embedplayer-about-library-desc" : 'Kaltura\'s HTML5 Media Library enables you to take advantage of the html5 <video> and <audio> tags today with a consistent player interface across all major browsers. <br> <br> [$1 More about the kaltura player library].', + "mwe-embedplayer-about-library" : "About kaltura player", + "mwe-embedplayer-about-library-desc" : "Kaltura's HTML5 Media Library enables you to take advantage of the html5 <video> and <audio> tags today with a consistent player interface across all major browsers. <br> <br> [$1 More about the kaltura player library]", "mwe-embedplayer-credits" : "Credits", "mwe-embedplayer-clip_linkback" : "Clip source page", "mwe-embedplayer-choose_player" : "Choose video player", @@ -615,6 +615,7 @@ $j( targetElement ) .attr('id', playerInterface.pid ) .addClass( 'nativeEmbedPlayerPid' ) + .show() .after( $j( swapPlayerElement ).css('display', 'none') ) @@ -902,6 +903,12 @@ case 'audio/ogg' : return gM( 'mwe-embedplayer-video-audio' ); break; + case 'video/mpeg' : + return 'MPEG video'; // FIXME: i18n + break; + case 'video/x-msvideo' : + return 'AVI video'; // FIXME: i18n + break; } // Return tilte based on file name: @@ -992,6 +999,15 @@ case '.xml': return 'text/xml'; break; + case '.avi': + return 'video/x-msvideo'; + break; + case '.mpg': + return 'video/mpeg'; + break; + case '.mpeg': + return 'video/mpeg'; + break; } } }; @@ -2415,8 +2431,7 @@ // Check if we need to refresh mobile safari var mobileSafairNeedsRefresh = false; - - + // Unhide the original video element if( !$j( '#' + this.pid ).hasClass('PlayerThemer') ){ $j( '#' + this.pid ) @@ -2435,7 +2450,7 @@ var source = this.mediaElement.getSources( 'video/h264' )[0]; if( source && ! source.src ){ mw.log( 'Error: should have caught no playable sources for mobile safari earlier' ); - } + } var videoAttribues = { 'id' : _this.pid, @@ -2443,6 +2458,7 @@ 'src' : source.src, 'controls' : 'true' } + if( this.loop ){ videoAttribues[ 'loop' ] = 'true'; } @@ -3299,7 +3315,7 @@ var webmNativePlayer = new mediaPlayer( 'webmNative', ['video/webm'], 'Native' ); // VLC player -var vlcMineList = ['video/ogg', 'audio/ogg', 'application/ogg', 'video/x-flv', 'video/mp4', 'video/h264']; +var vlcMineList = ['video/ogg', 'audio/ogg', 'application/ogg', 'video/x-flv', 'video/mp4', 'video/h264', 'video/x-msvideo', 'video/mpeg']; var vlcPlayer = new mediaPlayer( 'vlc-player', vlcMineList, 'Vlc' ); // Generic plugin @@ -3345,6 +3361,8 @@ this.defaultPlayers['application/ogg'] = ['Native', 'Vlc', 'Java', 'Generic']; this.defaultPlayers['audio/ogg'] = ['Native', 'Vlc', 'Java' ]; this.defaultPlayers['video/mp4'] = ['Vlc']; + this.defaultPlayers['video/mpeg'] = ['Vlc']; + this.defaultPlayers['video/x-msvideo'] = ['Vlc']; this.defaultPlayers['text/html'] = ['Html']; this.defaultPlayers['image/jpeg'] = ['Html']; @@ -3621,6 +3639,11 @@ continue; } + if ( (type == 'video/mpeg' || type=='video/x-msvideo') && + pluginName.toLowerCase() == 'vlc multimedia plugin' ) { + this.players.addPlayer( vlcMozillaPlayer ); + } + if ( type == 'application/ogg' ) { if ( pluginName.toLowerCase() == 'vlc multimedia plugin' ) { this.players.addPlayer( vlcMozillaPlayer ); Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerHtml.js =================================================================== --- branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerHtml.js 2010-09-13 23:41:35 UTC (rev 72942) +++ branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerHtml.js 2010-09-13 23:49:41 UTC (rev 72943) @@ -22,7 +22,7 @@ 'timeDisplay':true, 'volumeControl':true, - 'overlays':true, + 'overlays':true }, // If the player is "ready to play" Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js =================================================================== --- branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js 2010-09-13 23:41:35 UTC (rev 72942) +++ branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js 2010-09-13 23:49:41 UTC (rev 72943) @@ -88,7 +88,7 @@ $menuBar = $j( '<ul />' ) .addClass( 'k-menu-bar' ); - // dont include about player menu item ( @@ should be moved to a init function ) + // dont include about player menu item ( FIXME should be moved to a init function ) delete ctrlObj.supportedMenuItems['aboutPlayerLibrary']; // Output menu item containers: Modified: branches/MwEmbedStandAlone/mwEmbed.js =================================================================== --- branches/MwEmbedStandAlone/mwEmbed.js 2010-09-13 23:41:35 UTC (rev 72942) +++ branches/MwEmbedStandAlone/mwEmbed.js 2010-09-13 23:49:41 UTC (rev 72943) @@ -2356,11 +2356,11 @@ $.fn.getAbsoluteOverlaySpinner = function(){ var pos = $j( this ).offset(); var posLeft = ( $j( this ).width() ) ? - parseInt( pos.left + ( .4 * $j( this ).width() ) ) : + parseInt( pos.left + ( .5 * $j( this ).width() ) -16 ) : pos.left + 30; var posTop = ( $j( this ).height() ) ? - parseInt( pos.top + ( .4 * $j( this ).height() ) ) : + parseInt( pos.top + ( .5 * $j( this ).height() ) -16 ) : pos.top + 30; var $spinner = $j('<div />') _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs