diff --git a/code/jazz_poc_datachannel.py b/code/jazz_poc_datachannel.py index c71e067..050c069 100755 --- a/code/jazz_poc_datachannel.py +++ b/code/jazz_poc_datachannel.py @@ -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) diff --git a/code/wbstream_poc_datachannel.py b/code/wbstream_poc_datachannel.py index c024952..b4685dc 100755 --- a/code/wbstream_poc_datachannel.py +++ b/code/wbstream_poc_datachannel.py @@ -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()