Firefox is having issues with screen sharing

Description
When I share my screen with Firefox, part of the screen is enlarged and I cannot see the whole screen.

Browser Console Error
no error

Which Web Video SDK version?
1.8.2

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. start video
  2. Click on Start screen sharing

Device (please complete the following information):

  • Device: MacBook Air M1 2020
  • OS: macOS 13.4.1
  • Browser: Firefox
  • Browser Version: 115.0.2

Hey @takeshi.odaka

Thanks for your feedback.

Is SharedArrayBuffer enabled on Firefox?

Could you try to use stream.updateSharingCanvasDimension to update the size of the canvas?

Thanks
Vic

Hey @vic.yang

thank you for the advice.

SharedArrayBuffer is disabled in Firefox.

I tried stream.updateSharingCanvasDimension but no improvement.

I will describe the specific process flow, so please check if there are any problems.

stream.startShareScreen(targetElement)

stream.updateVideoCanvasDimension(canvasElement, width, height)
.then(() => {
  stream.adjustRenderedVideoPosition(
    canvasElement,
    zoomSessionId,
    width,
    height,
    0,
    0
  ).then(() => {      
stream.value?.updateSharingCanvasDimension(width, height)
})

Thanks
Takeshi

Hey @takeshi.odaka

What’s the difference between stream and stream.value?

Could you confirm that targetElement and canvasElement are different elements and the targetElement matches the condition of stream.isStartShareScreenWithVideoElement ?

stream. updateSharingCanvasDimension is used on the receiving side, it’s aimed to solve the issue of partial display or unclear sharing content.

Thanks
Vic

Hey @vic.yang

thank you for making sure

There was an error in the description of targetElement and canvasElement.
Because stream.value was not written correctly
We will send you the correct code.

I’m sorry again, but please check

stream.startShareScreen(canvasElement)

stream.updateVideoCanvasDimension(canvasElement, width, height)
.then(() => {
  stream.adjustRenderedVideoPosition(
    canvasElement,
    zoomSessionId,
    width,
    height,
    0,
    0
  ).then(() => {      
stream.updateSharingCanvasDimension(width, height)
})

Thanks
Takeshi

Hey @takeshi.odaka

Does this code run on Firefox side?

stream.startShareScreen(canvasElement)

Does the following code run on another device?

stream.updateVideoCanvasDimension(canvasElement, width, height)
.then(() => {
stream.adjustRenderedVideoPosition(
canvasElement,
zoomSessionId,
width,
height,
0,
0
).then(() => {
stream.updateSharingCanvasDimension(width, height)
})

There is one limitation that video and sharing cannot use the same canvas to render.

Thanks
Vic

Hey @vic.yang

Thank you for confirming.

We will reply to your inquiry.

Does this code run on Firefox side?

stream.startShareScreen(canvasElement)

The following code is executed when screen sharing is started in Firefox.

Does the following code run on another device?

stream.updateVideoCanvasDimension(canvasElement, width, height)
.then(() => {
stream.adjustRenderedVideoPosition(
canvasElement,
zoomSessionId,
width,
height,
0,
0
).then(() => {
stream.updateSharingCanvasDimension(width, height)
})

We have confirmed that it works on Chrome and Firefox.

There is one limitation that video and sharing cannot use the same canvas to render.

We are aware of this.
Video and Share don’t use the same canvas.

I have learned two things about the behavior of screen sharing in Firefox, so I will tell you.

  • It was confirmed that the screen sharing status becomes normal when the display size of the enlarged application is changed after screen sharing the application.

  • We were able to confirm that the screen can be displayed correctly when sharing the screen of the application displayed on the external monitor when Firefox is displayed on the external monitor.

Do you have any idea how to improve something from this phenomenon?

Please check

Thanks

Takeshi

Hey @takeshi.odaka

Thanks for sharing the info with us.

Did you have screen scaling set on either of the two monitors?

I found a similar issue in Bugzilla, maybe it’s the issue with Firefox itself.

Thanks
Vic

Hey @vic.yang

Thank you for confirming.
Thank you for reporting the bug in Firefox.

There was a description in the URL you sent that the screen sharing screen will be enlarged on Google Meet, so
We have confirmed, but we could not confirm the occurrence on Google Meet.

Screen sharing can be performed normally with version 1.5.5 of the Web Video SDK,
It started happening after upgrading to version 1.8.2.
Is this issue caused by the web video SDK version?

Thanks
Takeshi

Hey @vic.yang

It looks like you haven’t responded to my last post yet.
I would appreciate it if you could provide me with some advice or information regarding my question.
Thank you

Thanks
Takeshi

Hey @takeshi.odaka

Sorry for the late reply.

Would you mind reporting the logs to us when the issue occurs?

Starting from Video SDK Web 1.8.5, we provide the client-side telemetry feature, here is the usage:

Thanks
Vic