refactor: remove redundant code comments from datachannel POC scripts

This commit is contained in:
zarazaex69
2026-04-20 19:46:53 +03:00
parent 13185cbd0b
commit ce87b017f1
2 changed files with 0 additions and 4 deletions

View File

@@ -129,7 +129,6 @@ async def _create_peer(name: str, room: dict, session: aiohttp.ClientSession, is
p_ice_sub.clear()
await asyncio.sleep(0.3)
# pub
peer["pc_pub"] = RTCPeerConnection(configuration=RTCConfiguration(iceServers=ice_servers, bundlePolicy=RTCBundlePolicy.MAX_BUNDLE))
peer["pc_pub"].addTrack(AudioStreamTrack())
peer["dc"] = peer["pc_pub"].createDataChannel("_reliable", ordered=True)

View File

@@ -25,7 +25,6 @@ def _get_room_token(room_id: str, display_name: str) -> tuple[str, str]:
"Content-Type": "application/json"
}
# 1. Guest Registration
reg_req = requests.post(
f"{API_BASE}/auth/api/v1/auth/user/guest-register",
json={"displayName": display_name, "device": {"deviceName": "Linux", "deviceType": "PARTICIPANT_DEVICE_TYPE_WEB_DESKTOP"}},
@@ -34,13 +33,11 @@ def _get_room_token(room_id: str, display_name: str) -> tuple[str, str]:
reg_req.raise_for_status()
headers["Authorization"] = f"Bearer {reg_req.json()['accessToken']}"
# 2. Room Creation (if empty)
if not room_id:
room_req = requests.post(f"{API_BASE}/api-room/api/v2/room", json={"roomType": "ROOM_TYPE_ALL_ON_SCREEN", "roomPrivacy": "ROOM_PRIVACY_FREE"}, headers=headers)
room_req.raise_for_status()
room_id = room_req.json()["roomId"]
# 3. Join & Token
requests.post(f"{API_BASE}/api-room/api/v1/room/{room_id}/join", json={}, headers=headers).raise_for_status()
tok_req = requests.get(f"{API_BASE}/api-room-manager/api/v1/room/{room_id}/token", params={"deviceType": "PARTICIPANT_DEVICE_TYPE_WEB_DESKTOP", "displayName": display_name}, headers=headers)
tok_req.raise_for_status()