Description
This is a tough one, because it spans wide and it's interdisciplinary - a kind of RACE condition between multiple
Teams/Areas Involved
- WinUI2, WinUI3 Media Elements
Microsoft.UI.Xaml - Windows.Media
Windows.Media.ClosedCaptioning.ClosedCaptionProperties
- Chrome/Windows and Edge/Windows
- Windows Media Player
- Windows Settings
Accessibility Section - New Live Captions Feature
(probably originated by)
I'm not sure whether this is the best place for this, but for Windows.Media and UWP, there's a cluttered forum only and over at MS.UI.Xaml, an earlier report has been ignored since (precisely) one year. The App Sdk seems to have the widest scope and - lastly - has the most welcoming text 😄
Feel free to move it, though.
Symptoms
WinUI3: Subtitles are not visible
There's no way for an application to change that through the media apis.
WinUI2: Subtitle Styles cannot be controlled
Certain properties of TimedTextStyle, most importantly the FontFamily.
Impact
This is showstopping for us. We are migrating a media player application to UWP (xbox) and WinUI3 and are blocked by this.
I guess the "invisible" subtitles effect doesn't need further explanation, and regarding the font setting, one might easily think that this is a minor problem - but it's not like that:
- Videos often use different fonts and styles for different situations, which aren't shown due to the current situation
- Videos often have special fonts embedded, especially in Asian titles where subtitles have even become a kind of an art form
Not being able to properly display them won't be acceptable for many users - We have our own settings for overriding subtitle styling and this can't be driven from two different places with conflicting settings
- Many subtitles have their own rich styling, which would never become visible when overriding settings exist which cannot be deactivated
But it's not just about us. It probably affects Millions of systems and not only custom WinUI apps - it also includes Media Player and Chrome + Edge browsers.
It's not invisible on the latter, but they're still affected. To understand the issue, we need to step back a little first.
Background
After intensive research, I have come to the following picture of what has happened:
Attempting to Reconstruct
In 2015, a new class was introduced in the Windows.Media namespace: ClosedCaptionProperties.
The static readonly properties are corresponding to these values in the registry:
The purpose of this is obviously a system-wide (or rather "user-session-wide") override of caption/subtitle styles to provide an adjustable experience which fits everybody's needs. A very good thing without doubt!
The controls on Windows 10 looked like this:
Pattern: Default + Optional Override
Here we get to the core of the subject:
- When looking at the settings, all are set to default
- Looking at the registry values, all are set to zero
- All the enums of the properties are starting with a "Default" entry valued zero
The pattern is clear and makes sense: Those settings do nothing until the user deliberately changes a value.
Implementations followed
Probably there are many more cases where implementations were done to make the presentation of captions adhere to those settings. These are the ones I know so far:
- Windows Media Player
(the new one art least) - WinUI2 MediaElement
- WinUI3 MediaPlayerElement
(in CueStyler.cpp) - Chrome and Edge Browsers
(caption_style_win.cc)
In all cases this has been implemented consequently and without further ado: When an override is set, then it will be applied.
Again, this makes sense, because nothing happens until a user makes such a setting change. And when he does that, he should be able to rely on getting the result as configured.
The Fatal Mistake
I can only speculate about why it happened - but at least it's quite plausible that during the process of bringing those captions settings into the new Win11 settings UI, someone (or multiple) started to wonder and doubt about all the settings having the value "Default" - which raises the question "what does 'default' even mean'?"
Clearly, such things as audio transcriptions or live captions do not have any default text style - but seemingly it wasn't considered or known that subtitles can very well have their own ("default") styles and even their own embedded fonts.
Even ATSC captions (EIA-708 and CEA-708)) can have some style information. Or maybe it wasn't known that it would affect all the media players and browsers.
No matter why, the new UI for caption styles was introduced:
You can choose between five presets and you can also create new ones - but three mistakes were made:
- There is no default 'empty'' preset like all values at 0)
=> You can't turn off all overrides - The default entries are not included in the individual settings
=> It is impossible to reset individual setting so that the content defaults are used - And the worst of all:
The shipment of the update has set override values on - probably - many, most or even all Windows machines in the world
Remember - these are override values, which were meant to be applied explicitly only by users.
And even worse: Users cannot get out of this situation, because it is impossible set all values back to zero (= defaults, no override).
People are forced to view subtitles with the Windows styles settings applied and are unable to set all back to default, to have captions being presented in the original way and style.
What you get from the update is this:
The preset is called "Default", but it's just a preset like all the others and it brings explicit values for all properties.
Individual Remedy
As an individual, you can fix this for your own machine, for example by merging a REG file like this: WindowsCaptionsUser.zip
It adds a custom preset named "Controlled by Application" which has all zeros and sets it as default.
But it's not something an application can do. For once, you can't mess around with a user's settings and as a store or UWP app, you don't even have the permissions to do so at runtime.
Point of Return?
For the MS side, it's a similar problem: It has been rolled out already. Can it be reverted in another update? Just adding a "real default" preset wouldn't be sufficient, it would also need to be set active. I'm not sure whether that's feasible...
If it cannot be done like that, then a different method would be needed. For example a way to prevent those styles from being applied. But all other video playback implementations that I mentioned plus those that I don't know about would all need to implement it on their side to get everything right again.