Recipes← all recipesView on GitHub

Record a video room

Videovideo room recording

Enable recording when you create a video room, then list or delete session recordings through the REST API.

videorecording

The claim

Recording is a property of the room, not a button in the call. The vendored REST spec’s POST /api/video/rooms takes record_on_start, a boolean. The spec describes it as “Specifies whether to start recording a Room Session when one is started for this Room”. From then on the recordings are REST objects. GET /api/video/room_sessions/{id}/recordings lists a session’s, and each carries status, duration, format, size_in_bytes and a uri. GET /api/video/room_recordings/{id} reads one, and DELETE /api/video/room_recordings/{id} asks for its deletion and answers 204. You reach them as client.video.rooms.create, client.video.room_sessions.list_recordings, and client.video.room_recordings get and delete.

How it works

def create_room(name=ROOM):
    return client.video.rooms.create(name=name, display_name="Workshop stand-up",
                                     record_on_start=True)

def recordings_of(session_id):
    return client.video.room_sessions.list_recordings(session_id)

def delete_recording(recording_id):
    return client.video.room_recordings.delete(recording_id)

What the platform receives:

POST /api/video/rooms
{"name": "workshop-standup", "display_name": "Workshop stand-up", "record_on_start": true}

GET /api/video/room_sessions/<session_id>/recordings
GET /api/video/room_recordings/<recording_id>
DELETE /api/video/room_recordings/<recording_id>

Read the session id from GET /api/video/room_sessions, which the SDK exposes as client.video.room_sessions.list. The recordings list and the get both document a media_ttl query parameter; the recipe leaves it at the platform’s default.

Limitations

You prove the requests and the documented shapes. When a recording reaches completed, and what the uri serves, are the platform’s side of a live session.

Do not look here for starting a recording from inside the call. The Browser SDK v4 reference labels startRecording unimplemented, so the room property is the documented switch.

What to change first

Drop record_on_start=True from create_room and run the verifier. The exact-body assertion fails, and nothing else would. A room without the switch asks for no automatic recording; the spec documents no default for the field, so the platform’s own is what you get.