Skip to content
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

Subtitles are not centered #4015

Closed
avelad opened this issue Mar 7, 2022 · 1 comment · Fixed by #4023
Closed

Subtitles are not centered #4015

avelad opened this issue Mar 7, 2022 · 1 comment · Fixed by #4023
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@avelad
Copy link
Member

avelad commented Mar 7, 2022

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? 3.3.2

Can you reproduce the issue with our latest release version? Yes

Can you reproduce the issue with the latest code from main? Yes

Are you using the demo app or your own custom app? Both

If custom app, can you reproduce the issue using our demo app? Yes

What browser and OS are you using?
Any with MSE support

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

N/A

What configuration are you using? What is the output of player.getConfiguration()?

Default

What did you do?

Load a TTML subtitle without tts:textAlign
Example:

<?xml version="1.0" encoding="utf-8"?>
<tt xml:lang="en" xmlns="http://www.w3.org/ns/ttml" xmlns:tt="http://www.w3.org/ns/ttml" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:tts="http://www.w3.org/ns/ttml#styling">
	<head>
		<metadata>
			<ttm:title/>
			<ttm:desc/>
			<ttm:copyright/>
		</metadata>
		<styling>
			<style xml:id="style0"/>
		</styling>
		<layout>
			<region tts:extent="48% 8%" tts:fontFamily="monospaceSerif" tts:origin="24% 76%" xml:id="region01"/>
			<region tts:extent="78% 8%" tts:fontFamily="monospaceSerif" tts:origin="9% 84%" xml:id="region02"/>
		</layout>
	</head>
	<body>
		<div>
			<p begin="456628:17:04.888" end="456628:17:06.522" region="region01" style="style0" xml:id="caption2713">- ¡Egipto! ¿Cómo es?</p>
			<p begin="456628:17:04.888" end="456628:17:06.522" region="region02" style="style0" xml:id="caption2714">- ¡Fantástico! Hay muchas cosas.</p>
		</div>
	</body>
</tt>

What did you expect to happen?
The subtitle should be centered by default.

What actually happened?

Text align value by default in TTML parser is START
https://github.com/shaka-project/shaka-player/blob/main/lib/text/ttml_text_parser.js#L548
image

I know that ShakaPlayer follows the specification, and also puts a comment in the code, but the rest of the players on the market by default the subtitles are centered, would you admit a PR to make this change?

@avelad avelad added the type: bug Something isn't working correctly label Mar 7, 2022
@github-actions github-actions bot added this to the v3.3 milestone Mar 7, 2022
@joeyparrish
Copy link
Member

Sounds good to me. Thanks!

joeyparrish pushed a commit that referenced this issue Mar 10, 2022
joeyparrish pushed a commit that referenced this issue Mar 22, 2022
joeyparrish pushed a commit that referenced this issue Mar 22, 2022
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label May 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants