Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control remote sessions (DLNA) #377

Open
provokateurin opened this issue Jan 6, 2023 · 13 comments
Open

Control remote sessions (DLNA) #377

provokateurin opened this issue Jan 6, 2023 · 13 comments
Labels
hacktoberfest Issues available for Hacktoberfest

Comments

@provokateurin
Copy link

Split off from #50

@provokateurin
Copy link
Author

@jmshrv I just looked at what the web UI does and it only uses the https://api.jellyfin.org/#tag/Session APIs to control the playback. This way it should probably be even simpler.

@provokateurin provokateurin changed the title Control server DLNA Control remote sessions (DLNA) Jan 6, 2023
@jmshrv
Copy link
Owner

jmshrv commented Jan 6, 2023

Ah yeah it should be easy if DLNA can be controlled there :)

Finamp should probably be controllable through the session API, but that'll be quite a niche and complex feature that's out of scope here anyway 🙃

@Chaphasilor
Copy link
Collaborator

Finamp should probably be controllable through the session API, but that'll be quite a niche and complex feature

I mean I honestly wouldn't mind if the next/prev track and play/pause buttons would be shown on the dashboard, but I'm guessing this requires a socket connection?

@provokateurin
Copy link
Author

That part can be implemented separately, but I agree it's probably a feature that's not going to be used much.

@jmshrv
Copy link
Owner

jmshrv commented Jan 6, 2023

but I'm guessing this requires a socket connection?

I'd assume so, I'd need to look for some documentation. Emby's doc on remote control only talks about controlling other clients, not about how to become a controllable session.

@provokateurin
Copy link
Author

Re-architecting this is quite hard. It's basically impossible to just make two separate classes with the different implementations. It's not as clean, but I think it actually makes more sense to just have the two implementations in the existing MusicPlayerBackgroundTask. This also makes it a lot easier to transition between the two implementations when playing something, because they know of each other.

@provokateurin
Copy link
Author

And I think some kind of WS will be required, because the clients need to be informed about changes of the session (e.g. play state). Not sure where to find documentation about that. Maybe it makes sense to implement the being-remote-controlled part first, because then we can already listen for those changes.

Sadly this seems to be a lot of work and I don't have enough time to get into this in the next few weeks. I can take a look again (hopefully) around mid February, but please don't have any expectations. I hope someone else can pick this up in the mean time :)

@Chaphasilor
Copy link
Collaborator

And I think some kind of WS will be required, because the clients need to be informed about changes of the session (e.g. play state).

Ahh right, because the playback happens server-side and could be influenced by the playback device itself (e.g. pressing a pause button on the speaker/tv).

As for documentation, if there really is nothing to be found, the source code of the Jellyfin app should offer some insights. That's one of the clients supporting remote control, afaik. The Jellycon Kodi addon as well, but that's not a mobile client.

@jmshrv
Copy link
Owner

jmshrv commented Jan 7, 2023

This also makes it a lot easier to transition between the two implementations when playing something, because they know of each other

Ah yes that's true, I didn't consider how awkward ripping out the whole player backend mid-playback would be.

Sadly this seems to be a lot of work and I don't have enough time to get into this in the next few weeks

That's fine, I also have exams that I should probably be revising for coming up soon so I won't be as active 🙃

@provokateurin
Copy link
Author

As for documentation, if there really is nothing to be found

I didn't search for any documentation, I just assumed implementing doing anything for this feature is more work than I can do right now :(

@Chaphasilor
Copy link
Collaborator

No worries! You could also start setting things up and maybe implement a bit while you have time, so that others can pick up where you left off! You don't have to do this in one go :)

@provokateurin
Copy link
Author

Will do, wasn't that much though

@b3nis
Copy link

b3nis commented Sep 19, 2023

I am here cheering on any progress on this!

Sadly, I am no developer. Happy to QA if that is needed in the future.

@Chaphasilor Chaphasilor added the hacktoberfest Issues available for Hacktoberfest label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues available for Hacktoberfest
Projects
Status: Todo
Development

No branches or pull requests

4 participants