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

feat: parse content steering info #174

Merged
merged 7 commits into from Aug 15, 2023
Merged

Conversation

wseymour15
Copy link
Contributor

@wseymour15 wseymour15 commented Aug 8, 2023

Feature

Add support for parsing <ContentSteering> tags, as well as content (serverURL), the defaultServiceLocation , proxyServerUrl, and queryBeforeStart attributes associated to that tag.
This also adds support for <BaseURL tag properties to be included in our parsing of playlists, but specifically for our case, we ensure the serviceLocation property is passed when it exists on a BaseURL tag.

Changes

  • Return a contentSteering property on the parsed output containing the content of the tag as serverURL, as well as the other properties on the tag.
  • Return a serviceLocation property in the attributes object in playlist items.
  • Add support for any property on any <BaseURL> to be passed into the attributes object in playlist items.
  • Add logic for eventHandler option that will handle events (to be replaced with stream parsing).
  • Tests for above functionality.

References

https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.6.6

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #174 (42a6990) into main (9ece4ae) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #174      +/-   ##
==========================================
+ Coverage   94.58%   94.66%   +0.07%     
==========================================
  Files          19       19              
  Lines         812      824      +12     
  Branches      247      251       +4     
==========================================
+ Hits          768      780      +12     
  Misses         44       44              
Files Changed Coverage Δ
src/index.js 85.71% <ø> (ø)
src/stringToMpdXml.js 100.00% <ø> (ø)
src/inheritAttributes.js 97.70% <100.00%> (+0.14%) ⬆️
src/toM3u8.js 98.79% <100.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

src/inheritAttributes.js Outdated Show resolved Hide resolved
src/inheritAttributes.js Show resolved Hide resolved
Copy link
Contributor

@adrums86 adrums86 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work! +1 after warn instead of error on multiple <ContentSteering> tags.

@dzianis-dashkevich
Copy link

LGTM

@wseymour15 wseymour15 merged commit 0156528 into main Aug 15, 2023
8 checks passed
@wseymour15 wseymour15 deleted the feat/parse-content-steering-info branch August 15, 2023 15:54
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

3 participants