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

Add numeric fallback value for line/position properties to Browsers that do not support the string "auto" #57

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

leticiafernandes
Copy link

@leticiafernandes leticiafernandes commented Feb 9, 2021

Summary

This PR fixes the bug that happens on some TV Web Engines where the automatic value of line and position property "auto" is always converted to 0 because specifics browsers only support numeric values for both attributes. From now on will use the fallback value -1 as fallback value since it's an equivalent of value "auto" and numeric having support on all Web Engines.


Bug scenario

For example on WeOS 3 that uses Chromium 38 as Web Engine this is what happens:

image

When we attribute the value auto for line property it's converted to zero. If we check the typeof cue.line in these Browser the return is numeric but when the same command it's executed in newer browsers we can verify that returns string.


Changes

  • parse-cue.js - Check if the line/position property is undefined and the value is 0 after the attempt to set it to auto to use the fallback -1

… web engine converts auto to 0

some TV Web Engines (for example WebOS 3 - Chromium 38) does not support string values for
line/position properties only numeric
@leticiafernandes leticiafernandes changed the title Fix default value old tv webengines Add numeric fallback value for line/position properties for Browsers that do not support the string "auto" Feb 9, 2021
@leticiafernandes leticiafernandes changed the title Add numeric fallback value for line/position properties for Browsers that do not support the string "auto" Add numeric fallback for line/position properties for Browsers that do not support the string "auto" Feb 9, 2021
@leticiafernandes leticiafernandes changed the title Add numeric fallback for line/position properties for Browsers that do not support the string "auto" Add numeric fallback value for line/position properties to Browsers that do not support the string "auto" Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant