/** * Skin js allows you to override contrlBuilder html/class output */ ( function( mw, $ ) {"use strict"; mw.PlayerSkinKskin = { // The parent class for all kskin css: playerClass: 'k-player', // Display time string length longTimeDisp: false, // Default control bar height height: 20, // Volume control layout is horizontal volumeLayout: 'horizontal', // Skin "kskin" is specific for wikimedia we have an // api Title key so the "credits" menu item can be showed. supportedMenuItems: { 'credits': true }, // Stores the current menu item id currentMenuItem: null, // Extends base components with kskin specific options: components: { 'pause': { 'w': 28 }, 'volumeControl': { 'w': 40 }, 'playButtonLarge' : { 'h' : 55 }, 'options': { 'w': 52, 'o': function( ctrlObj ) { return $( '
' ) .attr( 'title', mw.msg( 'mwe-embedplayer-player_options' ) ) .addClass( "ui-state-default ui-corner-bl rButton k-options" ) .append( $( '' ) .text( mw.msg( 'mwe-embedplayer-menu_btn' ) ) ); } }, // No attributionButton component for kSkin ( its integrated into the credits screen ) 'attributionButton' : false, // Time display: 'timeDisplay': { 'w': 52 }, 'optionsMenu': { 'w' : 0, 'o' : function( ctrlObj ) { var embedPlayer = ctrlObj.embedPlayer; var $menuOverlay = $( '
') .addClass( 'overlay-win k-menu ui-widget-content' ) .css( { 'width' : '100%', 'position': 'absolute', 'top' : '0px', 'bottom' : ( ctrlObj.getHeight() + 2 ) + 'px' } ); // Note safari can't display video overlays with text: // see bug https://bugs.webkit.org/show_bug.cgi?id=48379 var userAgent = navigator.userAgent.toLowerCase(); if( userAgent.indexOf('safari') != -1 ){ $menuOverlay.css('opacity', '0.9'); } // Setup menu offset ( if player height < getOverlayHeight ) // This displays the menu outside of the player on small embeds if ( embedPlayer.getPlayerHeight() < ctrlObj.getOverlayHeight() ) { var topPos = ( ctrlObj.isOverlayControls() ) ? embedPlayer.getPlayerHeight() : embedPlayer.getPlayerHeight() + ctrlObj.getHeight(); if( embedPlayer.isAudio() ){ topPos = ctrlObj.embedPlayer.getInterface().height(); } $menuOverlay.css( { 'top' : topPos + 'px', 'bottom' : null, 'width' : ctrlObj.getOverlayWidth(), 'height' : ctrlObj.getOverlayHeight() + 'px' } ); // Special common overflow hack for thumbnail display of player $( embedPlayer ).parents( '.thumbinner' ).css( 'overflow', 'visible' ); } var $menuBar = $( '