(room())
Operations related to rooms api
create- Create a room⚠️ Deprecatedget- Retrieve a room⚠️ Deprecateddelete- Delete a room⚠️ DeprecatedstartEgress- Start room RTMP egress⚠️ DeprecatedstopEgress- Stop room RTMP egress⚠️ DeprecatedcreateUser- Create a room user⚠️ DeprecatedgetUser- Get user details⚠️ DeprecatedupdateUser- Update a room user⚠️ DeprecateddeleteUser- 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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.CreateRoomResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
CreateRoomResponse res = sdk.room().create()
.call();
if (res.createRoomResponse().isPresent()) {
// handle response
}
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.GetRoomResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
GetRoomResponse res = sdk.room().get()
.id("<value>")
.call();
if (res.room().isPresent()) {
// handle response
}
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.DeleteRoomResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
DeleteRoomResponse res = sdk.room().delete()
.id("<value>")
.call();
// handle response
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.components.RoomEgressPayload;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.StartRoomEgressResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
StartRoomEgressResponse res = sdk.room().startEgress()
.id("<value>")
.roomEgressPayload(RoomEgressPayload.builder()
.streamId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9")
.build())
.call();
// handle response
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
roomEgressPayload |
RoomEgressPayload | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.StopRoomEgressResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
StopRoomEgressResponse res = sdk.room().stopEgress()
.id("<value>")
.call();
// handle response
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.components.RoomUserPayload;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.CreateRoomUserResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
CreateRoomUserResponse res = sdk.room().createUser()
.id("<value>")
.roomUserPayload(RoomUserPayload.builder()
.name("name")
.canPublish(true)
.canPublishData(true)
.build())
.call();
if (res.roomUserResponse().isPresent()) {
// handle response
}
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
roomUserPayload |
RoomUserPayload | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.GetRoomUserResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
GetRoomUserResponse res = sdk.room().getUser()
.id("<value>")
.userId("<value>")
.call();
if (res.getRoomUserResponse().isPresent()) {
// handle response
}
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
userId |
String | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.components.RoomUserUpdatePayload;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.UpdateRoomUserResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
UpdateRoomUserResponse res = sdk.room().updateUser()
.id("<value>")
.userId("<value>")
.roomUserUpdatePayload(RoomUserUpdatePayload.builder()
.canPublish(true)
.canPublishData(true)
.build())
.call();
// handle response
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
userId |
String | ✔️ | N/A |
roomUserUpdatePayload |
RoomUserUpdatePayload | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/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.
package hello.world;
import java.lang.Exception;
import studio.livepeer.livepeer.Livepeer;
import studio.livepeer.livepeer.models.errors.SDKError;
import studio.livepeer.livepeer.models.operations.DeleteRoomUserResponse;
public class Application {
public static void main(String[] args) throws Exception {
try {
Livepeer sdk = Livepeer.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.build();
DeleteRoomUserResponse res = sdk.room().deleteUser()
.id("<value>")
.userId("<value>")
.call();
// handle response
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
String | ✔️ | N/A |
userId |
String | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |