INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: WebRemote API docs/pointers?  (Read 3162 times)

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35
WebRemote API docs/pointers?
« on: June 09, 2003, 01:27:29 pm »

I'm working on building a Girder client (using LUA) to interface with WebRemote (or is it now called Remote Server?)  using MC 9.  I see that it is accessible via http, which is nice.   I've also seen by sniffing Glissando packets that there is an XML based protocol available as well, which would be nicer to work with programmatically than html output.

I see from the sniffing that there are commands like 'initialize' and 'getUpdate', etc.., in the form:
<?xml version='1.0'?>
<REQUEST command="getUpdate" value="" />

terminated by the null char \0

with responses looking like:
<RESPONSE>
<UPDATE>
<TRACKLENGTH>0</TRACKLENGTH>
<PLAYBACKPOSITION>0</PLAYBACKPOSITION>
<PLAYLISTLENGTH>10</PLAYLISTLENGTH>
<PLAYLISTPOSITION>3</PLAYLISTPOSITION>
<PLAYBACKSTATUS>0</PLAYBACKSTATUS>
<CURRENTVOLUME>100</CURRENTVOLUME>
<SHUFFLESTATUS>0</SHUFFLESTATUS>
<CONTINUOUSSTATUS>0</CONTINUOUSSTATUS>
</UPDATE>
</RESPONSE>(again terminated with null \0)


Are there any docs/posts/source describing this XML-based protocol?  My searching came up with nothing.

I have been able to replicate this XML communication in Girder Lua using Lua socket support, and I could probably get other commands by further Glissando sniffing, but official docs would be much handier!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: WebRemote API docs/pointers?
« Reply #1 on: June 14, 2003, 06:54:48 am »

It isn't officially documented yet.  It was co-developed by the Girder and NetRemote authors, and we just include it with MC.

You could talk to the guys in charge or either of those projects, or if you want to work on the source, let us know.

Thanks!
Logged
Matt Ashland, JRiver Media Center

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: WebRemote API docs/pointers?
« Reply #2 on: June 16, 2003, 03:39:42 pm »

Hello.

I want the source to the web remote plugin 1.07, which understands XML.  I can only find the .dll for this version on your plugins page, and you MJ8 Developers Zone only has the source for the older, version 1.06.  The MC9 DevZone does not mention webremote.

Thanks!
Howard
Logged

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35
Re: WebRemote API docs/pointers?
« Reply #3 on: June 17, 2003, 11:32:34 am »

Quote

You could talk to the guys in charge or either of those projects, or if you want to work on the source, let us know.


Thanks for the response!

I might be interested in working on the source in the future, but for now I've been able to get pretty far along using the http interface to the WebRemote for my current project.  Maybe it's just my systems but when I test Glissando or my own XML code with any version of MC, I'm getting a "Media Core" crash and MC dies.  The http interface has been stable for me so I've been working with that to get data from MC into Girder scripts.

The project I'm currently working on is to provide remote control access to MC media library/playlists with voice feedback (via the Girder Say Plugin).  I use an RF remote (X10 MP3 Remote) which has great range and works through walls, so I often find myself controlling MC far away from the computer screen (using the MCC commands for playback control), but without any feedback.  WebRemote and Speech synthesis provide a way to get that feedback.

I've created an "alpha" Girder group to provide Text-To-Speech access to the Media Library, with the abliity to play the currently selected tree node.  This Girder "group" can be downloaded at:
http://mybulkmail1212.tripod.com, then select MC_WebRemote.zip
This is basically a proof-of-concept version, to see how voice-synthesized feedback might work.  You can navigate the MC tree and play any item under Media Library.

You will need to set the host and port name for your WebRemote/Media Server.  To do this, in girder once you have loaded the gml file, select the "MC WebRemote -> init -.. -> local init" tree node, then select "Script".  This will open a file where the top lines will show you how to set the hostname/port. If you don't have a remote to configure, you can try using F5 (test a command) to test the various buttons, or use the keyboard plugin to map keys(like the keys on the keypad) to the various commands.  Currently you need to run the "MC WebRemote -> init -.." once to initialize the LUA scripts before any of the other commands will work.  To do this, select "MC WebRemote -> init -.." and press F5.  Also, as a general Girder tip, remeber to enable input devices by selecting F9 so that you get a green circle in the lower right hand status bar

Also, to try a simpler task to test out the speech capability, here is a Grider group that will speak the "Listening To ..." text, triggered by a remote control button press. http://mybulkmail1212.tripod.com, then select MC_Speak_Currently_Playing.zip  This doesn't actually use WebRemote like the other Girder group, but rather uses a MCC command to copy the "Listening to" from MC to the clipboard, strips off the extra text, then speaks the text.  Make sure you don't minimize MC while running this command, because MCC commands don't work when MC is minimized (at least they don't for me).  If you don't have a remote,  just press F5 on the Girder command "Speak Currently Playing"  to test the command.


This is my first crack using Girder and Lua, so I don't expect these will work perfectly for everyone the first go around, though I did make an effort to make the Girder Groups user-friendly, and I tested them on a separate system.

You will need to enable the LuaSockets plugin and the Say plugin in Girder.  

The Say plugin basically use MS SAPI, which is installed by default under Windows XP (I think).  For other windows version, this girder page has a download for the MS Speech API: http://www.girder.nl/misc.php


The speech functionality works but you might wonder how to deal with the problem of having the speech audio garbled by the currently played song's audio. Well, with my SB Live card using the KX drivers (http://www.kxproject.com/), I get multiple virtual sound devices for the same card, tied to the same master volume.  This allows me to decrease just the MC wave volume way down while speaking any text at the standard volume, then I return the MC wave volume to its previous volume.  Alternatively, you could set Girder to pause and unpause MC between any the speech.

Enjoy, and let me know if you give it a try or have any suggestions.
Logged

mjcumming

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 53
  • nothing more to say...
Re: WebRemote API docs/pointers?
« Reply #4 on: June 22, 2003, 05:50:08 pm »

I have just gotten LUACOM working with girder.  I am working on interfacing LUA with MC9 with COM.  So far it seems to be working....

email me at michael.cumming@iname.com
Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: WebRemote API docs/pointers?
« Reply #5 on: October 03, 2003, 06:41:24 pm »

Quote
.... or if you want to work on the source, let us know.

Thanks!


Hi, Matt, I do, indeed, want to work with the webremote 1.07 source.  Can I please have it?

Thanks,
Soundman
Logged
Pages: [1]   Go Up