avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
94 stars 51 forks source link

Turn captions on by default in iOS #5108

Open elynema opened 1 year ago

elynema commented 1 year ago

Description

As of #5084, captions could be enabled on iOS devices in full-screen player by selection English as the subtitle option. We would like the captions to be turned on by default if possible, and also to work if Auto is selected under the subtitle mens rather than Englishe.

Definition of Done

masaball commented 1 year ago

I have looked into this for a bit and done some testing. For reference, here is the RFC spec for HLS streaming, specifically the section dealing with relating other Renditions of a media stream, which is what subtitles/captions are classified as (4.3.4.1 EXT-X-MEDIA). There is good info on the whole setup there but what is relevant is on page 26. The attributes we care about for captions being on by default are:

I have tested all 3 in different combinations but have had no luck getting them to be on by default when using BrowserStack.

Additionally, I encountered behavior with the standard Avalon player where having DEFAULT enabled caused the captions to render as part of the video but they could not be turned on or off. The Avalon player's CC button would turn on/off our sideloaded captions but had no effect on the HLS captions, so if the CC button was on there would be 2 sets of captions displayed. So, if DEFAULT were to end up being required for iOS default on captions it might require us to rework how the native Avalon player handles the captioning.

All of that being said, I eventually found this Apple support page that indicates it may be up to each individual how the Apple video player defaults. I don't think there is a way to test this in browserstack though, as you only have access to one of the browsers and cannot mess with the device's settings. If someone on the team has an iPhone or iPad and the IU VPN setup on it, we could test on Avalon-Dev if turning on the iOS device's accessibility option gets the captions to turn on in the player as the AUTO option. I don't have any iOS products so one of the other team members would need to test if it works with the configuration currently on Dev.

Dananji commented 1 year ago

@masaball I tested this on an iPhone (12 Pro, iOS 16.31) by changing the device's accessibility settings;

masaball commented 1 year ago

Thanks for testing this Dananji. Note: Dananji said during standup that the device CC settings were defaulted to on.

elynema commented 1 year ago

My testing in ios 15.7 on iPhone 13 mini

I do not have any accessibility settings turned on for captioning:

IMG-2607.PNG

On avalon-staging, this is what I see when the video loads (captions are displaying). Note that captions turn off I select auto option and back on if I select either English option. IMG-2603.PNG

On mco-staging, this is what I see when the video loads (captions do not display; I have to select CC and then English before they display):IMG-2608.PNG