Handle Cross-Origin canvas error in player
This commit is contained in:
parent
b20b1accff
commit
7a6ba83d03
|
@ -356,7 +356,11 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let image = this.$refs.cover
|
let image = this.$refs.cover
|
||||||
|
try {
|
||||||
this.ambiantColors = ColorThief.prototype.getPalette(image, 4).slice(0, 4)
|
this.ambiantColors = ColorThief.prototype.getPalette(image, 4).slice(0, 4)
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Cannot generate player background from cover image, likely a cross-origin tainted canvas issue')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleError({ sound, error }) {
|
handleError({ sound, error }) {
|
||||||
this.$store.commit("player/isLoadingAudio", false)
|
this.$store.commit("player/isLoadingAudio", false)
|
||||||
|
|
Loading…
Reference in New Issue