-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MediaPlayerElement cannot display text in subtitles #7981
Comments
Thank you for your response, but I have already found an alternative to MediaPlayerElement. |
Here's a non-programmatic solution. When you merge this REG file, it will add a captioning theme with empty configuration, named "Controlled by Application" and sets it as active. After that, all subtitle styles are controlled by the application again (TimedTextStyle). |
@qian-o, thank you for reporting the issue. I can confirm CC text is not rendered when Effects is set to None or Drop Shadow (but does render with Raised/Depressed/Uniform). This is a regression from the initial WASDK preview release containing MediaPlayerElement (1.2.220902.1-preview1). I will continue investigating this further. |
@DmitriyKomin - no need. I did all the work already: #9126 |
@qian-o, I can confirm the issue is fixed internally for WinAppSDK 1.6. Specifically, captions weren't rendering for 2 out of the 5 possible Edge Effects settings - None and Drop Shadow. In these cases - where we don't generate SpriteVisuals to simulate an effect - layout never got run on the underlying TextBlock, causing a 0 size for the SpriteVisual backing the CompositionVisualSurface WinUI3 uses to render captions. The fix ensures UpdateLayout() is called on the TextBlock for all Edge Effects settings. @softworkz, note this was a bug in WinUI3 CC rendering unrelated to the other issues raised around MPE CC rendering in #9126. I will make sure to follow up on the other ones separately. |
Excellent, thanks! |
Thank you for your participation. Looking forward to further improvements in the next version. Much appreciated. |
@DmitriyKomin - A general note on the whole subject: When working with subtitles/closedcaptions, you are using TimedTextStyle, which provides very detailed settings to control the appearance of subtitles, but one thing is missing: There is no "Effect" property. This can only be controlled from the Windows settings app and in code, it can only be read but not changed: ClosedCaptionProperties.FontEffect. Also, the latter properties partially (really weird and stupid) overrride those which you can set with TimedTextStyle. |
Describe the bug
WinUI:
Steps to reproduce the bug
1.Create a MediaPlayerElement control.
2.Create a MediaSource and add a TimedTextSource instance to ExternalTimedTextSources.
3.The Source property of the MediaPlayerElement binds to the MediaSource
Expected behavior
No response
Screenshots
No response
NuGet package version
Windows App SDK 1.2.1: 1.2.221116.1
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: