2013-08-12, 18:18
I'm developing an XBMC add-on for a website that's basically a collection of YouTube-embedded videos arranged in a certain way. So each clip on the website is actually a YouTube video.
I wouldn't like to reinvent the wheel and recreate the code for sniffing the direct stream URL for a given YouTube video. Ideally, I'd rather reuse the functionality that's already in the YouTube add-on, namely the YouTubePlayer.buildVideoObject() method.
So is there a way for me to use those YouTube add-on's methods in my own add-on? I tried copying over YouTubePlayer.as but I'm getting a bunch of errors of the type
Any hints please?
I wouldn't like to reinvent the wheel and recreate the code for sniffing the direct stream URL for a given YouTube video. Ideally, I'd rather reuse the functionality that's already in the YouTube add-on, namely the YouTubePlayer.buildVideoObject() method.
So is there a way for me to use those YouTube add-on's methods in my own add-on? I tried copying over YouTubePlayer.as but I'm getting a bunch of errors of the type
Code:
File "addon.py", line 14, in index
( video, status ) = player.YouTubePlayer().buildVideoObject(params)
File "YouTubePlayer.py", line 60, in __init__
self.xbmcgui = sys.modules["__main__"].xbmcgui
AttributeError: 'module' object has no attribute 'xbmcgui'
Any hints please?