(room)
Operations related to rooms api
create- Create a room⚠️ Deprecatedget- Retrieve a room⚠️ Deprecateddelete- Delete a room⚠️ Deprecatedstart_egress- Start room RTMP egress⚠️ Deprecatedstop_egress- Stop room RTMP egress⚠️ Deprecatedcreate_user- Create a room user⚠️ Deprecatedget_user- Get user details⚠️ Deprecatedupdate_user- Update a room user⚠️ Deprecateddelete_user- Remove a user from the room⚠️ Deprecated
Create a multiparticipant livestreaming room.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.create()
if res.create_room_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieve a room
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.get(id="<id>")
if res.room is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Delete a room
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.delete(id="<id>")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Create a livestream for your room. This allows you to leverage livestreaming features like recording and HLS output.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.start_egress(id="<id>", room_egress_payload={
"stream_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
room_egress_payload |
components.RoomEgressPayload | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.StartRoomEgressResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Stop room RTMP egress
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.stop_egress(id="<id>")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.StopRoomEgressResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Call this endpoint to add a user to a room, specifying a display name at a minimum. The response will contain a joining URL for Livepeer's default meeting app. Alternatively the joining token can be used with a custom app.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.create_user(id="<id>", room_user_payload={
"name": "name",
"can_publish": True,
"can_publish_data": True,
})
if res.room_user_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
room_user_payload |
components.RoomUserPayload | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.CreateRoomUserResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Get user details
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.get_user(id="<id>", user_id="<value>")
if res.get_room_user_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
user_id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetRoomUserResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Update properties for a user.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.update_user(id="<id>", user_id="<value>", room_user_update_payload={
"can_publish": True,
"can_publish_data": True,
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
user_id |
str | ✔️ | N/A |
room_user_update_payload |
components.RoomUserUpdatePayload | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.UpdateRoomUserResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Remove a user from the room
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.delete_user(id="<id>", user_id="<value>")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
user_id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.DeleteRoomUserResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |