Skip to content

TTML Chinese Subtitle is not displayed for nestedCues #2478

@kumarashu123

Description

@kumarashu123

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

What version of Shaka Player are you using?
2.5.9

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?
own custom app

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

What browser and OS are you using?
Chrome and Mac

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

What are the manifest and license server URIs?

What did you do?

play content which has Chinese, Arabic ttml subtitle

What did you expect to happen?
Chinese, Arabic ttml subtitle should be displayed

What actually happened?

Chinese, Arabic TTML subtitle is not displaying for nestedCues

After Investigation I found that
In ttml_text_parser.js
static parseCue_ function
if (
Array.from(cueElement.childNodes).find(
(childNode) => childNode.nodeType === Node.TEXT_NODE &&
/\w+/.test(childNode.textContent)
)
) {

Here /\w+/.test(childNode.textContent)

  • /\w+/.test
    The \w metacharacter is used to find a word character.
    A word character is a character from a-z, A-Z, 0-9, including the _ (underscore) character.
    But Chinese is Unicode character, I think that's why subtitle is not coming Chinese

I will appreciate if you look into the issue. Thanks in advance

Metadata

Metadata

Assignees

Labels

status: archivedArchived and locked; will not be updatedtype: bugSomething isn't working correctly

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions