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

Disabling Local Video Track On All SDKs Other Than JS SDK Causes Stream To Be Force Stopped #6605

Closed lastpeony closed 1 month ago

lastpeony commented 1 month ago

In JavaScript, when a user toggles off the camera, the local video track is not disabled; instead, it continues sending black frames. However, in all other SDKs, toggling off the camera disables the local video track, causing the client to stop sending video frames to the server.

The checkIfPacketsAreBeingReceived feature, implemented in version 2.11.0, checks if the server is receiving video packets. If no video packets are received within a timeout period, the stream is forcefully stopped. This behavior leads to streams being incorrectly removed when users toggle off their cameras, except in the JavaScript SDK.

Possible fix: remove video check or make this check work only if certain appsetting is enabled