OptionalautoplayOptionalchildrenUse a named slot instead, such as:
OptionalconfigurationOptionaldeviceOptionaldvrOptionalfluidWhether to automatically adjust the player's height to fit the video's aspect ratio.
OptionalloadingA slot for the loading announcement, shown before the publication is loaded.
OptionalmutedWhether the player's audio is muted.
This reflects player.muted.
OptionalofflineA slot for the offline announcement, shown when all publications are offline.
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.
Can be used to show/hide certain UI controls specific for livestreams, such as
a <theoplayer-live-button>.
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.