# Difference in Browser functionality

**URL:** <https://devforum.zoom.us/t/difference-in-browser-functionality/49175>\
**Category:** Web\
**Created:** [April 29, 2021, 12:22pm UTC](https://devforum.zoom.us/t/difference-in-browser-functionality/49175 "2021-04-29T12:22:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpDominik](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rpDominik](https://devforum.zoom.us/u/rpDominik)\
**Post date:** [April 29, 2021, 12:22pm UTC](https://devforum.zoom.us/t/difference-in-browser-functionality/49175/1 "2021-04-29T12:22:24Z")

</div>

**Description**  
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.

**Differences**

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

> stream.getReceivedVideoDimension()

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?**  
1.0.2

**Device:**

> - Device: PC
> - OS: Windows 10
> - Browser: Edge, Firefox

> - Device: Mac
> - OS: macOS
> - Browser: Safari, Chrome

> - Device: Samsung S9
> - OS: Android
> - Browser: Chrome

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 29, 2021, 8:25pm UTC](https://devforum.zoom.us/t/difference-in-browser-functionality/49175/2 "2021-04-29T20:25:18Z")

</div>

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.

```javascript
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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 30, 2021, 6:25am UTC](https://devforum.zoom.us/t/difference-in-browser-functionality/49175/3 "2021-05-30T06:25:29Z")

</div>

Closed on May 30, 2021, 6:25am UTC

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