Buttons
PIP Button
This component is used to enter and exit picture-in-picture mode.
Usage
The <media-pip-button>
component will toggle the picture-in-picture (PIP) mode of media as it's pressed by dispatching a media-enter-pip-request
, and media-exit-pip-request
event to the player.
The data-hidden
attribute will be present on this element in the event PIP cannot be requested (not supported by environment or provider). The button's display
property will be set to none
, so it'll be removed from the layout; therefore, you should account for the button not being displayed in your design.
Key Shortcuts
Keyboard shortcuts can be specified either through the global key shortcuts config, or on the component like so:
👉 See the aria-keyshortcuts
docs for more information.
Custom Icons
Here's an example containing a custom enter and exit icon:
Tooltips
Tooltips can be provided like so:
Styling
You can override the default styles with CSS like so:
Focus
Tailwind
The following is a headless example using Tailwind:
Tooltips
The following extends the example above with tooltips: