<media-airplay-button>
The <media-airplay-button> component is used to bring up the AirPlay menu and select AirPlay playback. The behavior of the <media-airplay-button> will update automatically based on the availability of AirPlay support.
The button will display the contents of the icon slot, if provided.
NOTE: AirPlay is only available in Safari browsers.
Default usage
Section titled Default usageCustomize icons
Section titled Customize iconsYou can modify the contents of the <media-airplay-button> component using slots.
This is useful if you’d like to use your own custom AirPlay button instead of the default one provided by media-chrome.
Here’s an example of how you can replace the default icon with the string “AIRPLAY”.
Styling with attributes
Section titled Styling with attributesThe <media-airplay-button> doesn’t expose any configuration attributes.
However, it will be updated with Media UI Attributes any time the selected caption or subtitle changes.
You can use these attributes to style the button. For example, if airplay is unavailable, hide the button:
media-airplay-button[mediaairplayunavailable] {
  display: none;
}Reference
Section titled ReferenceSlots
Section titled Slots| Name | Description | 
|---|---|
| enter | An element shown when the media is not in AirPlay mode and pressing the button will open the AirPlay menu. | 
| exit | An element shown when the media is in AirPlay mode and pressing the button will open the AirPlay menu. | 
| icon | The element shown for the AirPlay button’s display. | 
Attributes
Section titled Attributes| Name | Type | Description | 
|---|---|---|
| disabled | boolean | The Boolean disabled attribute makes the element not mutable or focusable. | 
| mediacontroller | string | The element `id` of the media controller to connect to (if not nested within). | 
| tooltipplacement | ('top'|'right'|'bottom'|'left'|'none') | The placement of the tooltip, defaults to "top" | 
| notooltip | boolean | Hides the tooltip if this attribute is present | 
Media UI Attributes
Section titled Media UI Attributes
The media UI attributes will be set automatically by the controller if they are
      connected via nesting or the mediacontroller attribute.
      Only set these attributes manually if you know what you're doing.
| Name | Type | Description | 
|---|---|---|
| mediaairplayunavailable | (unavailable|unsupported) | Set if AirPlay is unavailable. | 
| mediaisairplaying | boolean | Present if the media is airplaying. | 
CSS Variables
Section titled CSS Variables| Name | Default | Description | 
|---|---|---|
| --media-airplay-button-display | inline-flex | displayproperty of button. | 
| --media-primary-color | rgb(238 238 238) | Default color of text and icon. | 
| --media-secondary-color | rgb(20 20 30 / .7) | Default color of button background. | 
| --media-text-color | var(--media-primary-color, rgb(238 238 238)) | colorof button text. | 
| --media-icon-color | var(--media-primary-color, rgb(238 238 238)) | fillcolor of button icon. | 
| --media-control-display | displayproperty of control. | |
| --media-control-background | var(--media-secondary-color, rgb(20 20 30 / .7)) | backgroundof control. | 
| --media-control-hover-background | rgba(50 50 70 / .7) | backgroundof control hover state. | 
| --media-control-padding | 10px | paddingof control. | 
| --media-control-height | 24px | line-heightof control. | 
| --media-font | var(--media-font-weight, bold) var(--media-font-size, 14px) / var(--media-text-content-height, var(--media-control-height, 24px)) var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif) | fontshorthand property. | 
| --media-font-weight | bold | font-weightproperty. | 
| --media-font-family | helvetica neue, segoe ui, roboto, arial, sans-serif | font-familyproperty. | 
| --media-font-size | 14px | font-sizeproperty. | 
| --media-text-content-height | var(--media-control-height, 24px) | line-heightof button text. | 
| --media-button-icon-width | widthof button icon. | |
| --media-button-icon-height | var(--media-control-height, 24px) | heightof button icon. | 
| --media-button-icon-transform | transformof button icon. | |
| --media-button-icon-transition | transitionof button icon. |