Plushcap here!
We introduced virtual backgrounds to our Daily Prebuilt Electron demo, allowing participants to set their own custom background images during video calls. We created a new feature that enables users to select from pre-loaded background images or upload their own custom ones. The application uses two renderer processes: one for the main call window and another for the background selection window, which communicate through Electron's contextBridge. When the Daily call object is fully set up and ready to receive background updates, we enable the background feature by creating a background selection window and setting it to "try-enable-backgrounds". We then handle events sent from the main process to the renderer process, including setting and resetting backgrounds using Daily's updateInputSettings() API method. With this setup, users can set custom virtual backgrounds for their video calls, providing more flexibility and personalization options.