Created
April 18, 2021 20:50
-
-
Save seresk/322f608d4ec26842754f5ce2af7ac775 to your computer and use it in GitHub Desktop.
MusicKit initialization script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('musickitconfigured', function () { | |
console.log('musickitconfigured event triggered'); | |
}) | |
document.addEventListener('musickitloaded', function () { | |
// MusicKit global is now defined | |
MusicKit.configure({ | |
developerToken: 'YOUR DEVELOPER TOKEN HERE', | |
app: { | |
name: 'My Cool Web App', | |
build: '1978.4.1' | |
} | |
}); | |
//console.log("MusicKit configured.") | |
const event = new Event('musicKitConfigured'); | |
document.dispatchEvent(event) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment