Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Next JS am getting Error : "The source image could not be decoded." #64

Open
rohanrana opened this issue Jun 20, 2024 · 1 comment
Open

Comments

@rohanrana
Copy link

Versions
Next JS : 13.5.5
React : 18.2.0

import React, { Fragment } from "react";
import { createVonageMediaProcessor } from "@vonage/ml-transformers";
import bg1 from "../../../public/images/videocall/bg3.jpg";  // image is locallay imported

  const config = {
  transformerType: "VirtualBackground",
  backgroundAssetUri: bg1,
};
class NonEMDRPatient extends React.Component {
  async componentDidMount() {

    const processor = await createVonageMediaProcessor(config);
    this.setState({
      processor: processor,
    });
  }  
applyBackground = async(assetUri) => {
    let { processor } = this.state;

    config.backgroundAssetUri = assetUri;
    await processor.setBackgroundOptions(config);
  };
  
    handleRadioChange = (e) => {
    let { publisherObj } = this.state;
    this.setState({ bgRadio: e.target.value }, () => {
    this.applyBackground(bg1);

         }
  }
}

Here is a screen shot of error
image

@rohanrana
Copy link
Author

@luqmanvonage @remi-deltombe-vonage please help on above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant