Package-level declarations
Types
Link copied to clipboard
The class is responsible to authenticate the app to use Apple Music SDK with the token provided by the developerTokenProvider.
Link copied to clipboard
The class is a MiddlewareContext that can be used inside CoroutineMiddleware.onAttached to access it's properties for easy access.
Link copied to clipboard
open class AppleMusicContext(val authenticator: AppleMusicAuthenticator, val context: Context, val audioWidgetVisible: Flow<Boolean>, val viewModel: AppleMusicViewModel, val playerState: StateFlow<MusicPlayerState?>, val musicPlayer: MusicPlayer) : MusicPlayerContext
Contains properties specific to apple music player state and authentication.
Link copied to clipboard
data class AppleMusicPlaybackState(val playbackState: MusicPlayerState.PlaybackState, val position: Long, val duration: Long, val currentItem: PlayerMediaItem?, val queueItems: MutableList<PlayerQueueItem>, val playbackSpeed: Double, val shuffleMode: MusicPlayerState.ShuffleMode?, val repeatMode: MusicPlayerState.RepeatMode?) : MusicPlayerState
Implementation of Apple Music MusicPlayerState.
Link copied to clipboard
class AppleMusicPlayerComponents(val audioWidgetVisible: Flow<Boolean> = flowOf(false), val appleMusicViewModel: AppleMusicViewModel = AppleMusicViewModel())
Apple Music Player components.
Link copied to clipboard
class AppleMusicPlayerMiddleware(developerTokenProvider: AppleMusicTokenProvider, componentProvider: (context: Context) -> AppleMusicPlayerComponents = {
AppleMusicPlayerComponents()
}) : CoroutineMiddleware<MusicPlayerContext> , MusicPlayerMiddleware
A MusicPlayerMiddleware that uses the Apple Music SDK. Provide a AppleMusicTokenProvider to get the developer token and user token. Add the AppleMusicPlayerMiddleware to the DashMapGptConfig
to enable the music player.
Link copied to clipboard
Required for authenticating an app with Apple Music.
Link copied to clipboard
class AppleMusicViewModel
Apple Music View Model.
Link copied to clipboard
Music widget type.