Spaces:
Running
on
T4
Running
on
T4
Fix: delete if from allow_speaker
#30
by
jromero2
- opened
seamless_server/app_pubsub.py
CHANGED
@@ -558,6 +558,13 @@ async def join_room(sid, client_id, room_id_from_client, config_dict):
|
|
558 |
|
559 |
return {"roomsJoined": sio.rooms(sid), "roomID": room_id}
|
560 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
def check_and_lock_single_user(client_id, member):
|
562 |
global server_lock
|
563 |
|
|
|
558 |
|
559 |
return {"roomsJoined": sio.rooms(sid), "roomID": room_id}
|
560 |
|
561 |
+
def allow_speaker(room, client_id):
|
562 |
+
if MAX_SPEAKERS is not None and client_id in room.speakers:
|
563 |
+
room_statuses = {room_id: room.get_room_status_dict() for room_id, room in rooms.items()}
|
564 |
+
speakers = sum(room_status["activeTranscoders"] for room_status in room_statuses.values())
|
565 |
+
return speakers < int(MAX_SPEAKERS)
|
566 |
+
return True
|
567 |
+
|
568 |
def check_and_lock_single_user(client_id, member):
|
569 |
global server_lock
|
570 |
|