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

CMAF KLV support via Metadata callback #6674

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

glynd
Copy link
Contributor

@glynd glynd commented Sep 4, 2024

This PR will...

Optionally extract KLV data that is delivered via CMAF / Mp4 emsg box and return it via Hls.Events.FRAG_PARSING_METADATA events.
This has to be enabled using new config parameter enableEmsgKLVMetadata - defaults to false

This leverages the existing ID3 infra so is a relatively small change, but will deliver all the KLV data for the CMAF segment in one hit - it is then down to the application to display that data at the appropriate time.

Why is this Pull Request needed?

To allow users to display KLV timed data aligned with video

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

Resolves issues:

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

src/types/demuxer.ts Show resolved Hide resolved
src/demux/mp4demuxer.ts Show resolved Hide resolved
src/demux/mp4demuxer.ts Show resolved Hide resolved
@robwalch
Copy link
Collaborator

robwalch commented Sep 4, 2024

@robwalch robwalch added this to the 1.6.0 milestone Sep 4, 2024
@glynd
Copy link
Contributor Author

glynd commented Sep 4, 2024

Hi,

Removing the const cause issues:

src/hls.ts:121:12 - error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query.

I agree it should be a const ideally, but there appeared to be some kind of TS/JS conflict.

Code duplication - probably better left as is as you only want to process the PTS etc if you are going to handle the emsg box type

Thanks,

Glyn

@robwalch robwalch merged commit 5eb0e32 into video-dev:master Sep 9, 2024
12 checks passed
robwalch added a commit that referenced this pull request Sep 9, 2024
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.

2 participants