Using hard-coded namespaces in TTML parser #2756
Labels
component: captions/subtitles
The issue involves captions or subtitles
flag: good first issue
This might be a relatively easy issue; good for new contributors
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Milestone
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
master
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
Demo
What browser and OS are you using?
ChromeOS stable 84
What are the manifest and license server URIs?
Not available (pointed out by a partner, confirmed by reading source)
What did you do?
The TTML parser uses hard-coded namespaces in some places. For example:
tts:extent
xml:space
xml:id
smpte:backgroundImage
This prevents someone from using different namespace names in their XML. For example, this would be typical:
But this should also be valid:
In some cases, we use
getAttribute
directly with a hard-coded namespace name in the attribute name:Instead, we should match by namespace URL, as we do in most other cases.
It's possible that we could write a compiler conformance rule or linter rule to ban the direct use of getAttribute() with a hard-coded namespace name.
The text was updated successfully, but these errors were encountered: