Added hang timer
This commit is contained in:
parent
b30c5af46f
commit
1ae4261849
1 changed files with 10 additions and 1 deletions
|
@ -167,7 +167,8 @@ const app = new Vue({
|
||||||
currentSongInfo: {},
|
currentSongInfo: {},
|
||||||
page: "browse",
|
page: "browse",
|
||||||
pageHistory: [],
|
pageHistory: [],
|
||||||
songstest: false
|
songstest: false,
|
||||||
|
hangtimer: null
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
page: () => {
|
page: () => {
|
||||||
|
@ -183,6 +184,7 @@ const app = new Vue({
|
||||||
methods: {
|
methods: {
|
||||||
async init() {
|
async init() {
|
||||||
let self = this
|
let self = this
|
||||||
|
clearTimeout(this.hangtimer)
|
||||||
this.mk = MusicKit.getInstance()
|
this.mk = MusicKit.getInstance()
|
||||||
this.mk.authorize()
|
this.mk.authorize()
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
@ -1679,6 +1681,13 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Hang Timer
|
||||||
|
app.hangtimer = setTimeout(()=>{
|
||||||
|
if(confirm("Cider is not responding. Reload the app?")) {
|
||||||
|
window.location.reload()
|
||||||
|
}
|
||||||
|
}, 10000)
|
||||||
|
|
||||||
document.addEventListener('musickitloaded', function () {
|
document.addEventListener('musickitloaded', function () {
|
||||||
// MusicKit global is now defined
|
// MusicKit global is now defined
|
||||||
function initMusicKit() {
|
function initMusicKit() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue