The Container
component is the container element for the Player. It wraps all other elements and acts as an aspect ratio container by default.
Container
component acts as the container div element for the Player,
using either
@radix-ui/react-aspect-ratio
or a standard div element. It selectively renders one of these based on the
presence of an aspectRatio
prop. We show above how to disable the aspect
ratio element.data-livepeer-aspect-ratio
or data-livepeer-wrapper
data-livepeer-aspect-ratio
) or a regular div (with
data-livepeer-wrapper
).
aspectRatio
is set to null
on the Root component, then it will be a
regular div wrapper with position: relative
.data-fullscreen
"true"
: The content is in fullscreen mode."false"
: The content is not in fullscreen mode.data-playing
"true"
: The content is playing."false"
: The content is not playing.data-can-play
"true"
: The content can be played."false"
: The content cannot be played due to some restrictions or lack of
data.data-playback-rate
"normal"
: The playback is at normal speed."fast"
: The playback is at a speed faster than normal."slow"
: The playback is at a speed slower than normal."constant"
: The playback rate is constant (neither fast nor slow).data-error
"true"
: There is an error in the content."false"
: There are no errors in the content.data-loading
"true"
: The content is loading."false"
: The content is not loading.data-live
"true"
: The content is live."false"
: The content is not live.data-has-played
"true"
: The content has been played at least once."false"
: The content has not been played yet.data-controls-hidden
"true"
: The controls are hidden."false"
: The controls are visible.data-picture-in-picture
"true"
: The picture-in-picture mode is active."false"
: The picture-in-picture mode is not active.data-video-quality
videoQuality
value
from the state. It can be a string indicating the quality level (e.g., "720p"
,
"1080p"
).