RESOLVED FIXED 211230
Media controls tracks menu shows "Auto" selected instead of track selected via the JS API
https://bugs.webkit.org/show_bug.cgi?id=211230
Summary Media controls tracks menu shows "Auto" selected instead of track selected vi...
Antoine Quint
Reported 2020-04-30 06:17:41 PDT
Created attachment 398051 [details] Test (this is a report from a problem originally reported by aashraya on the WebKit Slack at https://webkit.slack.com/archives/CU5LWFM28/p1588225198051000) Consider this simple test (also attached): <body> <video autoplay controls src="https://storage.googleapis.com/shaka-demo-assets/angel-one-hls/hls.m3u8" style="width: 800px"></video> <script> document.querySelector('video').addEventListener("play", e => e.target.textTracks[2].mode = "showing"); </script> </body> When the video starts playing the French caption is on, which is as expected. However, when showing the captions menu, the "Auto" item is selected. Debugging a bit in the media controls code, the problem is that when `TextTracksSupport.tracksPanelIsTrackInSectionSelected()` is called to populate individual rows under the "Subtitles" menu, the MediaControlsHost has its `captionDisplayMode` property set to `automatic`. As such, I think the media controls code is doing what is expected and there is a problem in the media engine reporting the wrong value through MediaControlsHost.
Attachments
Test (291 bytes, text/html)
2020-04-30 06:17 PDT, Antoine Quint
no flags
Patch (10.45 KB, patch)
2020-05-01 13:20 PDT, Antoine Quint
no flags
Radar WebKit Bug Importer
Comment 1 2020-04-30 06:18:02 PDT
Antoine Quint
Comment 2 2020-04-30 06:21:26 PDT
It's also possible we're interpreting the value of captionDisplayMode incorrectly and that this value being set to "true" shouldn't override an individual text track as showing selected.
Antoine Quint
Comment 3 2020-04-30 06:21:42 PDT
Haven't had the chance to see if this regressed.
Antoine Quint
Comment 4 2020-05-01 13:20:03 PDT
Eric Carlson
Comment 5 2020-05-04 08:20:17 PDT
Comment on attachment 398226 [details] Patch Thanks you!
EWS
Comment 6 2020-05-04 08:28:51 PDT
Committed r261084: <https://trac.webkit.org/changeset/261084> All reviewed patches have been landed. Closing bug and clearing flags on attachment 398226 [details].
Oren Me
Comment 7 2020-05-29 11:12:16 PDT
Happy you were able to fix this issue, I reported this more than a year ago https://bugs.webkit.org/show_bug.cgi?id=195046 as this kept coming from users and was especially annoying with inline playback feature where users started inline, used html rendered controls and selected language(this is the change via JS api) and then when moving to fullscreen which is the native iOS player then the tracks UI there was not updated to reflect the change
Antoine Quint
Comment 8 2020-05-29 11:14:15 PDT
(In reply to Oren Me from comment #7) > Happy you were able to fix this issue, I reported this more than a year ago > https://bugs.webkit.org/show_bug.cgi?id=195046 as this kept coming from > users and was especially annoying with inline playback feature where users > started inline, used html rendered controls and selected language(this is > the change via JS api) and then when moving to fullscreen which is the > native iOS player then the tracks UI there was not updated to reflect the > change Hi Oren. I wasn't aware of this bug. Hopefully the fix for this bug fixes the one you reported.
Oren Me
Comment 9 2020-06-01 12:58:52 PDT
Thanks, surely sounds like the same so hope it does. When will it be available for testing?
Note You need to log in before you can comment on or make changes to this bug.