Structure

MusicKit.Events

A dictionary containing events for a MusicKit instance.

Declaration

dictionary MusicKit.Events {
    string authorizationStatusDidChange;
    string authorizationStatusWillChange;
    string eligibleForSubscribeView;
    string loaded;
    string mediaCanPlay;
    string mediaItemDidChange;
    string mediaItemWillChange;
    string mediaPlaybackError;
    string metadataDidChange;
    string playbackBitrateDidChange;
    string playbackDurationDidChange;
    string playbackProgressDidChange;
    string playbackStateDidChange;
    string playbackStateWillChange;
    string playbackTargetAvailableDidChange;
    string playbackTimeDidChange;
    string playbackVolumeDidChange;
    string primaryPlayerDidChange;
    string queueItemsDidChange;
    string queuePositionDidChange;
    string storefrontCountryCodeDidChange;
    string storefrontIdentifierDidChange;
    string userTokenDidChange;
};

Topics

Instance Properties

authorizationStatusDidChange

A notification name indicating a change in the authorization status.

authorizationStatusWillChange

A notification name indicating an upcoming change in the authorization status.

eligibleForSubscribeView

A notification name indicating a user is eligible for a subscribe view.

loaded

A notification name indicating MusicKit JS is loaded.

mediaCanPlay

A notification name indicating the player has obtained enough data for playback to start.

mediaItemDidChange

A notification name indicating that the currently-playing media item has changed.

mediaItemWillChange

A notification name indicating the currently-playing media item is about to change.

mediaPlaybackError

A notification name indicating that the player has thrown an error during playback.

metadataDidChange

A notification name indicating the media item's metadata has finished loading.

playbackBitrateDidChange

A notification indicating the playback bit rate has changed.

playbackDurationDidChange

A notification name indiciating the current playback duration changed.

playbackProgressDidChange

A notification name indicating the current playback progress changed.

playbackStateDidChange

A notification indicating the playback state has changed.

playbackStateWillChange

A notification indicating the playback state is about to be changed.

playbackTargetAvailableDidChange

A notification indicating that a playback target's availability has changed .

playbackTimeDidChange

A notification name indicating the current playback time has changed.

playbackVolumeDidChange

A notification name indicating the player volume has changed.

primaryPlayerDidChange

A notification name indicating the playback has started in another context on your domain, and the current player has stopped playback.

queueItemsDidChange

A notification name indicating that the items in the current playback queue have changed.

queuePositionDidChange

A notification name indicating that the current queue position has changed.

storefrontCountryCodeDidChange

A notification name indicating a change in the storefront country code.

storefrontIdentifierDidChange

A notification name indicating that the device's inferred storefront identifier changed.

userTokenDidChange

A notification name indicating the user token changed.

See Also

Utilities

formatArtworkURL

Returns a formatted artwork URL.

formattedMilliseconds

Returns an object with milliseconds formatted into hours and minutes.

formattedSeconds

Returns an object with seconds formatted into hours and minutes.

generateEmbedCode

Generates Apple Music web player markup.