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.29k stars 635 forks source link

Unexpected increase in the number of viewers #4199

Open mekya opened 2 years ago

mekya commented 2 years ago
  1. Create two conference rooms with multitrack. Let's say one for conferencer and one for listeners.
  2. Assume that there are 5 guys in conferencer and Lots of guys are watching the listener room. Add/remove different conferencers to listener room so that only one conferencer will be available in the listener room.
  3. Give 10 viewers to the listener room and repeat action 2. Simulate refreshing the page for the viewer.

Expected Behaviour Ant Media Server panel should show 10 viewers for the listener room

Actual Behaviour Ant Media Server shows more than 10 viewers for the listener room

Insight: Stop function doesn't end or remove viewer session and when it start again with same room but different subtrace it keep count as new one

burak-58 commented 2 years ago

I couldn't reproduce the issue. The issue may related to that: While updating the subtracklist for the Listeners room WebRTCViewerCount field may also be kept as previous value. So the value may doubled as viewers start to play again. Setting WebRTCViewerCount to 0 may be a solution.