-
Notifications
You must be signed in to change notification settings - Fork 0
/
MusicKit.Events.d.ts
194 lines (194 loc) · 7.31 KB
/
MusicKit.Events.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
declare namespace MusicKit {
/**
* A dictionary containing events for a MusicKit instance.
*/
interface Events {
/**
* A notification indicating an audio track has been added to the media element.
* Consumers should access the audioTracks field on the MusicKit instance.
*/
audioTrackAdded: unknown;
/**
* A notification indicating the playing audio track has changed.
* Consumers should access the audioTracks field on the MusicKit instance to determine the currently enabled track.
*/
audioTrackChanged: unknown;
/**
* A notification indicating an audio track has been removed from the media element.
* Consumers should access the audioTracks field on the MusicKit instance.
*/
audioTrackRemoved: unknown;
/**
* A notification name indicating a change in the authorization status.
*/
authorizationStatusDidChange: { authorizationStatus: AuthStatus[keyof AuthStatus] };
/**
* A notification name indicating an upcoming change in the authorization status.
*/
authorizationStatusWillChange: unknown;
/**
* A notification name for indicating the current buffer progress changed.
*/
bufferedProgressDidChange: unknown;
/**
* A notification indicating that the capabilities available for playback controls have changed.
*/
capabilitiesChanged: unknown;
/**
* A notification that is fired when a MusicKit on the Web instance has been configured.
*/
configured: unknown;
/**
* A notification for indicating that media playback has fallen back to preview mode due to an inability to configure DRM for the current item in the current environment.
*/
drmUnsupported: unknown;
/**
* A notification name indicating a user is eligible for a subscribe view.
*/
eligibleForSubscribeView: unknown;
/**
* A notification indicating the text track to use for forced subtitles has changed.
*/
forcedTextTrackChanged: unknown;
/**
* A notification name indicating MusicKit JS is loaded.
*/
loaded: unknown;
/**
* A notification name indicating the player has obtained enough data for
* playback to start.
*/
mediaCanPlay: unknown;
/**
* A notification indicating a new media element was created. The element is passed as the event data.
*/
mediaElementCreated: unknown;
/**
* A notification name indicating that the currently-playing media item has
* changed.
*/
mediaItemStateDidChange: unknown;
/**
* A notification name indicating the currently-playing media item is about
* to change.
*/
mediaItemStateWillChange: unknown;
/**
* A notification name indicating that the player has thrown an error during
* playback.
*/
mediaPlaybackError: unknown;
/**
* A notification indicating that the skip intro period has been reached.
*/
mediaSkipAvailable: unknown;
/**
* A notification indicating the the next item should be shown
*/
mediaUpNext: unknown;
/**
* A notification name indicating the media item's metadata has finished
* loading.
*/
metadataDidChange: unknown;
/**
* A notification for indicating the currently-playing MediaItem is about to be changed.
*/
nowPlayingItemWillChange: { item: MediaItem};
/**
* A notification for indicating the currently-playing MediaItem has changed.
*/
nowPlayingItemDidChange: { item: MediaItem};
/**
* A notification indicating the playback bit rate has changed.
*/
playbackBitrateDidChange: unknown;
/**
* A notification name indicating the current playback duration changed.
*/
playbackDurationDidChange: unknown;
/**
* A notification name indicating the current playback progress changed.
*/
playbackProgressDidChange: { progress: number };
/**
* A notification indicating the playback state has changed.
*/
playbackStateDidChange: { oldState: PlaybackStates; state: PlaybackStates; nowPlayingItem: MediaItem };
/**
* A notification indicating the playback state is about to be changed.
*/
playbackStateWillChange: { oldState: PlaybackStates; state: PlaybackStates; nowPlayingItem: MediaItem };
/**
* A notification indicating that a playback target's availability has changed.
*/
playbackTargetAvailableDidChange: unknown;
/**
* A notification name indicating the current playback time has changed.
*/
playbackTimeDidChange: unknown;
/**
* A notification name indicating the player volume has changed.
*/
playbackVolumeDidChange: unknown;
/**
* A notification for indicating the type of player changed; e.g. from music to video.
*/
playerTypeDidChange: unknown;
/**
* A notification name indicating the playback has started in another context
* on your domain, and the current player has stopped playback.
*/
primaryPlayerDidChange: unknown;
/**
* A notification indicating the queue data has been loaded and the queue is ready to play.
*/
queueIsReady: unknown;
/**
* A notification name indicating that the items in the current playback
* queue have changed.
*/
queueItemsDidChange: unknown;
/**
* A notification name indicating that the current queue position has changed.
*/
queuePositionDidChange: unknown;
/**
* A notification indicating that the current queue repeat mode has changed.
*/
repeatModeDidChange: unknown;
/**
* A notification indicating that the current controller shuffle mode has changed.
*/
shuffleModeDidChange: unknown;
/**
* A notification name indicating a change in the storefront country code.
*/
storefrontCountryCodeDidChange: unknown;
/**
* A notification name indicating that the device's inferred storefront
* identifier changed.
*/
storefrontIdentifierDidChange: unknown;
/**
* A notification indicating a text track has been added to the media element.
*/
textTrackAdded: unknown;
/**
* A notification indicating the playing text track changed.
*/
textTrackChanged: unknown;
/**
* A notification indicating a text track has been removed from the media element.
*/
textTrackRemoved: unknown;
/**
* A notification indicating the media element has reached a timed metadata event.
*/
timedMetadataDidChange: unknown;
/**
* A notification name indicating the user token changed.
*/
userTokenDidChange: unknown;
}
}