The AudioEnabledTrigger
and AudioEnabledIndicator
components provide controls and visual cues for audio input state during media broadcast.
AudioEnabledTrigger
and AudioEnabledIndicator
integrate together to form
the typical microphone on/off interaction for broadcasts. They do not have to
be used together and can combine with other components.matcher
patterngetUserMedia
browser API used to get the audio is only available in
secure contexts (HTTPS).AudioEnabledTrigger
AudioEnabledIndicator
forceMount
matcher
AudioEnabledIndicator
should be visible. It can be a boolean that corresponds
directly to the audio state or a function that provides custom logic for
visibility determination based on the audio state.
AudioEnabledTrigger
data-livepeer-controls-audio-enabled-trigger
data-enabled
"true"
when audio is enabled and "false"
when it is disabled.
AudioEnabledIndicator
data-livepeer-controls-audio-enabled-indicator
data-enabled
"true"
when audio is enabled and "false"
when
it is disabled.
data-visible
"true"
meaning it’s
currently visible based on the matcher
or audio state and "false"
denoting
it’s not visible.
This is often used for dynamically applying enter/exit CSS animations.