Closed MoncefB closed 2 years ago
Hey @MoncefB - thanks for the question!
I think this may be easy. This app uses the Twilio API to create a Room when the first user joins. You can see that code in the token server here: https://github.com/twilio-labs/plugin-rtc/blob/master/src/serverless/functions/token.js#L74
The Rooms API does accept a parameter that could be useful for your use case. It accepts recordParticipantsOnConnect
, which, if true
, will record participants when they connect to the room.
So you could alter the code in the token server to change this value based on the room name. Maybe something like this:
// If room doesn't exist, create it
room = await client.video.rooms.create({
uniqueName: room_name,
type: ROOM_TYPE,
recordParticipantsOnConnect: room_name === 'Record',
});
Of course, you can get fancier with the room_name === 'Record'
statement, but I think you get the idea. Lemme know what you think!
Hi @MoncefB I will be closing this due to inactivity. Please let us know if you still have questions and we will reopen this issue. Thank you!
Question What is the recommended way to to edit the initial recording rules, for a given room?
Additional context One example would be:
NoRecording
Recording
when the first participant joins, till a participant overwrites that behavior by clicking on "Stop Recording" via their menu.Thank you so much for your help! 🙏