How do I customize what's shown when the video is turned off?

Is there a way to customize what is displayed on the screen when the speaker's camera is turned off during a stream?


Best Answer

  • jessmitch42
    jessmitch42 Member, Daily Alumni admin
    Answer ✓

    Hi there! Great question. There are a few options for customizing what is shown when the speaker/host's camera is turned off...

    1. By default, a black tile with a "person" icon is shown. If that doesn't work for you, there are a few custom options.
    2. You can do this with the VCS baseline composition. (Here’s our simulator to test out different parameter options.) Essentially, what you need to do is create a full screen image that you show with the showImageOverlay value when the video is turned off, and hide that fullscreen image when the video gets turned back on. You can listen for the participant-updated event to know if the video was turned off/on and then call updateLiveStreaming()(link) with the baseline composition params. The one thing to be aware of is that the image you're displaying when the video gets turned off needs to be made available via the session_assets option when you call startLiveStreaming()
    3. You could also do this with the VCS SDK to show an image. This is more complicated but will give you more options for what the feed looks like when the video is off. There's a Daily tutorial on making custom VCS components. It's not about this use case but is helpful for getting comfortable with the VCS SDK.
    4. Finally, we'll be letting developers choose what to display instead of the person icon when the camera is off. That's not available just yet but will be soon. :)

    Here's some example code for option two.