How i can catch onAction from Player?
#1
Hallo,

i´m a XBMC- Scipting/Python beginner and i wrote my first script.
So i know how i can catch the Events for my own dialog:
Code:
dev onAction(self, action)

My script starts the Player: Player().play(...). And now i want to show my own Dialog if the user push the "i" button.

How i can do this?

Thx
strgalt
Reply
#2
I'm curious about this, too. I'd really like to be able to catch certain keys while a video is playing, even if I'm restricted to keys that don't have any existing specified function.
Reply
#3
Ok, found the solution in another thread. If you create your own WindowDialog class, you can doModal after you start a video and the onAction event will process in your class.
Reply
#4
I don´t understand. The "doModal" is an method from the windowclass - where i can use it after starting the player?
Code:
import xbmc, xbmcgui

ACTION_ENTER = 7
ACTION_ZURUECK = 10

class MyClass(xbmcgui.Window):
    def onAction(self, action):
        if action == ACTION_ZURUECK:
            self.close()
        if action == ACTION_ENTER:
            m = "http://127.0.0.1:7522/upnp/channelstream/6.ts"
            xbmc.Player().play(m)

MyPlug = MyClass()
MyPlug.doModal()
del MyPlug

thx
strgalt
Reply
#5
ok, thats nice !

Thx
strgalt
Reply

Logout Mark Read Team Forum Stats Members Help
How i can catch onAction from Player?0