I'm having trouble enabling 'RecordParticipantsOnConnect' as stated here: https://www.twilio.com/docs/video/api/recordings-resource in my twilio implementation but i can't seem to get it working, where do i set RecordParticipantsOnConnect to true?
They say you need to pass this option when you're creating a room, but i'm not creating any room, it's done automatically i'm just passing a room name as a string and i get the token:
class TwilioServices
ACCOUNT_SID = ENV['TWILIO_ACCOUNT_SID']
API_KEY_SID = ENV['TWILIO_API_KEY_SID']
API_KEY_SECRET = ENV['TWILIO_API_KEY_SECRET']
def self.get_token(type, room)
# Create an Access Token
token = Twilio::JWT::AccessToken.new ACCOUNT_SID, API_KEY_SID, API_KEY_SECRET, ttl: 7200, identity: type,
# Grant access to Video
grant = Twilio::JWT::AccessToken::VideoGrant.new
grant.room = room
token.add_grant grant
# Serialize the token as a JWT
token.to_jwt
end
end
How do i solve this?