Skip to content

fix(android): report track selection in onTextTracks/onAudioTracks with controls#4920

Open
janpe wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
janpe:fix/4918-android-track-selection
Open

fix(android): report track selection in onTextTracks/onAudioTracks with controls#4920
janpe wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
janpe:fix/4918-android-track-selection

Conversation

@janpe

@janpe janpe commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Fixes #4918.

With controls enabled on Android, onTextTracks / onAudioTracks reported every track as selected: false (regression since 6.16.0 / #4581). Before that migration, onTracksChanged always used the selection-aware getters regardless of controls; #4581 added a controls branch that hard-coded selected = false ("let PlayerView handle it"). But these are data callbacks — PlayerView rendering the native picker doesn't replace reporting selection to JS.

Changes

Compute selected from player.getCurrentTrackSelections() in getBasicTextTrackInfo / getBasicAudioTrackInfo, reusing the controls-off logic (getAudioTrackInfo / getTextTrackInfo). Restores the pre-#4581 behavior; matches controls-off and iOS.

Test plan

Play an HLS stream with multiple audio/subtitle tracks and controls enabled, switch tracks via the native picker, and confirm onTextTracks / onAudioTracks report the active track as selected: true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant