Skip to content

feat: add SGAI checkbox for HLS interstitial support on Safari - #137

Merged
birme merged 1 commit into
Eyevinn:masterfrom
sinewave440hz:feat/sgai-safari-support
Mar 13, 2026
Merged

birme merged 1 commit into
Eyevinn:masterfrom
sinewave440hz:feat/sgai-safari-support

Conversation

@sinewave440hz

@sinewave440hz sinewave440hz commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

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: returncontinue in fireTrackingUrls

Screenshots

SGAI checkbox in toolbar

download

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
birme merged commit 698af1f into Eyevinn:master Mar 13, 2026
1 check failed
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