I'm building a client - can anyone help me with my transcoding URL issues?

Hello, Plex Dev Forum! I’ve been building Coax, a plex companion app, for the last few months, and while beta testing it with folks over on Reddit, it has come to my attention that the video stream will just stop sometimes. I’ve instrumented the http connections the app makes when streaming to one of these servers, and it looks like the connection just closes with no error message or explanation.

It seems like most Plex Media Server setups are able to handle the transcode URL requests just fine, and keep them alive for as long as the user is streaming. But I’ve seen instances where the stream just stops without an error, and the app doesn’t keep requesting data from the server. I’m assuming it has something to do with the transcoding session because the same server will keep the direct play URL stream alive.

My understanding is that most client apps use libmpv or similar and build a streaming URL using the Metadata.Media.Parts[0].key value for a given media item. I’m reticent to do this because I’d much rather rely on the AVFramework provided by Apple (this app is native SwiftUI), which restricts me to using transcoding (and I know doesn’t support all Dolby Vision codecs, but that’s a separate issue).

If you can help me figure this out, I can give you lifetime access to the app when it launches! Thanks in advance :slight_smile:

Is your app reporting the timeline state during playback?

https://developer.plex.tv/pms/#tag/Timeline/operation/timelinePostSlash