i dont wanna pay 100 bucks apple
This commit is contained in:
parent
64444b2123
commit
fc86783b5f
1 changed files with 19 additions and 9 deletions
|
@ -74,14 +74,24 @@ const app = new Vue({
|
||||||
|
|
||||||
document.addEventListener('musickitloaded', function() {
|
document.addEventListener('musickitloaded', function() {
|
||||||
// MusicKit global is now defined
|
// MusicKit global is now defined
|
||||||
MusicKit.configure({
|
fetch("https://beta.music.apple.com/")
|
||||||
developerToken: '',
|
.then(response => response.text())
|
||||||
app: {
|
.then(data => {
|
||||||
name: 'My Cool Web App',
|
var el = document.createElement("html");
|
||||||
build: '1978.4.1'
|
el.innerHTML = data;
|
||||||
}
|
var u = el.querySelector(`[name="desktop-music-app/config/environment"]`)
|
||||||
|
var amwebCFG = JSON.parse(decodeURIComponent(u.getAttribute("content")));
|
||||||
|
console.log(amwebCFG.MEDIA_API.token)
|
||||||
|
MusicKit.configure({
|
||||||
|
developerToken: amwebCFG.MEDIA_API.token,
|
||||||
|
app: {
|
||||||
|
name: 'My Cool Web App',
|
||||||
|
build: '1978.4.1'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setTimeout(()=>{
|
||||||
|
app.init()
|
||||||
|
}, 1000)
|
||||||
});
|
});
|
||||||
setTimeout(()=>{
|
|
||||||
app.init()
|
|
||||||
}, 1000)
|
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue