NEWBIE - Playing audio content on iOS devices
I'm not much of a coder but I can follow the logic of code decently and I'm fairly ok at troubleshooting issues. I've been trying to update some channels that seem to be abandoned to work with the iOS player. I keep receiving the "Unable to start a playback session" error. Could someone please post a working example of the CreateTrackObject or point me to a post? I've searched the forums but could have missed it. That way I can start with something that works and then I can fool with breaking it. Any help will be greatly appreciated!
Here's what I'm working with on the PlexPod plugin. I already can follow that the url, title, thumb, and summary seem to be correctly associated earlier in the code.
`def CreateTrackObject(url, title, thumb, summary, include_container=False):
if url.endswith('.mp3'): container = 'mp3' audio_codec = AudioCodec.MP3 else: container = Container.MP4 audio_codec = AudioCodec.AAC track_object = TrackObject( key = Callback(CreateTrackObject, url=url, title=title, thumb=thumb, summary=summary, include_container=True), rating_key = url, title = title, thumb = thumb, summary = summary, duration = 10000, items = [ MediaObject( parts = [ PartObject(key=url) ], container = container, audio_codec = audio_codec, audio_channels = 2 ) ] ) if include_container: return ObjectContainer(objects=[track_object]) else: return track_object`
Main Server: 2009 Mac Pro - 8 Cores @ 2.93 GHz, 32 GB RAM, Mac OS X 10.12.5
Secondary Server: Seagate Personal Cloud
Clients: iOS, PlexWeb, & Roku