Remote video image is distorted

Description

Hello. I am rendering the video of remote participants with reference to the following URL, but the video is distorted as shown in the attached image (see Screenshots).

I have implemented it with the contents of Single HTML canvas rendering.

It occurs with high probability when participants are using Mac + Microsoft Edge.

Is there any solution?
I will provide any necessary information.

Thanks.

Browser Console Error

The following warning message was displayed.

  1. [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWirkletNoe instead. (Wpisz Worklet audio  |  Blog  |  Chrome for Developers)
  2. not sharing decode type

Which Web Video SDK version?

I’m using the SDK version 1.10.8.

Video SDK Code Snippets

videoClient.getAllUser().forEach(async (user) => {
  if (user.bVideoOn) {
    await videoClient.getMediaStream().renderVideo(
      document.getElementById("remote-video-canvas") as HTMLCanvasElement,
      user.userId,
      1920,
      1080,
      0,
      0,
      3
    );
  }
});

const peerVideoStateChange = async (payload: {
  action: "Start" | "Stop";
  userId: number;
}): Promise<void> => {
  console.log("peer-video-state-change");
  if (payload.action === "Start") {
    await videoClient
      .getMediaStream()
      .renderVideo(
        document.getElementById("remote-video-canvas") as HTMLCanvasElement,
        payload.userId,
        1920,
        1080,
        0,
        0,
        3
      );
  } else if (payload.action === "Stop") {
    await videoClient
      .getMediaStream()
      .stopRenderVideo(
        document.getElementById("remote-video-canvas") as HTMLCanvasElement,
        payload.userId
      );
  }
};

To Reproduce(If applicable)

  1. Participant A is using Mac + Edge, and join the room,
  2. Participant B is using Windows + Chrome, and join the room.
  3. Both remote video images are distorted.

Screenshots

Device

  • Participant A
    • Apple M1 Pro macOS Sonoma 14.4.1
    • Microsoft Edge 123.0.2420.65
  • Participant B
    • Windows 11 Pro 23H2 22631.3296
    • Google Chrome 123.0.6312.86

Hey @urano

Thanks for your feedback.

From the code snippet, it seems like you’re overlapping multiple users’ videos, which could cause distortion in the video frames.

If you don’t want to manually calculate the coordinates of the videos, you can use the Individual HTML elements method to layout the users’ videos.

Thanks
Vic

@vic.yang

Thank you for your answer.

My web service being developed will be a one-on-one videoconference.
Therefore, there is only one remote video drawn to an area and the local video is drawn to a different area.

Also, if you do not use Edge, the problem does not occur.

Is there any other cause?
Thanks

Hey @urano

Thank you for providing me with more details.

We’ve encountered similar issues before, and we’re currently investigating the root cause of this issue.

Thanks
Vic

@vic.yang

Resolved!

The cause was Edge settings.

It occurred when Enhance your security on the web was turned on.
Turning it off or adding the URL to Never use enhanced security for these sites solved the problem (^^)

However, it is difficult to get users to set this setting, so we would like to solve this problem without setting it if possible.

I will mark it as resolved.
If you can find a fundamental solution, I would be happy to hear about it.