Controlling the player within MP .... (1 Viewer)

hagur

Portal Member
September 4, 2004
21
1
Hi,

I'm developing a process plugin for Media Portal which provides remote control capabilities via HTTP.

I'm having problems performing the basic playback functions, like play, pause, stop, next, prev etc. etc.

The code I'm using is something í "stole" from the MCERemote plugin which is a part of the Media Portal project. But ... the code has been disabled, like it's no longer in use.

Here's an example of what I'm doing, but I get no response from MP.

Code:
	case "play" :
		action = new Action(Action.ActionType.ACTION_PLAY,0,0);
	break;
          
	case "pause" :
		action = new Action(Action.ActionType.ACTION_PAUSE,0,0);
	break;

I've tried all the available actions available in the ActionType class, but
it seems as if this action syntax is no longer working at all.

How can I pass those commands to MP from within my plugin ?

BTW, sending dialog commands works perfectly, such as:

Code:
GUIMessage msgHome = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW,0,0,0,(int)GUIWindow.Window.WINDOW_HOME,0,null);
GUIWindowManager.SendThreadMessage(msgHome);
 

scrappy.doo

Portal Pro
September 5, 2005
51
0
I think this piece of code explains it all

Code:
Action ac = new Action(Action.ActionType.ACTION_MOVE_UP,0,0);
GUIGraphicsContext.OnAction(ac);
 

LordMessi

Retired Team Member
  • Premium Supporter
  • July 4, 2005
    449
    0
    44
    Ørsø, Dronninglund, Denmark
    Home Country
    Denmark Denmark
    hagur said:
    Hi,

    I'm developing a process plugin for Media Portal which provides remote control capabilities via HTTP.

    I'm having problems performing the basic playback functions, like play, pause, stop, next, prev etc. etc.

    The code I'm using is something í "stole" from the MCERemote plugin which is a part of the Media Portal project. But ... the code has been disabled, like it's no longer in use.

    Here's an example of what I'm doing, but I get no response from MP.

    Code:
    	case "play" :
    		action = new Action(Action.ActionType.ACTION_PLAY,0,0);
    	break;
              
    	case "pause" :
    		action = new Action(Action.ActionType.ACTION_PAUSE,0,0);
    	break;

    I've tried all the available actions available in the ActionType class, but
    it seems as if this action syntax is no longer working at all.

    How can I pass those commands to MP from within my plugin ?

    BTW, sending dialog commands works perfectly, such as:

    Code:
    GUIMessage msgHome = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW,0,0,0,(int)GUIWindow.Window.WINDOW_HOME,0,null);
    GUIWindowManager.SendThreadMessage(msgHome);

    Hi,

    This functionality is already present in Media Portal Webinterface.
     

    Users who are viewing this thread

    Top Bottom