iOS VCS Realtime SDK Documentation

Class Room

public class Room  

Room the user joined. Contains the local and remote participant with their media streams. Also exposes functions such as muting or toggling video. Raises events when participants join/leave or media streams change.

Properties

name

public var name: String? 

Name of room

room​Id

public var roomId: String? 

Room identifier generated by the server

Methods

local​Participant()

public func localParticipant() -> LocalParticipant?  

Local participant

Returns

Local participant

remote​Participants()

public func remoteParticipants() -> [RemoteParticipant]?  

Remote participants

Returns

Array of remote participants

camera​Facing​Mode()

public func cameraFacingMode() -> String  

Camera facing mode. Change mode via switchCamera()

Returns

String describing mode

toggle​Mute()

public func toggleMute() ->  Bool  

Mute/unmute preferred audio input device.

Returns

True if muted

toggle​Audio()

public func toggleAudio() -> Bool  

Toggle sending local audio. This API will add or remove an audio MediaStreamTrack to the local MediaStream. This is different from toggleMute which simply enables/disables the existing audio track.

Returns

true if muted

toggle​Video(hd​Video:​)

public func toggleVideo(hdVideo: Bool?) -> Bool  

Toggle sending local video.

Parameters

hd​Video Bool?

Whether or not HD video should be used. If not set the default options for the session is used.

Returns

true if sending video

toggle​HdVideo()

public func toggleHdVideo() -> Bool  

Toggle between SD and HD if user is sending video.

Returns

true if sending HD video

scale​Down​Video(enable:​connection​Id:​width:​)

public func scaleDownVideo(enable: Bool, connectionId: String?, width: Int?)  
  • Enables/disables scaling down video resolution for a given connection or all connections.
  • @param {boolean} enable - True to enable scaling down video resolution.
  • @param {string} [connectionId] - The connection ID. If not set then request applies to all connections.
  • @param {number} [width] - The scaled down width. If not set default of 640px is used.

is​Video​Scaled​Down(connection​Id:​)

public func isVideoScaledDown(connectionId: String?) -> Bool  
  • Checks if video resolution is being scaled down for the given connection or all connections.
  • @param {string} [connectionId] - The connection ID. If not set then checks default setting for new connections.
  • @returns {boolean} True if video resolution is being scaled down.

toggle​Speaker()

public func toggleSpeaker() -> Bool  

switch​Camera()

public func switchCamera()  

Switch camera between environment and user

replace​Video​Stream(stream:​)

public func replaceVideoStream(stream: Any?)  

Replace the sending video stream.

Parameters

stream Any?

The new media stream

has​Audio()

public func hasAudio() -> Bool  

Check if user is sending / receiving audio

Returns

True if user is sending video

has​Video()

public func hasVideo() -> Bool  

Check if user is sending video

Returns

True if user is sending video

has​HdVideo()

public func hasHdVideo() -> Bool  

Check if user is sending HD video

Returns

True if user is sending HD video

is​Muted()

public func isMuted() -> Bool  

Check if user is muted

Returns

True if muted

is​Speaker()

public func isSpeaker() -> Bool  

Check if speaker is enabled

Returns

True if enabled

leave()

public func leave()  

Leave the room