automatically init musickit

This commit is contained in:
booploops 2021-12-02 21:59:42 -08:00
parent dea0e5693d
commit 56a475d904

View file

@ -8,6 +8,7 @@ var app = new Vue({
methods: { methods: {
init() { init() {
this.mk = MusicKit.getInstance() this.mk = MusicKit.getInstance()
this.mk.authorize()
this.$forceUpdate() this.$forceUpdate()
}, },
mkReady() { mkReady() {
@ -41,10 +42,13 @@ var app = new Vue({
document.addEventListener('musickitloaded', function() { document.addEventListener('musickitloaded', function() {
// MusicKit global is now defined // MusicKit global is now defined
MusicKit.configure({ MusicKit.configure({
developerToken: 'put key here pls', developerToken: '',
app: { app: {
name: 'My Cool Web App', name: 'My Cool Web App',
build: '1978.4.1' build: '1978.4.1'
} }
}); });
setTimeout(()=>{
app.init()
}, 1000)
}); });