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

Add support for Content Steering and Variable Substitution #5074

Closed
robwalch opened this issue Dec 1, 2022 · 0 comments · Fixed by #5191
Closed

Add support for Content Steering and Variable Substitution #5074

robwalch opened this issue Dec 1, 2022 · 0 comments · Fixed by #5191

Comments

@robwalch
Copy link
Collaborator

robwalch commented Dec 1, 2022

Not a Contribution

Is your feature request related to a problem? Please describe.

Content Steering is defined in https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-12#section-7

The main functions of Content Steering are to:

  1. Group redundant Variant Streams into "Pathways"
  2. Dynamically prioritize access to different Pathways

Describe the solution you'd like

Sub Tasks

  • Load Steering Manifest if present (Parse #EXT-X-CONTENT-STEERING:SERVER-URI…)
    • Must support versions 1 (refuse other versions)
    • Include Steering Query Params (_HLS_pathway="”, _HLS_throughput=)
  • Reload Steering Manifest (Manifest: TTL (seconds), RELOAD-URI)
    • Do not reload if HTTP status 410 Gone is received
    • Wait for “Retry-After” header time if HTTP 429 Too Many Requests is received
    • For other loading or parsing error, wait TTL or 300 seconds before attempting to reload again
  • Define logical Pathways
    • Match Pathway IDs in PATHWAY-PRIORITY array to STREAM-INFs w/ PATHWAY-ID
    • Default Pathway ID (for variants without PATHWAY-ID) is “.”
  • (optional) Support Pathway Cloning (Define logical Pathways pt.II)
    • BASE-ID > ID, URI-REPLACEMENT > HOST, PARAMS, PER-VARIANT-URIS (> STABLE-VARIANT-ID), PER-RENDITION-URIS (> STABLE-RENDITION-ID)
    • Clone Rendition Groups (PATHWAY-ID + GROUP-ID)
  • Steering Client Responsibilities
    • Start playback using EXT-X-CONTENT-STEERING PATHWAY-ID Pathway when present, otherwise pick “first” level according to player config and current selection logic
      • preferred Pathway should “agree” with MVP (warn otherwise and/or delay playback by redirecting)
    • Content Steering evaluation
      • Apply Pathway when: none is applied, applied is not first in the list (accounting for removed pathways, and penalized pathways). Remain on current Pathway when no alternative is available.
    • Penalize Pathway when all variant streams in a Pathway fail (Look at player penalty box timeout, but consider re-evaluating after Content Steering Manifest refresh)
  • (optional) Implement variable substitution
    • EXT-X-DEFINE
      • NAME, VALUE
      • IMPORT attribute from MVP to media playlist
    • Replace Variable References with defined values
      • a Variable Reference whose Variable Name has NOT been provided MUST trigger a parsing error
@robwalch robwalch added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Dec 1, 2022
@robwalch robwalch added this to the 1.4.0 milestone Dec 1, 2022
@robwalch robwalch changed the title Add support for Content Steering Add support for Content Steering and Variable Substitution Dec 1, 2022
@robwalch robwalch removed the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Dec 1, 2022
robwalch added a commit that referenced this issue Jan 15, 2023
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)
robwalch added a commit that referenced this issue Jan 15, 2023
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)
robwalch added a commit that referenced this issue Jan 16, 2023
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)
robwalch added a commit that referenced this issue Jan 18, 2023
robwalch added a commit that referenced this issue Jan 18, 2023
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)
robwalch added a commit that referenced this issue Jan 18, 2023
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)
robwalch added a commit that referenced this issue Jan 18, 2023
robwalch added a commit that referenced this issue Jan 20, 2023
* Implement EXT-X-DEFINE Variable Substitution
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)

* Return parse error on undefined Variable Reference
Only track/return first parse error
Fix typos

* Use same error handling as FRAG_PARSING_ERROR for LEVEL_PARSING_ERROR

* Minor improvements to esdocs generated docs

* Use logical assignment on playlistParsingError

Co-authored-by: Rob Walch <rob@jwplayer.com>
robwalch added a commit that referenced this issue Jan 26, 2023
* Implement EXT-X-DEFINE Variable Substitution
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)

* Return parse error on undefined Variable Reference
Only track/return first parse error
Fix typos

* Use same error handling as FRAG_PARSING_ERROR for LEVEL_PARSING_ERROR

* Minor improvements to esdocs generated docs

* Use logical assignment on playlistParsingError

Co-authored-by: Rob Walch <rob@jwplayer.com>
@robwalch robwalch mentioned this issue Jan 27, 2023
3 tasks
@robwalch robwalch linked a pull request Feb 15, 2023 that will close this issue
3 tasks
@robwalch robwalch moved this from In Progress to In Review in Support Content Steering and Variable Substitution Feb 15, 2023
robwalch added a commit that referenced this issue Feb 18, 2023
* Load Steering Manifest

* Make UA check lazy for legacy unsupported MP3 in MP4 container check

* Add Redundant Streams tests

* Add FRAME-RATE to Redundant Stream group key and level sorting
Optimize MANIFEST_PARSED level filtering
Optimize Media Playlist check

* Do not group Variant levels with PATHWAY-ID into Fallback Stream URLs (unless building without Content Steering support)
Store and return seperate LevelAttributes per Fallback Stream URL
Align Level audio and text group ids with Fallback Stream URLs (Level._urlId)

* Content Steering Pathway grouping and selection
#5074

* Support removeLevel and improve capLevelController with level index changes

* Pathway Clone Variants

* Pathway Clone Rendition Groups

* Fix audio track alignment with timescales that differ and smooth switch when attributes do not change

* Always emit LEVEL_SWITCHING on Pathway change to ensure audio and subtitle tracks update as well

* Fix unregister listeners in fps and latency controller

* Unit test clean up

* Update README for Content Steering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant