Skip to contentSkip to navigationSkip to topbar
Rate this Page:

Configure the Maximum Participant Duration for a Room


(warning)

Warning

This page is for reference only. We are no longer onboarding new customers to Programmable Video. Existing customers can continue to use the product until December 5, 2024(link takes you to an external page).
We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide(link takes you to an external page) to assist you in minimizing any service disruption.

Twilio Video Rooms allow you to configure the maximum amount of time that a Participant can be connected to the Room. The default maximum Participant duration for Video Rooms is four hours and the maximum amount of time a Participant can be connected to a Room is 24 hours. Once a Participant has been connected to a Room for the Room's maximum Participant duration, they will be disconnected from the Room.

If you wish to configure the maximum Participant duration for you Video Rooms, you can do so in two ways: via the Twilio REST API, or via the Twilio Console.


REST API

rest-api page anchor

You can configure the maximum Participant duration for Video Rooms on a per-Room basis during Room creation using the REST API. When creating the Room, you can specify the maximum Participant duration in seconds.

Configure a Room's maximum Participant duration

configure-a-rooms-maximum-participant-duration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_13
// Download the helper library from https://www.twilio.com/docs/node/install
_13
// Find your Account SID and Auth Token at twilio.com/console
_13
// and set the environment variables. See http://twil.io/secure
_13
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_13
const authToken = process.env.TWILIO_AUTH_TOKEN;
_13
const client = require('twilio')(accountSid, authToken);
_13
_13
client.video.v1.rooms
_13
.create({
_13
maxParticipantDuration: 86400,
_13
uniqueName: 'My Video Room'
_13
})
_13
.then(room => console.log(room.sid));

Output

_32
{
_32
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"date_created": "2015-07-30T20:00:00Z",
_32
"date_updated": "2015-07-30T20:00:00Z",
_32
"status": "in-progress",
_32
"type": "peer-to-peer",
_32
"sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"enable_turn": true,
_32
"unique_name": "My Video Room",
_32
"max_concurrent_published_tracks": 0,
_32
"max_participants": 10,
_32
"max_participant_duration": 86400,
_32
"duration": 0,
_32
"status_callback_method": "POST",
_32
"status_callback": null,
_32
"record_participants_on_connect": false,
_32
"video_codecs": [
_32
"VP8"
_32
],
_32
"media_region": "us1",
_32
"audio_only": false,
_32
"empty_room_timeout": 5,
_32
"unused_room_timeout": 5,
_32
"end_time": "2015-07-30T20:00:00Z",
_32
"large_room": false,
_32
"url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"links": {
_32
"participants": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants",
_32
"recordings": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings",
_32
"recording_rules": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/RecordingRules"
_32
}
_32
}


In the Twilio Console, you can update the default maximum Participant duration for all of the Video Rooms created in your account. After you update this value in the Console, any new Rooms that you create without explicitly setting the maximum Participant duration will take this configured value.

To update this value, navigate to Room Settings(link takes you to an external page) section in the Console, where you will be able to update the value. Note that the duration should be specified in seconds.

By default, PSTN Participants are limited to a four-hour maximum duration. You can enable the 24-hour maximum duration in your Programmable Voice Settings console.(link takes you to an external page)


Rate this Page: