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

Add (PlaySession-)identifier to MediaStream #2935

Merged
merged 5 commits into from
Aug 3, 2023

Conversation

nielsvanvelzen
Copy link
Member

There is a bug in this change that causes the repeat mode to fail (all playback will stop and you need to manually select an item to get it going again). I found out repeat mode crashes the app on master though, so an improvement I guess? Will fix in a different PR.

We're also missing a preload implementation now (RIP gappless playback) but the old implementation was bad anyway, so will re-implement in a different PR as well.

Changes

  • Get play session id from backend
    Use the MediaInfo API to submit an (empty) device profile and get some playback information back
    We don't use most of the info and always attempt to direct stream right now because of course the client
    needs to determine which API to call for that instead of the backend returning a (signed) URL....
    We do have a PlaySessionId which I'm 99% I can generate client side as well....

  • Add AudioMediaStreamResolver
    To be honest still no idea what the difference between the two audio API's is...

  • Rewrite MediaStreamService as MediaStreamState
    This way the stream info is exposed to plugins

  • Use playSessionId in PlaySessionService
    See previous item

  • Fix ExoPlayerBackend not always playing requested stream
    This didn't really happen in the previous stream->backend code because it was always reset

Issues

Haven't had a chance to say this for a bit but this is as always a part of #1057!

@nielsvanvelzen nielsvanvelzen added enhancement New feature or request playback Issue related to media playback labels Aug 1, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Aug 1, 2023
}
}

private suspend fun setNext(stream: MediaStream) {

Check warning

Code scanning / detekt

Private function is unused and should be removed. Warning

Private function setNext is unused.

fun jellyfinPlugin(
api: ApiClient,
socketInstance: SocketInstance,
) = playbackPlugin {
provide(UniversalAudioMediaStreamResolver(api))
// TODO: Generate the device profile

Check warning

Code scanning / detekt

Flags a forbidden comment. Warning

Forbidden TODO todo marker in comment, please do the changes.
@nielsvanvelzen nielsvanvelzen marked this pull request as ready for review August 2, 2023 07:18
@nielsvanvelzen nielsvanvelzen merged commit 60b3fa1 into jellyfin:master Aug 3, 2023
5 checks passed
@nielsvanvelzen nielsvanvelzen deleted the playback-playsession branch August 3, 2023 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request playback Issue related to media playback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants