daily-co / daily-js

https://docs.daily.co/reference/daily-js
BSD 2-Clause "Simplified" License
103 stars 33 forks source link

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

Closed quando1910 closed 8 months ago

quando1910 commented 9 months ago

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 },
    },
    },
    });
kompfner commented 8 months ago

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 },
    },
  },
});
kompfner commented 8 months ago

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

Thanks again for reporting 🙇

markbackman commented 8 months ago

@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.