-
public final class LivestreamPlayerKt
-
-
Method Summary
Modifier and Type Method Description final static UnitLivestreamPlayer(Modifier modifier, Call call, Boolean enablePausing, Function1<Boolean, Unit> onPausedPlayer, Function2<BoxScope, Call, Unit> backstageContent, VideoRendererConfig videoRendererConfig, Flow<ParticipantState.Video> livestreamFlow, Function2<BoxScope, Call, Unit> rendererContent, Function2<BoxScope, Call, Unit> overlayContent, Function2<BoxScope, Call, Unit> liveStreamEndedContent, Function2<BoxScope, Call, Unit> liveStreamHostVideoNotAvailableContent, Function3<BoxScope, Call, Function0<Unit>, Unit> liveStreamErrorContent, Function0<Unit> onRetryJoin)Renders a livestream video player UI based on the current state of the provided call. -
-
Method Detail
-
LivestreamPlayer
@Composable() final static Unit LivestreamPlayer(Modifier modifier, Call call, Boolean enablePausing, Function1<Boolean, Unit> onPausedPlayer, Function2<BoxScope, Call, Unit> backstageContent, VideoRendererConfig videoRendererConfig, Flow<ParticipantState.Video> livestreamFlow, Function2<BoxScope, Call, Unit> rendererContent, Function2<BoxScope, Call, Unit> overlayContent, Function2<BoxScope, Call, Unit> liveStreamEndedContent, Function2<BoxScope, Call, Unit> liveStreamHostVideoNotAvailableContent, Function3<BoxScope, Call, Function0<Unit>, Unit> liveStreamErrorContent, Function0<Unit> onRetryJoin)
Renders a livestream video player UI based on the current state of the provided call.
This composable adapts its content based on the livestreamState, displaying backstage, live, ended, or error views accordingly. It supports pause/resume controls, retry logic, and customizable UI slots for various livestream stages.
- Parameters:
modifier- Modifier used to style the livestream container.call- The call instance providing state and media tracks for rendering.enablePausing- Whether the livestream video can be paused and resumed by the viewer.onPausedPlayer- Callback to observe pause/resume interactions.backstageContent- UI shown when the host hasn't started the livestream.videoRendererConfig- Configuration for how the video is rendered internally.livestreamFlow- A Flow emitting the video track of the host or primary speaker.rendererContent- UI responsible for rendering the host’s video stream.overlayContent- UI layered on top of the video for participant counts, controls, etc.liveStreamEndedContent- UI shown when the livestream has ended.liveStreamHostVideoNotAvailableContent- UI shown when the host has no video available.liveStreamErrorContent- UI shown in case of an error joining or rendering the livestream.onRetryJoin- Callback triggered when retrying to join the livestream after a failure.
-
-
-
-