From 8d353a27a9137bf19076fa8a805709d31cb9ceb5 Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Wed, 1 Feb 2023 13:59:11 +0100 Subject: [PATCH] fix: #2052 Part-of: --- front/src/components/Queue.vue | 49 ++++++++++++++++--------- front/src/components/common/Tooltip.vue | 20 +++++++--- front/src/locales/en_US.json | 3 +- front/src/style/components/_queue.scss | 5 +++ 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/front/src/components/Queue.vue b/front/src/components/Queue.vue index 2d2428137..91c6c9968 100644 --- a/front/src/components/Queue.vue +++ b/front/src/components/Queue.vue @@ -168,7 +168,16 @@ enum CoverType { MILK_DROP } +let isWebGLSupported = false +try { + const canvas = document.createElement('canvas') + isWebGLSupported = !!canvas.getContext('webgl2') +} catch (error) {} + const coverType = useStorage('queue:cover-type', CoverType.COVER_ART) +if (!isWebGLSupported) { + coverType.value = CoverType.COVER_ART +}