[Calling] Add captions received event to CallComposite#1180
[Calling] Add captions received event to CallComposite#1180pavelprystinka wants to merge 2 commits into
Conversation
Introduces CallCompositeCaptionsReceivedEvent and related event handler registration methods to CallComposite. Updates dependency injection and CaptionsRttDataManager to trigger the event when captions are finalized. Demo app now displays a toast when captions are received.
|
Can we add ufm gating to the feature while it's in develop, prior to ARB/Release? |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new captions received event feature to the CallComposite, allowing developers to register event handlers that are triggered when captions are finalized during a call. The implementation follows the existing event pattern established in the CallComposite.
Key changes:
- Adds CallCompositeCaptionsReceivedEvent with speaker information and caption text
- Implements event handler registration/removal methods in CallComposite
- Updates CaptionsRttDataManager to trigger events when captions are finalized
- Demonstrates usage in the demo app with toast notifications
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CallCompositeCaptionsReceivedEvent.java | New event class containing caption data (speaker name, raw ID, text, language) |
| CallComposite.java | Adds public API methods for registering/removing captions received event handlers |
| CallCompositeEventsHandler.kt | Implements handler storage and management for captions received events |
| CaptionsRttDataManager.kt | Triggers caption events when captions are finalized, updated constructor for configuration |
| CallCompositeExtensions.kt | Helper function to create caption received events |
| DependencyInjectionContainerImpl.kt | Updates dependency injection to pass configuration to CaptionsRttDataManager |
| CallCompositeManager.kt | Demo implementation showing toast notifications for received captions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| * // Process captions received event | ||
| * System.out.println(event.getSpeakerName()); | ||
| * System.out.println(event.getCaptionText()); | ||
| * System.out.println(event.getIsFinal()); |
There was a problem hiding this comment.
The documentation references a method getIsFinal() that doesn't exist in the CallCompositeCaptionsReceivedEvent class. This should be removed or the method should be added to the event class.
| * System.out.println(event.getIsFinal()); |
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
Pull Request Checklist
How to Test
What to Check
Verify that the following are valid
Other Information