Hello,
I am developing a plex channel plugin but I am a bit stuck in the basics.
I am trying to just play a single video like that:
def EpisodeMenu():
oc = ObjectContainer()
oc.add(EpisodeObject(url = "http://81.21.47.74/media2/anixtigrammi/145709400156/2311ed92ab42504e75f9ebee8a8189dc.mp4",title = "anoixti"))
return oc
This doesn’t work. However, when I replace the url with a youtube video it works just fine. What am I doing wrong?
To use the url field in the EpisodeObject() or VideoClipObject(), there must be a URL Service for the website. That is why it works with YouTube videos, because a URL service for YouTube already exists. A URL service is the back end programming for Plex channels that tells the Plex players how to play the media. Plex requires that you give a link to the media stream as well as information about that media, so the various Plex players will know how to play it.
Just like PlexIt will only works on Supported Plex It! Websites, channels only play media if either there is already an existing URL service, you create a new URL service for the website, or you build the media objects within the channel code.
Here is a link to the URL services that are available - github.com/plexinc-plugins/Services.bundle/tree/master/Contents/Service%20Sets and here is a link to a simple channel that does not use a URL Service and builds the media object in the channel plugin - github.com/plexinc-plugins/HGTV.bundle/blob/master/Contents/Code/init.py