# Share-content-dimension-change event always returns undefined width and height

**URL:** <https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337>\
**Category:** Web\
**Created:** [August 24, 2021, 9:39am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337 "2021-08-24T09:39:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel.chappuis](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@daniel.chappuis](https://devforum.zoom.us/u/daniel.chappuis)\
**Post date:** [August 24, 2021, 9:39am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/1 "2021-08-24T09:39:17Z")

</div>

**Description**

I subscribe to the ‘share-content-dimension-change’ callback in order to receive notifications when the shared content dimension changed. The callback is working, but in parameter, the payload is always the following one:

{  
type: “received”,  
width: undefined,  
height: undefined  
}

Therefore, I don’t know the width and height of the shared content.

**Error**  
There is no error message.

**Which Web Video SDK version?**  
1.1.3

**Device (please complete the following information):**

- Device:
- OS: Linux
- Browser:Chromium
- Browser Version Chromium 91.0.4472.101

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 24, 2021, 7:04pm UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/2 "2021-08-24T19:04:04Z")

</div>

Hey @daniel.chappuis ,

Thanks for reporting this. We will take a look. 🙂 (ZOOM-302478)

-Tommy

---

<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:** [August 25, 2021, 1:45am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/3 "2021-08-25T01:45:09Z")

</div>

Hey @daniel.chappuis

Thanks for your feedback. We’ve found this issue and it was fixed [in version 1.1.4](https://www.npmjs.com/package/@zoom/videosdk).

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![daniel.chappuis](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@daniel.chappuis](https://devforum.zoom.us/u/daniel.chappuis)\
**Post date:** [September 24, 2021, 8:32am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/4 "2021-09-24T08:32:11Z")

</div>

Hey !

Thanks for your fix. Unfortunately, I still receive ‘share-content-dimension-change’ events with undefined ‘width’ and ‘height’ with Zoom Video SDK (Web) v1.1.4 on Chrome 93 for instance.

---

<div class="post-metadata">

**Author:** ![nickuk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nickuk/32/31345_2.png) [@nickuk](https://devforum.zoom.us/u/nickuk)\
**Post date:** [September 24, 2021, 11:35am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/5 "2021-09-24T11:35:46Z")

</div>

Hey @daniel.chappuis,

I’m on macOS, Chrome 93 and using v1.1.4 and I am correctly receiving the height and width within the object returned for ‘share-content-deimension-change’. Have you tried it on Chrome on a different OS to see if it works to help the Zoom guys pinpoint the issue?

Cheers 🙂  
Nick

---

<div class="post-metadata">

**Author:** ![daniel.chappuis](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@daniel.chappuis](https://devforum.zoom.us/u/daniel.chappuis)\
**Post date:** [September 24, 2021, 12:18pm UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/6 "2021-09-24T12:18:23Z")

</div>

After more tests, it seems to be working on Windows with Chrome 93. I was testing on Linux Ubuntu with Chrome 93. There, it is not working. It is also not working with Firefox on Ubuntu.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 24, 2021, 8:50pm UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/7 "2021-09-24T20:50:45Z")

</div>

Thanks for sharing @nickuk .

@daniel.chappuis , it seems like the issue could be with Ubuntu. CC @vic.yang .

-Tommy

---

<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:** [September 26, 2021, 9:00am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/8 "2021-09-26T09:00:07Z")

</div>

Hey @daniel.chappuis

Thanks for your feedback.

We have tested the receiving sharing on Chrome 93 and Firefox, Ubuntu platform. And it works well. Could you help confirm using the latest code? Browser cache sometimes may be the potential cause.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![daniel.chappuis](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@daniel.chappuis](https://devforum.zoom.us/u/daniel.chappuis)\
**Post date:** [September 27, 2021, 8:16am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/9 "2021-09-27T08:16:41Z")

</div>

Actually, I was also able to reproduce this on Chrome on Windows 10.

As you can see in the following screenshot, I start to share the screen on the Firefox browser (left) and receiving a shared screen on the Chrome browser (right) both on Windows 10. The content dimension is correct on the left (type=sended) but undefined width/height on the right (type=received).

 ![ZoomShareIssue](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/b/1b6b3f986d45a397ef41050e3fe459319b4ebba0.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 27, 2021, 7:11pm UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/10 "2021-09-27T19:11:12Z")

</div>

Hey @daniel.chappuis ,

Thanks for sharing the screen shots! Can you please also share your code snippets and steps to reproduce the issue? 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![daniel.chappuis](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@daniel.chappuis](https://devforum.zoom.us/u/daniel.chappuis)\
**Post date:** [October 8, 2021, 8:38am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/11 "2021-10-08T08:38:12Z")

</div>

I have been able to solve my issue. It seems to be due to the fact that I was hiding the ‘source’ screen-share canvas with CSS display:none because it did not wanted to display the screen on the user that was sharing his/her screen.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 8, 2021, 9:31pm UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/12 "2021-10-08T21:31:57Z")

</div>

Happy to hear you resolved the issue @daniel.chappuis ! 🙂

Please let us know if you need anything else.

-Tommy

---

<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:** [November 8, 2021, 7:32am UTC](https://devforum.zoom.us/t/share-content-dimension-change-event-always-returns-undefined-width-and-height/56337/13 "2021-11-08T07:32:26Z")

</div>

Closed on November 8, 2021, 7:32am UTC

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