ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.24k stars 622 forks source link

Screen sharing while using external display freezes stream after some time #6590

Open unicornsoftwareinc opened 1 month ago

unicornsoftwareinc commented 1 month ago

Short description

Hi, I am consistently having an issue across various Ant Media versions (2.6.2, 2.10) where if I am using an external display, and then start sharing my screen with the webcam in the corner, after a bit of time, the stream freezes for people attempting to play the stream. The screen sharing still looks like it is working / not frozen for the publisher however.

As soon as I switch back to webcam only, the stream unfreezes for anyone playing the stream. Unplugging the external display seems to fix the issue almost immediately as well.

I am seeing this issue both in our production app AND when testing using the publish & play pages found at /samples.html.

Environment

Device: Apple M1 Max MacBook Pro, macOS 14.3.1 (23D60) Browsers: Chrome / Firefox Ant Media Server versions: 2.6.2 & 2.10 External display: Apple Studio Display

Steps to reproduce

  1. Connect to an external display and start publishing a screen share WITH the webcam in the corner.
  2. Attempt to play the stream and wait a bit of time (usually a minute or two) and observe the video freezes.

Expected behavior

Screen sharing with webcam in corner should not freeze while using an external monitor.

Actual behavior

Screen sharing with webcam in corner freezes while using an external monitor.