feat: add SGAI support on HLS live stream - #126
Merged
Merged
Conversation
birme
approved these changes
Jan 15, 2026
birme
requested changes
Jan 15, 2026
birme
left a comment
Contributor
There was a problem hiding this comment.
Looks good but fix the failing tests
Contributor
Author
|
I'm a bit unsure why the tests fail now, seems to be a problem with a expected attribute on the web-component video player but I haven't changed it |
birme
pushed a commit
that referenced
this pull request
Mar 13, 2026
On Safari, the web player defaults to native HLS playback (BaseTech), bypassing hls.js entirely. Since HLS interstitials are not supported natively in any browser, the SGAI interstitial feature (PR #126) only worked on Chrome/Firefox where hls.js is always used. This adds an `enableSgai` option that forces hls.js with `preferManagedMediaSource: true` even on Safari, enabling HLS interstitial playback on all browsers. Changes: - Add `enableSgai` option to IWebPlayerOptions (core) - When enabled, bypass Safari native fallback and use HlsJsTech - Add `preferManagedMediaSource: true` to HlsJsTech default config - Add SGAI checkbox to demo UI (auto-checked for SGAI streams) - Recreate player when SGAI toggle changes (tech switch requires it) - Fix tracking bug: `return` → `continue` in fireTrackingUrls Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add SGAI support on HLS live stream with tracking support.
Updated the hls.js library and added tracking, the tracking looks for tracking urls in the ad manifest and does a post request when the playtime of an ad reaches a given point, specified in the tracking assets in the ad manifest.