Bug 235030 - There is a big delay of video media stream if we share screen by getDisplayMedia in Safari from different MacOS desktops
Summary: There is a big delay of video media stream if we share screen by getDisplayMe...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) Unspecified
: P1 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-10 06:27 PST by walter
Modified: 2023-09-18 07:15 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description walter 2022-01-10 06:27:20 PST
If we share screen by API "getDisplayMedia" in Safari on different MacOS desktops, there will be a big delay in the shared video media streaming.
In other words, If we share screen in Safari in same desktop, that’s ok.   

The problem is found on Safari15, MacOS 11.x/12.x with Intel CPU. 


# Steps:

1. Alice join an online meeting by Safari
2. Bob also join the online meeting by other browsers, such as Chrome, Firefox or Safari.
3. Alice start to share her screen, auto play a PPT or video clip, such as https://www.youtube.com/watch?v=b96TnabpVyo in full screen or in another desktop



# Expect Result:

Bob should see shared screen video normally.

# Actual Result:

After a while, Bob see shared screen video freeze frequently, sometimes, freeze time exceeds 60 seconds.

I wrote an example to duplicate the issue: https://github.com/walterfan/webrtc_remote_sharing
Comment 1 Radar WebKit Bug Importer 2022-01-10 07:15:11 PST
<rdar://problem/87339054>
Comment 2 youenn fablet 2022-01-16 23:03:11 PST
I tried the repro case, but I did not reproduce the freeze.
I am unclear whether freeze is happening on generation side (getDisplayMedia) or in the transmission chain.
Can you send me privately a sysdiagnose (youenn@apple.com) if you can reproduce on most recent MacOS version, with the timing of the freezes?
Comment 3 walter 2022-01-17 18:38:20 PST
Sorry for the confusion.  My local video file is large, so I give a youtube url. 
You need to download the video file and playback it in local in full screen or different desktop.

I can reproduce the issue 100%

Please let me know if you need any recording or sysdiagnose
Comment 4 PhungDuong 2022-07-18 01:43:51 PDT
We also had the same problem with iPhone 7 iOS 14, and 15.

When joining a WebRTC video call and sharing screen, after about 30 minutes, the iPhone 7 gets hotter than usual, then the video on the share screen is delayed from 2 to 4 seconds. The audio also sounds laggy and unstable.

But with other devices like iPhone 6, iPhone 8, X, etc., it does not have the above problem.
Comment 5 youenn fablet 2023-06-06 00:57:23 PDT
getDisplayMedia has changed a lot behind the scenes.
Is it still reproducing on recent macOS?
If not, we should probably close the bug.
Comment 6 youenn fablet 2023-09-18 07:15:52 PDT
Closing as Configuration Change given the getDisplayMedia backend changed a lot. Please reopen if needed with repro steps (and or send a sysdiagnose privately to me).