Skip to content

Commit 50b2035

Browse files
authored
Update example (#42)
1 parent 06ec7c6 commit 50b2035

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

examples/room_api.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
fishjam_address, room = room_api.create_room(
1212
video_codec="h264", webhook_url="http://localhost:5000/webhook"
1313
)
14-
print((fishjam_address, room))
14+
print(f"Fishjam address: {fishjam_address}\nRoom: \n\t{room}\n")
1515

1616
# Add peer to the room
17-
result = room_api.add_peer(room.id, options=PeerOptionsWebRTC())
18-
print((result.token, result.peer, result.peer_websocket_url))
17+
response = room_api.add_peer(room.id, options=PeerOptionsWebRTC())
18+
print(
19+
f"Websocket URL: {response.peer_websocket_url}\nPeer token: \n\t{response.token}\n"
20+
f"Peer: \n\t{response.peer}\n"
21+
)
1922

2023
# Add component to the room
2124
component_hls = room_api.add_component(room.id, options=ComponentOptionsHLS())
22-
print(component_hls)
25+
print(f"Component HLS: \n\t{component_hls}")

0 commit comments

Comments
 (0)