listStreams

View as MarkdownOpen in Claude

List streams associated with a video room.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the video room.

Response

datalist of objectsRequired
List of streams.

Response Example

Response
1{
2 "links": {
3 "self": "https://example.signalwire.com/api/video/rooms?page=2",
4 "first": "https://example.signalwire.com/api/video/rooms?page=1",
5 "next": "https://example.signalwire.com/api/video/rooms?page=3",
6 "prev": "https://example.signalwire.com/api/video/rooms?page=1"
7 },
8 "data": [
9 {
10 "id": "c22d24f6-5a47-4597-9a23-c7d01e696b92",
11 "url": "rtmp://broadcaster",
12 "stream_type": "rtmp",
13 "width": 1920,
14 "height": 1080,
15 "fps": 20,
16 "created_at": "2022-01-01T10:00:00Z",
17 "updated_at": "2022-01-01T11:00:00Z"
18 }
19 ]
20}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com",
7});
8
9const streams = await client.video.rooms.listStreams("room-id");
10for (const stream of streams.data ?? []) {
11 console.log(`${stream.url}: ${stream.id}`);
12}