Posts: 36
Joined: Jan 2014
Reputation:
0
Hi
The addon I am working on provides a category to play Youtube Videos. XBMC itself ships a Youtube Plugin. I was wondering it is possible to pass URL of youtube video from my plugin to external youtube plugin, it then plays video? Also I want user can get back to my original plugin.
Thanks
Posts: 793
Joined: Oct 2010
Reputation:
17
Yes, instead of setting your list item's URL to plugin://plugin.video.myplugin, set it to plugin://plugin.video.YouTube?mode=foo&bar=baz
Obviously, those params are examples so you'll have to take a look at the YouTube plugin to see what params you need to pass
Posts: 36
Joined: Jan 2014
Reputation:
0
I tried using the exact URL used for youtube plugin but it's getting stuck, not loading the plugin at all. My question was, will it load it seperately?
Posts: 9
Joined: Dec 2013
Reputation:
0
And if I want to open a FOLDER ListItem from another plugin, is it possible ?
I would like to open Discovery Channel within my Addon.
I did extract the URL of Discovery Channel using xbmc.log in plugin.video.discovery_com
But, just like you said, it doesn't work using RunPlugin. No error, xbmc just opens an empty folder.
Here's my code :
xbmc.executebuiltin( 'RunPlugin(plugin://plugin.video.discovery_com/?channelID=Discovery&channelThumb=%2fhome%2fjp%2f.xbmc%2faddons%2fplugin.video.discovery_com%2fresources%2fthumbs%2fdiscovery_channel.png&mode=listShows&type&url=http%3a%2f%2fdsc.discovery.com%2fvideos)' )
Posts: 9
Joined: Dec 2013
Reputation:
0
2014-01-19, 16:26
(This post was last modified: 2014-01-19, 16:26 by JohnSea2.)
xbmc.executebuiltin works, but I cannot navigate back to my Addon, that said, the addDirectoryItem solution works like a charm !
Thanks man, I can now built my own Addon with all the goodies :-)
Posts: 43
Joined: Nov 2013
Just in case people come across this thread like I did and want to know what built-in function to use to play a Youtube video, you can use this:
Code:
xbmc.executebuiltin('PlayMedia(plugin://plugin.video.youtube/?action=play_video&videoid=<VIDEO-ID>)')
I found this useful for playing a Youtube video from the context menu.