diff --git a/examples/room_manager/room_service.py b/examples/room_manager/room_service.py index af03130..4b96ff8 100644 --- a/examples/room_manager/room_service.py +++ b/examples/room_manager/room_service.py @@ -81,7 +81,7 @@ def __find_or_create_room( options = RoomOptions( max_peers=self.config.max_peers, webhook_url=self.config.webhook_url, - room_type=room_type.value if room_type else "full_feature", + room_type=room_type.value if room_type else "conference", ) new_room = self.fishjam_client.create_room(options=options) diff --git a/fishjam/_openapi_client/api/viewer/generate_token.py b/fishjam/_openapi_client/api/viewer/generate_token.py index f1d0279..d22f1b0 100644 --- a/fishjam/_openapi_client/api/viewer/generate_token.py +++ b/fishjam/_openapi_client/api/viewer/generate_token.py @@ -66,7 +66,7 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Union[Error, ViewerToken]]: - """Generate single broadcaster access token + """Generate single livestream access token Args: room_id (str): @@ -95,7 +95,7 @@ def sync( *, client: Union[AuthenticatedClient, Client], ) -> Optional[Union[Error, ViewerToken]]: - """Generate single broadcaster access token + """Generate single livestream access token Args: room_id (str): @@ -119,7 +119,7 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Union[Error, ViewerToken]]: - """Generate single broadcaster access token + """Generate single livestream access token Args: room_id (str): @@ -146,7 +146,7 @@ async def asyncio( *, client: Union[AuthenticatedClient, Client], ) -> Optional[Union[Error, ViewerToken]]: - """Generate single broadcaster access token + """Generate single livestream access token Args: room_id (str): diff --git a/fishjam/_openapi_client/models/room_config.py b/fishjam/_openapi_client/models/room_config.py index 2239725..0183ee0 100644 --- a/fishjam/_openapi_client/models/room_config.py +++ b/fishjam/_openapi_client/models/room_config.py @@ -16,8 +16,8 @@ class RoomConfig: max_peers: Union[Unset, None, int] = UNSET """Maximum amount of peers allowed into the room""" - room_type: Union[Unset, RoomConfigRoomType] = RoomConfigRoomType.FULL_FEATURE - """The use-case of the room. If not provided, this defaults to full_feature.""" + room_type: Union[Unset, RoomConfigRoomType] = RoomConfigRoomType.CONFERENCE + """The use-case of the room. If not provided, this defaults to conference.""" video_codec: Union[Unset, None, RoomConfigVideoCodec] = UNSET """Enforces video codec for each peer in the room""" webhook_url: Union[Unset, None, str] = UNSET diff --git a/fishjam/_openapi_client/models/room_config_room_type.py b/fishjam/_openapi_client/models/room_config_room_type.py index 7f8821b..1eff10c 100644 --- a/fishjam/_openapi_client/models/room_config_room_type.py +++ b/fishjam/_openapi_client/models/room_config_room_type.py @@ -2,11 +2,13 @@ class RoomConfigRoomType(str, Enum): - """The use-case of the room. If not provided, this defaults to full_feature.""" + """The use-case of the room. If not provided, this defaults to conference.""" AUDIO_ONLY = "audio_only" BROADCASTER = "broadcaster" + CONFERENCE = "conference" FULL_FEATURE = "full_feature" + LIVESTREAM = "livestream" def __str__(self) -> str: return str(self.value) diff --git a/fishjam/_openapi_client/models/viewer_token.py b/fishjam/_openapi_client/models/viewer_token.py index d6c8295..924faf5 100644 --- a/fishjam/_openapi_client/models/viewer_token.py +++ b/fishjam/_openapi_client/models/viewer_token.py @@ -8,7 +8,7 @@ @_attrs_define class ViewerToken: - """Token for authorizing broadcaster viewer connection""" + """Token for authorizing livestream viewer connection""" token: str """None""" diff --git a/fishjam/api/_fishjam_client.py b/fishjam/api/_fishjam_client.py index 94118e6..aa077a1 100644 --- a/fishjam/api/_fishjam_client.py +++ b/fishjam/api/_fishjam_client.py @@ -56,9 +56,9 @@ class RoomOptions: webhook_url: str | None = None """URL where Fishjam notifications will be sent""" room_type: Literal[ - "full_feature", "audio_only", "broadcaster", "livestream" - ] = "full_feature" - """The use-case of the room. If not provided, this defaults to full_feature.""" + "conference", "audio_only", "livestream", "full_feature", "broadcaster" + ] = "conference" + """The use-case of the room. If not provided, this defaults to conference.""" @dataclass @@ -118,9 +118,6 @@ def create_room(self, options: RoomOptions | None = None) -> Room: if options.video_codec: codec = RoomConfigVideoCodec(options.video_codec) - if options.room_type == "livestream": - options.room_type = "broadcaster" - config = RoomConfig( max_peers=options.max_peers, video_codec=codec, diff --git a/tests/test_room_api.py b/tests/test_room_api.py index 6571177..8cad535 100644 --- a/tests/test_room_api.py +++ b/tests/test_room_api.py @@ -31,7 +31,8 @@ MAX_PEERS = 10 CODEC_H264 = "h264" AUDIO_ONLY = "audio_only" -FULL_FEATURE = "full_feature" +CONFERENCE = "conference" +LIVESTREAM = "livestream" class TestAuthentication: @@ -65,7 +66,7 @@ def test_no_params(self, room_api): max_peers=None, video_codec=None, webhook_url=None, - room_type=RoomConfigRoomType(FULL_FEATURE), + room_type=RoomConfigRoomType(CONFERENCE), ) config.__setitem__("roomId", room.config.__getitem__("roomId")) config.__setitem__( @@ -152,7 +153,7 @@ def test_valid(self, room_api: FishjamClient): max_peers=None, video_codec=None, webhook_url=None, - room_type=RoomConfigRoomType(FULL_FEATURE), + room_type=RoomConfigRoomType(CONFERENCE), ) config.__setitem__("roomId", room.config.__getitem__("roomId")) config.__setitem__( @@ -255,7 +256,7 @@ def test_invalid(self, room_api: FishjamClient): class TestCreateLivestreamViewerToken: def test_valid(self, room_api: FishjamClient): - room = room_api.create_room(RoomOptions(room_type="livestream")) + room = room_api.create_room(RoomOptions(room_type=LIVESTREAM)) viewer_token = room_api.create_livestream_viewer_token(room.id) assert isinstance(viewer_token, str)