Something not working in a specific client and asking how to create the VideoClipObject are 2 different things.
@Cigaras: a couple of things:
If you’re sending variables other then text to a function with a route, you have to specify the type of variable. In this case the variable include_container is a boolean:
Add the “shortcut” function HTTPLiveStreamURL to your key. This will set most of the MediaObject details (like codecs) automatically. Drop the PlayVideo callback function, it is not needed in your code:
Thank You @sander1, but my final PlayVideo function does some stuff before playing the video, to be precise it sets http header, like HTTP.SetHeader('User-Agent', Prefs['user_agent']). Alternatively I guess I could set the header in CreateVideoClipObject but as preferences can be changed after creating the VideoClipObject it wont have effect until I “restart” the main menu if I understand how this works correctly…
I get FrameworkException: No route found matching ‘/video/hlstest/playvideo.m3u8’
my tests shows that pms in this cases needs .m3u8 as appendix to the route, if the url ends with m3u8. The function itself doesn’t need it: @route(PREFIX + ‘/playvideo.m3u8’)
def playvideo(url):
/R
@Cigaras said:
Or I can drop the route decoration and it will work, but what is the right way intended to be used by Plex?
I don’t know, but I assume sander1 has the right answer (I’m also waiting for it)
/R
@Cigaras said:
Or I can drop the route decoration and it will work, but what is the right way intended to be used by Plex?
I don’t know, but I assume sander1 has the right answer (I’m also waiting for it)
/R
I forgot about that You can just name your route to what PMS is expecting:
@route(PREFIX + '/playvideo.m3u8')
Routes are not required, but they give cleaner URLs in your PMS log files and are easier to read.