feat: add SGAI checkbox for HLS interstitial support on Safari - #137
Merged
Merged
Conversation
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 Eyevinn#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>
birme
approved these changes
Mar 13, 2026
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.
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
enableSgaioption that forces hls.js withpreferManagedMediaSource: trueeven on Safari, enabling HLS interstitial playback on all browsers.Changes:
enableSgaioption to IWebPlayerOptions (core)preferManagedMediaSource: trueto HlsJsTech default configreturn→continuein fireTrackingUrlsScreenshots
SGAI checkbox in toolbar