Skip to content
Client
Server

Reference / @open-music-sdk/browser / tMusicKit

Interface: tMusicKit ​

Defined in: integrations/browser/src/connect.ts:8

Apple's script, as the helper uses it: the global it defines, MusicKit.

Methods ​

configure() ​

ts
configure(options): 
  | tMusicKitInstance
| Promise<tMusicKitInstance>;

Defined in: integrations/browser/src/connect.ts:18

Apple's own: configures the script for one app, with the developer token its requests carry. Called once per page by the first helper, and again after a configuration that failed.

Parameters ​

options ​

The developer token, and the app as the script is told of it.

app ​

tConnectApp

developerToken ​

string

Returns ​

| tMusicKitInstance | Promise<tMusicKitInstance>

The configured instance, or a promise of it, as the script's version gives it.

Throws ​

Whatever Apple's script throws or rejects with when it refuses the token or the app; the helper hands it on as it came, through ready and connect().

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.