MusicKit Web Playback States

In MusicKit Web the playback states are provided as numbers.

For example the playbackStateDidChange event listener will return:

{oldState: 2, state: 3, item:...}

When the state changes from playing (2) to paused (3).

Those are pretty easy to guess, but I'm having a hard time with some of the others: completed, ended, loading, none, paused, playing, seeking, stalled, stopped, waiting.

I cannot find a mapping of states to numbers documented anywhere. I got the above states from an enum in a d.ts file that is often incorrect/incomplete.

Can someone help out pointing to the docs or provide a mapping?

Thanks.

I could be wrong, but I think that the numbers might actually be the order of these here, if they were an array.

Would be nice if those docs were updated.

MusicKit Web Playback States
 
 
Q