jmshrv / finamp

A Jellyfin music client for mobile
Mozilla Public License 2.0
1.69k stars 120 forks source link

[Feature Request] SyncPlay Support #640

Open zachbakerdev opened 4 months ago

zachbakerdev commented 4 months ago

Suggestion to add support for groups. Something I used a lot in Spotify and something I would love to use in Finamp.

Chaphasilor commented 3 months ago

I'm not sure what you mean. What exactly is a "group" in the context of a music app? 🤔

zachbakerdev commented 3 months ago

In Spotify, it's called a Jam. You can have two different people listening to the same music together remotely. The feature is built into Jellyfin itself, and you can test it out by opening up the web version on two devices. There's an icon at the top right with three people. Click it to create a group, then click it on the other device to join the group you created. Then you can play music and it will sync playback on both devices. Skipping songs will skip on both devices, playing new songs will start them on both devices, so on and so forth.

Chaphasilor commented 3 months ago

Right, that feature is called "SyncPlay" in Jellyfin. I've been interested in adding that eventually already, but mostly to enable synchronizing playback between my own devices, so that I can switch from one client to another one without losing my playback queue.

What would be your use case? I've heared the Jellyfin core team mention a few times that no-one really knows how SyncPlay works, and that it's a nightmare to maintain. So I'm not sure if I really want to implement support for it, if there isn't a major use case.

zachbakerdev commented 3 months ago

I specifically use it because I don't live with my girlfriend and we like to listen to music together. We like to play songs we like and explain to each other why we like them. It's something we do quite often, and it's the main reasons I haven't dropped Spotify yet.

I'm not sure how the actual Jellyfin API works, but considering the web player supports groups, I assume there would be some backend functionality in the API to plug into that would automatically calculate and provide the information for correcting audio positions.

From my understanding, if the gap is small enough, it will speed up or slow down one device to reduce the difference to I believe 60ms by default. If the gap is big enough I believe the user that doesn't own the group skips to the group owners position.

I'm sure this would take more research to decide if the actual time investment required would be worth it even if a lot of people use it compared to other mainstream features.

Chaphasilor commented 3 months ago

Okay, so your girlfriend has an account on your server, with access to the same music libraries as you? Because otherwise this would (probably) not work.
I can definitely see that being useful, but since it's limited to accounts on the same server, I'm not sure how popular it would be.

And I don't think there's a way to "invite" someone to a server, giving them temporary read-only access?

zachbakerdev commented 3 months ago

Yup. That's exactly what I do. I believe you could make a temp user using the Jellyfin API, but it wouldn't be necessary as you could just create a user and only give them access to the music library if that's what you want to do. Music is relatively low bandwidth compared to the other things, especially if you force transcoding for certain users.