Anyone got SharePlay (Group Activities) to work on Safari?

Hi everyone,

I am not able to get Group Activities (SharePlay/mediaSession.coordinator) to work on Safari.

Here's my setup:

  1. macOS Monterey 12.3 Beta, Safari 15.4, Intel.
  2. https://github.com/tokorom/SharePlaySample as the iOS project. (I also experimented with setting metadata.type = .watchTogether.)
  3. I set https://theoplayershareplay.thijslowette.repl.co as the fallbackURL. (Code available at https://replit.com/@THIJSLOWETTE/THEOplayerSharePlay.)

What am I doing & seeing?

  1. I Facetime myself from an iOS 15.2.1 as the "initializer" to my macOS through the Desktop Facetime app.
  2. I open the app on my iOS device. I start the SharePlay activity.
  3. I can see the "popup" on my macOS device. I click open, and it opens up my fallback URL in Safari. (I had to set Safari as my default browser.)
  4. I can see (in the Safari dev tools) that my Safari has joined the session.
  5. In Safari, I click the custom play button at the top which should call coordinator.play(). Nothing happens on my iOS app. I pause the video again in Safari.
  6. I hit play in my iOS app. Nothing happens in Safari.

You can verify these observations in the screen recording at https://www.loom.com/share/809062d87af244b1bda96d30bd08518e.

Notes

  1. Also tried different SharePlay projects.
  2. Also tried Facetiming other people's macOS to ensure that the session is between two unique Facetime IDs.
  3. Also tried the macOS 12.2 Stable.

Although I'm running out of ideas, I am not yet ready to give up. Can someone assist? I promise I'll write a kick-*** how-to guide & demo for the community if we figure it out! 😅🙌

Kind regards,

-thijsl

Try to ensure that your web page's mediaSession.coordinator has a MediaMetadata object with the same trackIdentifier as your app's AVPlayerPlaybackController. You can do so by implementing the playbackCoordinator(_:identifierFor:) method in your app's delegate and returning a custom identifier which you can communicate out of band to the web page.

Hi WebKitJer,

Appreciate your feedback! I'll try to apply it...

Did you manage to make it work? If yes, can you upload your code to GitHub, I would be interested.

@thijsl I have the same problem, did you manage to figure out why it wasn't working? I would also really appreciate a working example.

The only documentation I have found on this is the Apple Video from WWDC, but even that video has a coding error in it and the solution doesn't work (at least in my case), so not sure how reliable it is.

Anyone got SharePlay (Group Activities) to work on Safari?
 
 
Q