How to determine the reason for stop?

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

Moderators: jiri, drakinite, Addon Administrators

Unknown

Re: How to determine the reason for stop?

Post by Unknown »

Yes, I am able to set the track that should be played next. I am already doing that using app.player.setPlaylistPosAsync(...) in the 'end' state of playbackState event, as I already did before when I used SDB.Player.CurrentSongIndex = ... in the OnPlaybackEnd event.

However, as I said, with such implementation there is always possibility for an unpleasant sound interruption between tracks. And I really don't like when users blame my scripts for limitations of MM API. I already had a fair share of that with old MM, I don't need it again with MM5.

My first suggestion is not needed if you implement the second suggestion with this condition: 2a) getNextTrack returns undefined in the 'end' state if it is completeEnd, 2b) getNextTrack returns an existing track in the 'end' state if it is the end caused by user. But I need to repeat, you need to allow it in the Shuffle mode; it is no important when that mode is switched off.

And after more thinking, I am not sure if just adding a new setNextTrack method would be enough. I need to be able to use that method immediately before the 'end' state, i.e. as later in the playback of track as it is possible, but also immediately before your program already decides which track is going to be played next. So, maybe one new event would be needed in the place when your program decides which is the next track.

I don't know how your program is doing playback internally, and maybe I am suggesting something that is simply not possible. It would be best if you exposed that part of the program in JavaScript as you did with GUI.
Post Reply