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

Bugfix: IMSC1 parsing error #4218

Merged
merged 276 commits into from
Mar 4, 2022
Merged

Conversation

mtoczko
Copy link
Collaborator

@mtoczko mtoczko commented Aug 7, 2021

This PR will...

Adds checking for style and region elements in the getAttributeNS function.
Added style support for region.

Why is this Pull Request needed?

For TTLM files without region and style elements, the parser returned the error Failed to parse IMSC1: TypeError: Cannot read property 'hasAttributeNS' of undefined'.

Are there any points in the code the reviewer needs to double check?

No

Resolves issues:

#4117

@s-cros Can You share a test stream?

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

dependabot bot and others added 30 commits November 4, 2020 06:49
…per-module-imports-7.12.5

Bump @babel/helper-module-imports from 7.12.1 to 7.12.5
…li-4.2.0

Bump webpack-cli from 4.1.0 to 4.2.0
Bumps [netlify-cli](https://github.com/netlify/cli) from 2.67.2 to 2.67.4.
- [Release notes](https://github.com/netlify/cli/releases)
- [Changelog](https://github.com/netlify/cli/blob/master/CHANGELOG.md)
- [Commits](netlify/cli@v2.67.2...v2.67.4)

Signed-off-by: dependabot[bot] <support@github.com>
…li-2.67.4

Bump netlify-cli from 2.67.2 to 2.67.4
Bumps [netlify-cli](https://github.com/netlify/cli) from 2.67.4 to 2.68.0.
- [Release notes](https://github.com/netlify/cli/releases)
- [Changelog](https://github.com/netlify/cli/blob/master/CHANGELOG.md)
- [Commits](netlify/cli@v2.67.4...v2.68.0)

Signed-off-by: dependabot[bot] <support@github.com>
…li-2.68.0

Bump netlify-cli from 2.67.4 to 2.68.0
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.3 to 4.0.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v4.0.3...v4.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
…t-4.0.5

Bump typescript from 4.0.3 to 4.0.5
Bumps [eslint](https://github.com/eslint/eslint) from 7.12.1 to 7.13.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.12.1...v7.13.0)

Signed-off-by: dependabot[bot] <support@github.com>
…t-eslint/parser-4.7.0

Bump @typescript-eslint/parser from 4.6.1 to 4.7.0
Bumps [eslint-plugin-standard](https://github.com/standard/eslint-plugin-standard) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/standard/eslint-plugin-standard/releases)
- [Commits](standard/eslint-plugin-standard@v4.0.2...v4.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
…ugin-standard-4.1.0

Bump eslint-plugin-standard from 4.0.2 to 4.1.0
…t-eslint/eslint-plugin-4.7.0

Bump @typescript-eslint/eslint-plugin from 4.6.1 to 4.7.0
…ha-8.0.4

Bump @types/mocha from 8.0.3 to 8.0.4
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.1.0 to 8.2.1.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](babel/babel-loader@v8.1.0...v8.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
…der-8.2.1

Bump babel-loader from 8.1.0 to 8.2.1
Bumps [netlify-cli](https://github.com/netlify/cli) from 2.68.0 to 2.68.3.
- [Release notes](https://github.com/netlify/cli/releases)
- [Changelog](https://github.com/netlify/cli/blob/master/CHANGELOG.md)
- [Commits](netlify/cli@v2.68.0...v2.68.3)

Signed-off-by: dependabot[bot] <support@github.com>
…li-2.68.3

Bump netlify-cli from 2.68.0 to 2.68.3
Bumps [netlify-cli](https://github.com/netlify/cli) from 2.68.3 to 2.68.4.
- [Release notes](https://github.com/netlify/cli/releases)
- [Changelog](https://github.com/netlify/cli/blob/master/CHANGELOG.md)
- [Commits](netlify/cli@v2.68.3...v2.68.4)

Signed-off-by: dependabot[bot] <support@github.com>
…li-2.68.4

Bump netlify-cli from 2.68.3 to 2.68.4
Bumps [netlify-cli](https://github.com/netlify/cli) from 2.68.4 to 2.68.5.
- [Release notes](https://github.com/netlify/cli/releases)
- [Changelog](https://github.com/netlify/cli/blob/master/CHANGELOG.md)
- [Commits](netlify/cli@v2.68.4...v2.68.5)

Signed-off-by: dependabot[bot] <support@github.com>
…li-2.68.5

Bump netlify-cli from 2.68.4 to 2.68.5
…erge-5.4.0

Bump webpack-merge from 5.3.0 to 5.4.0
dependabot bot and others added 17 commits February 12, 2021 06:22
…ugin-proposal-optional-chaining-7.12.16

build(deps-dev): bump @babel/plugin-proposal-optional-chaining from 7.12.13 to 7.12.16
…re-7.12.16

build(deps-dev): bump @babel/core from 7.12.13 to 7.12.16
…eset-env-7.12.16

build(deps-dev): bump @babel/preset-env from 7.12.13 to 7.12.16
…eset-typescript-7.12.16

build(deps-dev): bump @babel/preset-typescript from 7.12.13 to 7.12.16
Bumps [eslint](https://github.com/eslint/eslint) from 7.19.0 to 7.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.19.0...v7.20.0)

Signed-off-by: dependabot[bot] <support@github.com>
….20.0

build(deps-dev): bump eslint from 7.19.0 to 7.20.0
…pt-eslint/parser-4.15.1

build(deps-dev): bump @typescript-eslint/parser from 4.15.0 to 4.15.1
…pt-eslint/eslint-plugin-4.15.1

build(deps-dev): bump @typescript-eslint/eslint-plugin from 4.15.0 to 4.15.1
@s-cros
Copy link

s-cros commented Aug 9, 2021

Hello,

@mtoczko Please find a simple IMSC1 asset VOD here : https://we.tl/t-yV8reG1qkB

Br

@mtoczko
Copy link
Collaborator Author

mtoczko commented Aug 9, 2021

Hello,

@mtoczko Please find a simple IMSC1 asset VOD here : https://we.tl/t-yV8reG1qkB

Br

@s-cros The stream has errors. You can test here: https://deploy-preview-4218--hls-js-dev.netlify.app/demo/

@mtoczko
Copy link
Collaborator Author

mtoczko commented Aug 23, 2021

Hi @robwalch can you review?

@robwalch robwalch added this to the 1.2.0 milestone Dec 15, 2021
@@ -182,9 +186,20 @@ function getTtmlStyles(region, style): { [style: string]: string } {
// 'direction',
// 'writingMode'
];

const regionStyleName = region.hasAttribute('style')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to generate some test content for imsc+hls so that it can be available for testing in the long term. One of the test files I got ends up not having a region at all, which causes this to fail. Probably should add a guard for it.

Suggested change
const regionStyleName = region.hasAttribute('style')
const regionStyleName = region && region.hasAttribute('style')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, with that, I think the default region styles aren't quite correct, but I think that shouldn't necessarily be part of this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have any test content that you're able to share, that would be helpful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gkatsev
1.m4s.zip
This segment was used for testing.
When you see the file structure, you will understand the addition of the style to the region.
I don't have test streams right now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I've been trying to generate an mp4 file like that, but all I can find will generate it with the xml documents being in the same mdat instead of across multiple mdats (which I don't think it correct).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generated a test source to test some IMSC in HLS here https://test-streams.mux.dev/tos_ismc/main.m3u8

@robwalch robwalch merged commit 1986431 into video-dev:master Mar 4, 2022
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.

None yet

4 participants