AppleMusicPlayerMiddleware

class AppleMusicPlayerMiddleware(developerTokenProvider: AppleMusicTokenProvider) : 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.

Constructors

Link copied to clipboard
constructor(developerTokenProvider: AppleMusicTokenProvider)

Properties

Link copied to clipboard
open override val capabilities: StateFlow<Set<MapGptCapability>>
Link copied to clipboard
Link copied to clipboard
open override val playbackState: StateFlow<MusicPlayerState?>
Link copied to clipboard
open override val provider: MusicPlayerProvider.Apple

Functions

Link copied to clipboard
open override fun createContext(androidContext: Context): MusicPlayerContext
Link copied to clipboard
fun detach()
Link copied to clipboard
open override fun next()
Link copied to clipboard
open override fun onAttached(middlewareContext: MusicPlayerContext)
Link copied to clipboard
open override fun onDetached(middlewareContext: MusicPlayerContext)
Link copied to clipboard
open override fun pause()
Link copied to clipboard
open override fun play(providerUri: String)
Link copied to clipboard
open override fun previous()
Link copied to clipboard
open override fun registerPermissionLauncher(musicPlayerContext: MusicPlayerContext, activityResultCaller: ActivityResultCaller)
Link copied to clipboard
open override fun resume()
Link copied to clipboard
open override fun seek(position: Float)
Link copied to clipboard
open override fun setRepeatMode(mode: MusicPlayerState.RepeatMode)
Link copied to clipboard
open override fun setShuffleMode(mode: MusicPlayerState.ShuffleMode)
Link copied to clipboard
open override fun stop()
Link copied to clipboard
open override fun unregister(activityResultCaller: ActivityResultCaller)