The Broadcast component provides an easy way to livestream video or audio.
Broadcast
component provides an easy way to livestream video or audio,
including camera and screen sources.
It automatically handles WebRTC connection and allows extremely low latency
livestreaming.
useCreateStream
, and
the streamKey
was passed to the Broadcast component.streamKey
passed to the Broadcast
component is used to connect to the
WebRTC ingest URL.
title
for the content. This is highly recommended, since it is used for
accessibility labels in the Broadcast. If you
do not want to show the title visually, see showTitle
.
MediaTrackConstraints
which are passed to the browser to limit the sources available to the user.
16to9
.
contain
. cover
is usually used when there is a
guarantee that the aspectRatio
matches the content displayed in the Broadcast.
false
. See children for an example on how to use the
underlying <PictureInPictureButton />
.
LivepeerConfig
for any global app styles,
and the theme
prop to override those styles on a per-Broadcast basis.
Broadcast
default controls
for more details on how the ControlsContainer
component is used.
This can be used alongside renderChildrenOutsideContainer
to render the
children outside of the aspect ratio container. This is used for custom
controls, so children of the Player can use useMediaController
without any
parent elements.
ref
passed to the underlying media element. Useful when integrating with third party
tools, or when access to the underlying video element is needed (usually it
isn’t!). Simple refs are not supported - only callback refs (which will be
called when the underlying media element is set/updated on initial render).
playbackStatusSelector
to limit state updates. This allows developers
to use the underlying state of the Broadcast component in their UI.