Skip to content
Snippets Groups Projects
Verified Commit 7a6ba83d authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Handle Cross-Origin canvas error in player

parent b20b1acc
No related branches found
No related tags found
1 merge request!816Front-end minor fixes / error handling
Pipeline #4513 passed
...@@ -356,7 +356,11 @@ export default { ...@@ -356,7 +356,11 @@ export default {
return return
} }
let image = this.$refs.cover let image = this.$refs.cover
this.ambiantColors = ColorThief.prototype.getPalette(image, 4).slice(0, 4) try {
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment