feat: expose subtitle state change event - #141
Conversation
Balamurugan-100
commented
Sep 10, 2026
- Host apps could not observe subtitle enable, disable, or language changes, making it difficult to persist the user's caption preference.
- Expose subtitle state changes to host apps while reporting only actual state changes and keeping persistence responsibility with the host.
- Keep the change backward compatible with a default listener implementation.
* Host apps could not observe subtitle enable, disable, or language changes, making it difficult to persist the user's caption preference. * Expose subtitle state changes to host apps while reporting only actual state changes and keeping persistence responsibility with the host. * Keep the change backward compatible with a default listener implementation.
|
Claude finished @Balamurugan-100's task in 2m 41s —— View job Todo
SummaryReviewed all 5 changed files: The feature is implemented cleanly:
Non-blocking observations:
Regression AssessmentNo regressions identified in playback, DRM, downloads, seeking, track selection, adaptive switching, or player lifecycle. The change is additive (new listener method + internal callback wiring) and existing call paths ( Final Verdict
|
|
Claude finished @Balamurugan-100's task in 1m 1s —— View job Todo
SummaryReviewed all 5 changed files ( The overall design is sound: However, there is a functional bug that breaks the core "report actual state changes" requirement for the most common trigger path (auto-enabled default captions):
fun enableDefaultCaptions() {
val defaultTrack = getAvailableTextTracks().firstOrNull() ?: return
previousSubtitleLanguage = defaultTrack.first // set BEFORE calling setTextTrackByLanguage
setTextTrackByLanguage(defaultTrack.first)
}
This path is not a rare edge case — it's the primary flow wired up in if (showDefaultCaptions && isPrepared && textTracks.isNotEmpty()) {
enableDefaultCaptions()
}Any host app that opts into Fix: remove the premature assignment on line 92 and let fun enableDefaultCaptions() {
val defaultTrack = getAvailableTextTracks().firstOrNull() ?: return
setTextTrackByLanguage(defaultTrack.first)
}Non-blocking observation:
Regression AssessmentNo regressions in playback, DRM, downloads, seeking, general track selection, or player lifecycle — the change is additive. The bug above is isolated to the new default-captions notification path and does not affect existing subtitle selection behavior. Final Verdict❌ CHANGES REQUESTED The |
|
Claude finished @Balamurugan-100's task in 46s —— View job Todo
SummaryRe-reviewed after the latest push. Both issues raised in the prior review round have been addressed:
Design/Implementation Check
Regression AssessmentNo regressions identified in playback, DRM, downloads, seeking, track selection, adaptive switching, or player lifecycle. The default-captions notification path — the bug found in the previous round — is now verified correct by code inspection. Final Verdict✅ APPROVED No blocking correctness, regression, lifecycle, API compatibility, or security issues remain. Both previously flagged issues are resolved. |