Skip to content

Commit b77960a

Browse files
committed
Rename room type broadcaster to livestream
1 parent 5bf9716 commit b77960a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

fishjam/api/_fishjam_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ class RoomOptions:
5555
"""Enforces video codec for each peer in the room"""
5656
webhook_url: str | None = None
5757
"""URL where Fishjam notifications will be sent"""
58-
room_type: Literal["full_feature", "audio_only", "broadcaster"] = "full_feature"
58+
room_type: Literal[
59+
"full_feature", "audio_only", "broadcaster", "livestream"
60+
] = "full_feature"
5961
"""The use-case of the room. If not provided, this defaults to full_feature."""
6062

6163

@@ -116,6 +118,9 @@ def create_room(self, options: RoomOptions | None = None) -> Room:
116118
if options.video_codec:
117119
codec = RoomConfigVideoCodec(options.video_codec)
118120

121+
if options.room_type == "livestream":
122+
options.room_type = "broadcaster"
123+
119124
config = RoomConfig(
120125
max_peers=options.max_peers,
121126
video_codec=codec,

tests/test_room_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def test_invalid(self, room_api: FishjamClient):
255255

256256
class TestCreateLivestreamViewerToken:
257257
def test_valid(self, room_api: FishjamClient):
258-
room = room_api.create_room(RoomOptions(room_type="broadcaster"))
258+
room = room_api.create_room(RoomOptions(room_type="livestream"))
259259
viewer_token = room_api.create_livestream_viewer_token(room.id)
260260

261261
assert isinstance(viewer_token, str)

0 commit comments

Comments
 (0)