Skip to content

feat(ui): play HLS livestreams on macOS - #1797

Draft
renefloor wants to merge 3 commits into
feat/hls-pipfrom
feat/hls-macos
Draft

renefloor wants to merge 3 commits into
feat/hls-pipfrom
feat/hls-macos

Conversation

@renefloor

Copy link
Copy Markdown
Contributor

🎯 Goal

Step 9 of HLS_PLAN.md (FLU-1266): HLS playback on macOS, reusing the iOS player. Stacked on #1796.

🛠 Implementation details

  • The Swift package of stream_video_hls moves from ios/ to darwin/. The pubspec now declares sharedDarwinSource: true for ios and for the new macos platform, so both build from one Swift package (.iOS("14.0"), .macOS("10.15")).
  • These stay iOS-only, behind #if os(iOS):
    • the audio session (HlsAudioSession does nothing on macOS);
    • resuming playback after the app returns to the foreground or after an audio interruption;
    • picture in picture;
    • CADisplayLink.
  • On macOS, frames are pulled by a 60 Hz main-run-loop timer.
  • The plugin reads the registrar's messenger and textures as properties on macOS (they are methods on iOS).
  • StreamHlsPlayerFactory now reports macOS as supported.
  • The example app gains a macOS target with the network-client entitlement, and its Xcode project now points at darwin/.

🧪 Testing

The example's integration tests pass on:

  • macOS: the public HLS stream plays (first frame, playing, metrics, pause, resume), and a 404 playlist fails at once;
  • the iOS simulator;
  • the Android emulator.

flutter test in stream_video_hls passes.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the v2 label Dec 4, 2026
@getstream-metis

Copy link
Copy Markdown

👋 Hi Rene, still cooking? 🍳

I'm Jeffery, Stream's review agent. I look for bugs, regressions, missing tests and slow paths, and I only post findings I've checked against the code.

📝 This PR is a draft, so I'll keep my hands off for now. Mark it Ready for review and a ✅ box to start my review shows up right here.

Can't wait? Comment /jeffery review now and I'll start the moment it's ready. I'll stay quiet unless you ask.

renefloor and others added 3 commits December 5, 2026 10:59
The Swift package of stream_video_hls moves to `darwin/` and is shared by
iOS and the new macOS platform. The audio session, the resume after a
background or an interruption, picture in picture and the display link stay
on iOS; macOS pulls frames with a timer at the display rate, and reads the
registrar's messenger and textures as properties.

`StreamHlsPlayerFactory` supports macOS. The example gains a macOS target,
where its integration tests play the public stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ources

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant