lib/twilio-ruby/rest/video/v1/room.rb in twilio-ruby-5.61.2 vs lib/twilio-ruby/rest/video/v1/room.rb in twilio-ruby-5.62.0

- old
+ new

@@ -61,12 +61,18 @@ # the room will only publish audio. No video tracks will be allowed. Group rooms # only. # @param [String] max_participant_duration The maximum number of seconds a # Participant can be connected to the room. The maximum possible value is 86400 # seconds (24 hours). The default is 14400 seconds (4 hours). + # @param [String] empty_room_timeout Configures how long (in minutes) a room will + # remain active after last participant leaves. Valid values range from 1 to 60 + # minutes (no fractions). + # @param [String] unused_room_timeout Configures how long (in minutes) a room will + # remain active if no one joins. Valid values range from 1 to 60 minutes (no + # fractions). # @return [RoomInstance] Created RoomInstance - def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset) + def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset, empty_room_timeout: :unset, unused_room_timeout: :unset) data = Twilio::Values.of({ 'EnableTurn' => enable_turn, 'Type' => type, 'UniqueName' => unique_name, 'StatusCallback' => status_callback, @@ -76,10 +82,12 @@ 'VideoCodecs' => Twilio.serialize_list(video_codecs) { |e| e }, 'MediaRegion' => media_region, 'RecordingRules' => Twilio.serialize_object(recording_rules), 'AudioOnly' => audio_only, 'MaxParticipantDuration' => max_participant_duration, + 'EmptyRoomTimeout' => empty_room_timeout, + 'UnusedRoomTimeout' => unused_room_timeout, }) payload = @version.create('POST', @uri, data: data) RoomInstance.new(@version, payload, ) @@ -372,10 +380,12 @@ 'max_concurrent_published_tracks' => payload['max_concurrent_published_tracks'] == nil ? payload['max_concurrent_published_tracks'] : payload['max_concurrent_published_tracks'].to_i, 'record_participants_on_connect' => payload['record_participants_on_connect'], 'video_codecs' => payload['video_codecs'], 'media_region' => payload['media_region'], 'audio_only' => payload['audio_only'], + 'empty_room_timeout' => payload['empty_room_timeout'].to_i, + 'unused_room_timeout' => payload['unused_room_timeout'].to_i, 'url' => payload['url'], 'links' => payload['links'], } # Context @@ -504,9 +514,21 @@ ## # @return [Boolean] Indicates whether the room will only contain audio track participants for group rooms. def audio_only @properties['audio_only'] + end + + ## + # @return [String] The time a room will remain active after last participant leaves. + def empty_room_timeout + @properties['empty_room_timeout'] + end + + ## + # @return [String] The time a room will remain active when no one joins. + def unused_room_timeout + @properties['unused_room_timeout'] end ## # @return [String] The absolute URL of the resource def url \ No newline at end of file