List of event types for app.listen?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: List of event types for app.listen?

Re: List of event types for app.listen?

by DaledeSilva » Mon Aug 14, 2023 9:21 am

Just thought I'd have a deeper think about your new link so I could give you some feedback.
To start off, please note that it's way nicer to use, but here's something that I think could help.

When I look at the page, I still find that I get a strong overload of visual noise that makes it hard to scan the page without an overwhelming and slightly lost feeling.

I think there's a few things that can help with this if you have that level of control and don't mind me suggesting.
I'll reference this page: https://www.mediamonkey.com/docs/apinew ... indow.html
  • The left padding of the main body area could be 3-4 times as large to allow it some space to breath and feel more seperate.
  • In the main body area, if the breadcrumb and title were sticky as the user scrolled the page, it would help them stay oriented.
  • In the main body area, you could drop the icons nexts to each method name, interface name, etc. And just put the icon next to the headings for those sections. This will remove a lot of noise on the page and also help highlight the hierarchy of the headings.
    (Note, I'm not talking about the menu on the left, it's really good that they're on every line there).
Here's a quick example. You might notice that I've de-emphasised the H3s a little so that they're not competing with everything else on the page, and I've added some vertical padding between boxes.

Image


Also, at this point I realised I've give a lot of unrequested feedback and in a thread about something else, so please forgive my digression! Use only what you feel helps you!

Re: List of event types for app.listen?

by DaledeSilva » Mon Aug 14, 2023 8:44 am

drakinite wrote: Mon Jul 31, 2023 12:57 pm Just to make sure I understand, are you speaking about just the old documentation, or do you feel the same about the new documentation?
Apologies for taking so long to reply.
I was talking only about this API reference:
https://www.mediamonkey.com/docs/api/

However, I have been jumping between that and these two:
https://www.mediamonkey.com/wiki/Gettin ... 8Addons%29
http://mediamonkey.com/wiki/Important_M ... s_(Addons)

And find the fact that they're all separate difficult in itself as I will often be spending time in the API only to realise there's important knowledge I need to consider from the other two.
At a base level, for example, one that I can quantify is that I don't believe it's possible to know that an API method you're looking at in the API reference will only work if called from a specific file.

I know all that's more than you asked for, but just putting here in case it helps.

Re: List of event types for app.listen?

by drakinite » Mon Jul 31, 2023 12:57 pm

DaledeSilva wrote: Fri Jul 21, 2023 10:08 am I haven't used your link much yet, but just the fact that I can do a search and have it search more than class and module names (ie. I can search by method or event names), is fantastic.
Glad to hear it's more helpful now!
DaledeSilva wrote: Fri Jul 21, 2023 10:08 am The developer documentation has been is soooo hard to figure anything out :(
I really feel like I'm missing a link that everyone else has or something.
Just to make sure I understand, are you speaking about just the old documentation, or do you feel the same about the new documentation?

Re: List of event types for app.listen?

by DaledeSilva » Fri Jul 21, 2023 10:08 am

drakinite wrote: Mon Jun 12, 2023 6:36 pm FYI, there's been a new development since the last discussion on this thread. I've written code which parses our Delphi code declarations and translates it into TypeScript, meaning that we now have much more complete documentation for native classes, functions/methods, and events. Before, only classes/methods/events that had JSDoc comments manually written out were included in the API documentation. The new site is a work in progress, but you can see the documentation for Player here: https://www.mediamonkey.com/docs/apinew ... layer.html
Note that the actual events don't have "event_" before it. It's just a quirk of how I had to get the parser to work with TypeDoc.
I haven't used your link much yet, but just the fact that I can do a search and have it search more than class and module names (ie. I can search by method or event names), is fantastic.

The developer documentation has been is soooo hard to figure anything out :(
I really feel like I'm missing a link that everyone else has or something.

Re: List of event types for app.listen?

by drakinite » Mon Jun 12, 2023 6:36 pm

FYI, there's been a new development since the last discussion on this thread. I've written code which parses our Delphi code declarations and translates it into TypeScript, meaning that we now have much more complete documentation for native classes, functions/methods, and events. Before, only classes/methods/events that had JSDoc comments manually written out were included in the API documentation. The new site is a work in progress, but you can see the documentation for Player here: https://www.mediamonkey.com/docs/apinew ... layer.html
Note that the actual events don't have "event_" before it. It's just a quirk of how I had to get the parser to work with TypeDoc.

Re: List of event types for app.listen?

by DaledeSilva » Sun Jun 04, 2023 7:21 am

Degeim wrote: Thu Sep 09, 2021 2:50 am The "change" event works; it seems to fire twice when a track is added to the list, but I can work my way around that. It's still a lot faster than the MM4 COM API!

I had completely missed the event tab in the documentation. I'll make sure to remove the prefix and lower-case them.

Thank you very much!
omg. I'd also missed the event tab. Thanks for mentioning it.

Re: List of event types for app.listen?

by Rama smith » Thu Jan 20, 2022 6:56 am

Thanks for providing event list to make app.listen.

Re: List of event types for app.listen?

by Degeim » Thu Sep 09, 2021 2:50 am

The "change" event works; it seems to fire twice when a track is added to the list, but I can work my way around that. It's still a lot faster than the MM4 COM API!

I had completely missed the event tab in the documentation. I'll make sure to remove the prefix and lower-case them.

Thank you very much!

Re: List of event types for app.listen?

by Ludek » Wed Sep 08, 2021 11:14 am

I think this should work:

Code: Select all

app.listen( player.getSongList(), 'change', ()=>{
	// playing list changed
});
BTW seeing that in our documentation the events are incorrectly prepended with 'on' prefix (like 'onChange' while it should be just 'change') :
https://www.mediamonkey.com/webhelp/MM5 ... dList.html

Similarly within the app object:
https://www.mediamonkey.com/webhelp/MM5 ... s/App.html

I'll correct this and ask for updating the docs.
Workaround is to remove the on prefix and lower-case it.

List of event types for app.listen?

by Degeim » Wed Sep 08, 2021 8:12 am

I would like to listen to various events in order to track the playback state of MediaMonkey 5. Per now, I have found the relevant "playbackState", "shufflechange" and "repeatchange" events, but I need to detect changes in the current playback queue (player.getSongList()) as well. Is there an event for this?

And more generally, is there a list of events somewhere that I could look up?

Top