automatically init musickit
This commit is contained in:
parent
dea0e5693d
commit
56a475d904
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue