Context menu option "play using .." missing my plugin.
#1
Hi, I want to use dvdplayer instead of mplayer in my VDR streaming plugin. Normally I would expect the "play using ..." entry in the context menu, but it is not there, probably because xbmc doesn't directly know from the url that this is going to be a video stream (just guessing) ?

Anyway, here is the url I get from my plugin that resolves to the corresponding channel on my VDR:

http://192.168.2.27:3000/PES/S19.2E-1-1079-28006

Anyway to get xbmc to recognise this as a video stream so I get the relevant context menu, or even better to just force dvdplayer to the stream ? I get out of sync audio with mplayer that I don't get with the xbmc windows port.

Plugin source here:

http://pastebin.com/m7903058b
Reply
#2
make your url fallback to the plugin and manually play the file. the disadvantage is you lose the abilty to queue multiple items.

or add your own context menu item to Play with DVDPlayer.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
Hm, I have to admit - I don't understand your suggestions Wink
Quote:make your url fallback to the plugin and manually play the file. the disadvantage is you lose the abilty to queue multiple items.
I have no idea what that means, yould you be so kind to maybe post example code ? Smile I was thinking I might have to add some kind of extension to the url, so xbmc knows it is a video stream, is that what you mean ?

Quote:or add your own context menu item to Play with DVDPlayer

How does that work ? That would be the ideal solution because after some tests I came to the conclusion that dvdplayer has some advantages, but also some disadavantages and I would like to be able to chose the player.
Reply
#4
add +"?.avi" etc
Reply
#5
i think voinage is drunk Tongue

here is what i use in AMTII plugin. these basically run the splugin again, with special parameters that you can parse and run the appropriate code.
PHP Code:
try:
                
# set context menu items
                
action1 "XBMC.RunPlugin(%s?Fetch_Showtimes=True&title=%s)" % ( sys.argv], urllib.quote_plusreprvideo"title" ] ) ), )
                
action2 "XBMC.RunPlugin(%s?Download_Trailer=True)" % ( sys.argv], )
                
listitem.addContextMenuItems( [ ( xbmc.getLocalizedString30900 ), action1, ), ( xbmc.getLocalizedString30910 ), action2, ) ] )
            
except:
                
pass 

you could do something similar to 1 but pass the url to play. then in your play() make sure you select the DVD Player as the core player. sys.argv[ 0 ] is the path to your current running plugin.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
Aha ! Thanks for the code snippet and the explanation, I always find it easier to grasp coding concepts with the relevant code in front of me. That should help to get going, thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Context menu option "play using .." missing my plugin.0