OptionalautoplayOptionalbottomA slot for extra UI controls in the bottom control bar.
OptionalcenteredA slot to replace the controls in the center of the player, layered on top of other controls.
OptionalchildrenUse a named slot instead, such as:
OptionalconfigurationOptionaldeviceOptionaldvrOptionalerrorA slot for an error display, to show when the player encounters a fatal error. By default, this shows an ErrorDisplay.
OptionalfluidWhether to automatically adjust the player's height to fit the video's aspect ratio.
OptionalmenuA slot for extra menus (see Menu).
OptionalmutedWhether the player's audio is muted.
OptionalonCalled when the backing player is created.
OptionalplayerOptionalsourceOptionalstreamThe stream type, either "vod", "live" or "dvr".
If you know in advance that the source will be a livestream, you can set this property to avoid a screen flicker when the player switches between its VOD-specific and live-only controls.
OptionaltitleA slot for the stream's title in the top control bar.
OptionaltopA slot for extra UI controls in the top control bar.
OptionaluserOptionaluserOptionalconnectedInvoked when the component is added to the document's DOM.
In connectedCallback() you should setup tasks that should only occur when
the element is connected to the document. The most common of these is
adding event listeners to nodes external to the element, like a keydown
event handler added to the window.
connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}
Typically, anything done in connectedCallback() should be undone when the
element is disconnected, in disconnectedCallback().
OptionaldisconnectedInvoked when the component is removed from the document's DOM.
This callback is the main signal to the element that it may no longer be
used. disconnectedCallback() should ensure that nothing is holding a
reference to the element (such as event listeners added to nodes external
to the element), so that it is free to be garbage collected.
disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}
An element may be re-connected after being disconnected.
Whether the player should attempt to automatically start playback.