-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Transparent background of TTML caption not respected #2824
Comments
Hi Erez! Can you please provide us with a test stream which exhibits the problem? From the issue template: Link to test contentProvide a link to media that reproduces the issue. If you don't wish to post it |
Positioning: Color: |
Issue: #2824 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=156781252
Positioning is now fixed for this sample (as of the change ref'd above). |
Updated issue comment to refer to the remaining problem with the background color. |
Issue: #2824 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=156781252
I think the background color issue is working as intended. The way captions are styled is quite complicated, because (a) various caption formats define embedded styling, and (b) for accessibility reasons devices are required to allow global configuration of subtitle styles. Unfortunately the two weren't really considered together. In ExoPlayer, by default, we merge the embedded style and the device specified style when deciding how captions should be rendered. Background color is defined at multiple levels:
In this case window background is explicitly transparent in the embedded style. Text background is undefined, and so is obtained from the device specified style. By default it's black, which is why you see a black background. You can fix this by overriding the device specified style. For example the following will result in the captions being rendered with transparent text background:
|
Hi
I have 2 issues related to playing Dash stream with TTML subtitle on Exoplayer ver 2.1 and 2.3
2.The subtitles are always showen with black background although the TTML file header is configuerd to show the subtitle with transparent background .this issue is also repruduce on old Exoplayer like 1.7
for example I attach my TTML header file
Thx
Erez
ttml header example.txt
The text was updated successfully, but these errors were encountered: