Difference in Browser functionality

I already know that there are differences on functionality when it comes to video rendering and so on.
But I also found SDK functions that would give me different results in different browsers, which leads to mistakes on usage.


stream.updateVideoCanvasDimension(canvas, 1600, 900);

I´m sure the difference of functionality with this function on firefox and other browsers is the fixed Single View for Firefox and Safari. The dimension will scale the canvas to “big pixels” on firefox, as there is only one video rendered. On other browsers, it will take the width and height and snip out a piece of my stream with the given height and width. I think this happens, because there can be multiple rendered videos in other browsers. If I´m wrong about that, don´t mind to correct me on that.

Another question about the function: Is it possible to update the size of the video canvas, after it is rendered. I have to call the function live in my browser to see it working. If I call it before the renderVideo() function the result will be an error, or won´t do anything.


Also this function has different results. In Edge and Chrome (Mac) it doesn´t give and width and height (just 0). In Firefox on the other hand there will be the width and height (640, 360) which is 360p. If there is a 4:3 video and I want to adjust to that, I would need information about the width and height of the receiving video though. Maybe you can help with this.

If I find other functions with different results I´ll try to add them.

Which Web Video SDK version?


  • Device: PC
  • OS: Windows 10
  • Browser: Edge, Firefox
  • Device: Mac
  • OS: macOS
  • Browser: Safari, Chrome
  • Device: Samsung S9
  • OS: Android
  • Browser: Chrome

Hey @rpDominik
Thanks for sharing your experience with Video SDK.

stream.updateVideoCanvasDimension(canvas, 1600, 900);

The purpose of this method is to notify Video SDK to update the size of the canvas since it has been transferred to OffscreenCanvas. My advice, you can wrap setting width/height in a try-catch block.

try {
  canvas.width = width;
  canvas.height = height;
} catch (e) {
  stream.updateVideoCanvasDimension(canvas, width, height);

stream.getReceivedVideoDimension() method is not suitable for multi-videos and we will deprecate it in future release. For now, you can not adjust the aspect ratio of the rendering video, please stay tuned to our changelog.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.