Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🐛(frontend) prevent black background image

Florent Chehabbfbfade99a87
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66eda099..ee69132b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ and this project adheres to
- ✨(backend) add authenticated user rate throttling on request-entry #1129
- ✨(backend) expose `is_active` field for Application in Django admin #1133
- ✨(file-upload) disable by default & limit count by user #1141
+- ✨(frontend) custom background #1067
### Changed
@@ -65,7 +66,6 @@ and this project adheres to
### Added
- ✨(backend) add file upload feature #1030
-- ✨(frontend) custom background #1067
## [1.9.0] - 2026-03-02
diff --git a/src/frontend/src/stores/userChoices.ts b/src/frontend/src/stores/userChoices.ts
index 3ab607ef..0d3e89d5 100644
--- a/src/frontend/src/stores/userChoices.ts
+++ b/src/frontend/src/stores/userChoices.ts
@@ -35,10 +35,29 @@ subscribe(userChoicesStore, () => {
saveUserChoices(userChoicesStore, false)
})
+// we run some logic on store loading to check if the processor config is still valid
if (userChoicesStore.processorConfig?.type === ProcessorType.VIRTUAL) {
if (userChoicesStore.processorConfig.imagePath.startsWith('blob:')) {
// this happens when a not authenticated user had changed their background image
- // we restore their last processor config to avoid displaying a black screen.
+ // we restore clear the processor config to avoid displaying a black screen.
userChoicesStore.processorConfig = undefined
+ } else if (userChoicesStore.processorConfig.fileId) {
+ // Checking if the image is still available / accessible
+ await fetch(userChoicesStore.processorConfig.imagePath, {
+ // We bypass the cache to ensure we have access
+ cache: 'reload',
+ })
+ .then((response) => {
+ // if we cannot fetch the image (likely a 401 from the backend because
+ // the user is not logged in anymore, etc.),
+ // we clear the processor config to avoid displaying a black screen.
+ // This can happen when the user logs out for instance, etc.
+ if (!response.ok) {
+ userChoicesStore.processorConfig = undefined
+ }
+ })
+ .catch(() => {
+ userChoicesStore.processorConfig = undefined
+ })
}
}