-
public final class ClosedCaptionManagerManages the lifecycle, state, and configuration of closed captions for a video call.
The ClosedCaptionManager is responsible for handling caption updates, maintaining caption states, auto-removing and deduplicating captions based on the provided ClosedCaptionsSettings and ClosedCaptionDeduplicationConfig. It ensures thread-safe operations using a Mutex and manages jobs for scheduled caption removal using CoroutineScope.
-
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<List<CallClosedCaption>>closedCaptionsprivate final StateFlow<TranscriptionSettingsResponse.ClosedCaptionMode>ccModeprivate final StateFlow<Boolean>closedCaptioning
-
Constructor Summary
Constructors Constructor Description ClosedCaptionManager(ClosedCaptionsSettings closedCaptionsSettings, ClosedCaptionDeduplicationConfig closedCaptionDeduplicationConfig)
-
Method Summary
Modifier and Type Method Description final StateFlow<List<CallClosedCaption>>getClosedCaptions()final StateFlow<TranscriptionSettingsResponse.ClosedCaptionMode>getCcMode()final StateFlow<Boolean>getClosedCaptioning()final UnithandleEvent(VideoEvent videoEvent)Processes incoming events related to closed captions, such as new captions being added, captioning starting, or captioning ending. -
-
Constructor Detail
-
ClosedCaptionManager
ClosedCaptionManager(ClosedCaptionsSettings closedCaptionsSettings, ClosedCaptionDeduplicationConfig closedCaptionDeduplicationConfig)
-
-
Method Detail
-
getClosedCaptions
final StateFlow<List<CallClosedCaption>> getClosedCaptions()
-
getCcMode
final StateFlow<TranscriptionSettingsResponse.ClosedCaptionMode> getCcMode()
-
getClosedCaptioning
final StateFlow<Boolean> getClosedCaptioning()
-
handleEvent
final Unit handleEvent(VideoEvent videoEvent)
Processes incoming events related to closed captions, such as new captions being added, captioning starting, or captioning ending.
- Parameters:
videoEvent- The event containing closed captioning information.
-
-
-
-