MM5 API with WebSockets in NodeJS

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

MyVikes
Posts: 47
Joined: Sun Jul 02, 2017 1:20 am

Re: MM5 API with WebSockets in NodeJS

Post by MyVikes »

Thanks Ludek

Where can i get additional info/documentation regarding the remoteRequest such as how to properly set the responseType? I've tried "json" and "application/json; charset=utf-8" to have the Content-Type set in the returned Headers but no luck. It's returning json text but just not recognized as such by Postman.
Ludek
Posts: 4136
Joined: Fri Mar 09, 2007 9:00 am

Re: MM5 API with WebSockets in NodeJS

Post by Ludek »

Hi, response headers settings isn't supported yet, just responseBody (as in the code example).
I'll add it to my TODO
MyVikes
Posts: 47
Joined: Sun Jul 02, 2017 1:20 am

Re: MM5 API with WebSockets in NodeJS

Post by MyVikes »

thumbs up and thanks!
Reto S.
Posts: 4
Joined: Mon Jul 05, 2021 3:45 am

Re: MM5 API with WebSockets in NodeJS

Post by Reto S. »

MyVikes wrote: Thu Jun 24, 2021 4:26 am thumbs up and thanks!
HI @MyVikes

I see you are working on a Remote Control (for yourself!?!) or do you plan to release this publicly as an App or something?
MyVikes
Posts: 47
Joined: Sun Jul 02, 2017 1:20 am

Re: MM5 API with WebSockets in NodeJS

Post by MyVikes »

TBD....i've thought about it but not sure if i want to support an app outside of my own use. :-)

i've been using it for a 1+ year and love it. except for ripping and cataloging my music collection i no longer use the MM interface.

It currently requires a VB.Net proxy communicating with the MM4 COM objects.

Primarily it allows me to quickly randomly select an album, select from n random albums (both using filters on genre, artist, etc. if desired), skip forward/backward, pause, progress to a point in the playing song, view current playlist and select a song to advance to, control MM volume and browse my library among other things. Also, it provides simple links to artist and album wiki along with a lyrics search. The song progress is a simple estimation based on the length of the song and a background timer but works fine for my use. I've thought of using an occasional ping of the server but haven't found it necessary.

I'm about 70% done migrating the VB.Net app to javascript leveraging the "app.listen(app, 'remoteRequest', (r) => {" web server recently added. So it would require just the MM5 addin javascript and then my app (Android only although i might use this as an opportunity to learn Swift). I'd written a React front end as a learning opportunity but after having it ~80% functional compared to the Android app i lost interest (:-)) and have stopped working on that.

The current performance is excellent and the MM5 javascript version thus far is comparable.

Here is a screenshot: https://www.dropbox.com/s/tqu04ewq37gtx ... 6.png?dl=0
Post Reply