text: import{html,PolymerElement}from"../../../@polymer/polymer/polymer-element.js";import{A11yMediaBehaviors}from"./a11y-media-behaviors.js";export{A11yMediaPlayerBehaviors};class A11yMediaPlayerBehaviors extends A11yMediaBehaviors{static get properties(){return{allowConcurrent:{type:Boolean,value:!1},audioNoThumb:{type:Boolean,computed:"_getAudioNoThumb(audioOnly,thumbnailSrc)"},audioOnly:{type:Boolean,value:!1,reflectToAttribute:!0},compactControls:{type:Boolean,computed:"_getCompactControls(responsiveSize)"},crossorigin:{type:String,value:null,reflectToAttribute:!0},darkTranscript:{type:Boolean,value:!1},disableFullscreen:{type:Boolean,value:!1},disableInteractive:{type:Boolean,value:!1},disableSearch:{type:Boolean,value:!1},disableScroll:{type:Boolean,value:!1},disablePrintButton:{type:Boolean,value:!1},flexLayout:{type:Boolean,computed:"_isFlexLayout(standAlone,hideTranscript,audioNoThumb,stackedLayout)",reflectToAttribute:!0},fullscreen:{type:Boolean,value:!1},fullscreenButton:{type:Boolean,computed:"_getFullscreenButton(disableFullscreen)",notify:!0},hasCaptions:{type:Boolean,value:!1},hasTranscript:{type:Boolean,value:!1},height:{type:String,value:null},hideElapsedTime:{type:Boolean,value:!1},hideTranscript:{type:Boolean,value:!1,reflectToAttribute:!0},hideTimestamps:{type:Boolean,value:!1},media:{type:Object,value:null},mediaLang:{type:String,value:"en"},mediaTitle:{type:String,value:""},muteUnmute:{type:Object,computed:"_getMuteUnmute(muted,localization)"},playing:{type:Boolean,value:!1},playPause:{type:Object,computed:"_getPlayPause(playing,localization)"},responsiveSize:{type:String,notify:!0,reflectToAttribute:!0},search:{type:Object,value:null},showCustomCaptions:{type:Boolean,computed:"_showCustomCaptions(isYoutube,audioOnly,hasCaptions,cc)"},stackedLayout:{type:Boolean,value:!1},standAlone:{type:Boolean,value:!1,reflectToAttribute:!0},target:{type:Object,value:null},thumbnailSrc:{type:String,value:null,reflectToAttribute:!0},width:{type:String,value:null}}}static get behaviors(){return[A11yMediaBehaviors]}static get tag(){return"a11y-media-player-behaviors"}_getAudioNoThumb(audioOnly,thumbnailSrc){return audioOnly&&(null===thumbnailSrc||thumbnailSrc===void 0)}_getFullscreenButton(disableFullscreen){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||disableFullscreen){return!1}else{return!0}}_getCompactControls(responsiveSize){return this._testAttribute(responsiveSize,"xs")||this._testAttribute(responsiveSize,"sm")}_getPlayPause(playing,localization){return playing?{label:this._getLocal(localization,"pause","label"),icon:this._getLocal(localization,"pause","icon"),action:"pause"}:{label:this._getLocal(localization,"play","label"),icon:this._getLocal(localization,"play","icon"),action:"play"}}_getMuteUnmute(muted,localization){return muted?{label:this._getLocal(localization,"unmute","label"),icon:this._getLocal(localization,"unmute","icon"),action:"unmute"}:{label:this._getLocal(localization,"mute","label"),icon:this._getLocal(localization,"mute","icon"),action:"mute"}}_showCustomCaptions(isYoutube,audioOnly,hasCaptions,cc){return(isYoutube||audioOnly)&&hasCaptions&&cc}_hasCustomCaptions(isYoutube,audioOnly,hasCaptions){return(isYoutube||audioOnly)&&hasCaptions}_isFlexLayout(standAlone,hideTranscript,audioNoThumb,stackedLayout){return!standAlone&&!hideTranscript&&!audioNoThumb&&!stackedLayout}}window.customElements.define(A11yMediaPlayerBehaviors.tag,A11yMediaPlayerBehaviors);