daily-co/daily-js

new version is no longer support custom background image with base64 format anymore?

quando1910 opened this issue · 3 comments

I use latest version 0.59.0, then realize that new version is no longer support custom background image with base64 format anymore while the old version 0.48.0 does. Is this intentional or a bug?

Expected behavior

If this is a bug. so my expectation is it should be support in new version.

Describe the bug (unexpected behavior)

It always throw the error when using base64
Screenshot 2024-02-29 at 11 39 37

Steps to reproduce

  1. use bas64 image.
  2. call the function updateInputSettings()
call.updateInputSettings({
  video: {
    processor: {
      type: 'background-image',
      config: { source: base64_image },
    },
  },
});

Thanks for reporting!

Until we have a fix, here's a workaround in the meantime:

const response = await fetch(base64_image);
const arrayBuffer = await response.arrayBuffer();
call.updateInputSettings({
  video: {
    processor: {
      type: 'background-image',
      config: { source: arrayBuffer },
    },
  },
});

We made a fix. You can expect it to land in the next version of daily-js.

Thanks again for reporting 🙇

@quando1910 we shipped the fix for this in daily-js 0.60.0 yesterday: https://github.com/daily-co/daily-js/releases/tag/daily-js-2024-03-06-0.60.0.