registerCaption method
void
registerCaption()
Implementation
void registerCaption() {
room.registerTextStreamHandler(
Constant.liveCaptionAgent,
(TextStreamReader reader, String participantIdentity) async {
final message = await reader.readAll();
final attributes = reader.info?.attributes;
if (attributes == null) return;
final isFinal = attributes["lk.transcription_final"] == "true";
handleCaptionFromRaw(message, isFinal, participantIdentity);
},
);
}