Hi, I have a question regarding how to create playback items for channel. I’ve follow through the “development Walkthrough” post and got an idea how to extract various video lists and structures from website using XPATH. I’ve been trying to understand how the actual media player object can be added.
As a test I found a url for a certain MP4 files online. When opening the .mp4 URL in chrome it’ll directly download the mp4 files. So I suppose this is the file stream that can be used for media playback. I gather from the framework documentation that I need to add a VideoClipObject, so I try the following, but the player would say there’s error playing this item. I tried to reference other plugins code, and a lot of them seems to be using URLService, but some also manage to use an all-in-init solution… Is the URLService required? Also I’m very puzzled, as to what needs to be returned to Plex for playback to work? Is working with the .mp4 file the correct approach? The .mp4 is extracted from the flash player from the website, but I don’t see the stream.moe as one of the URLservice in the bundle…
You have to create a media object xml document that includes a direct URL to the media stream. Each Plex player will use that document to determine how to play the media.
You can either create a separate URL service (see Services.bundle) or create a function in your plugin (See HGTV channel).
You can use http://localhost:32400/channels/all to see all the XML returned by channels. Then from that list, http://localhost:32400 plus the key value to see the various directories within a specific channel. You can also add the token if you are using HOME and add X-Plex-Platform= to see what is returned for a specific Plex player app.(But remember if the key value includes a ? then you have to change these extensions to &)