MeetingSDK

public class MeetingSDK : NSObject

The main high-level interface to the SDK. This is a singleton that you will obtain through the ‘shared’ property

  • The shared instance of the MeetingSDK

    Declaration

    Swift

    public static let shared: MeetingSDK
  • Declaration

    Swift

    public var delegate: MeetingSDKDelegate?
  • Pauses video frame processing for the given streamId. This does not keep stream data from coming down to the device it just keeps the SDK from processing/managing the VideoView

    • streamId: The streamId corresponding to the video stream to pause processing for

    Declaration

    Swift

    public func pauseVideoFrameProcessing(streamId: String)
  • Resumes video frame processing for the given streamId.

    • streamId: The streamId corresponding to the video stream to resume processing for

    Declaration

    Swift

    public func resumeVideoFrameProcessing(streamId: String)
  • Retrieve the list of participant objects representing all the participants in the meeting at the time the API call is made

    Declaration

    Swift

    public func getParticipants() -> [Participant]

    Return Value

    An array of Participant objects

  • Joins the meeting (V2 servers)

    Declaration

    Swift

    public func joinMeeting(server: String, meetingUUID: String, key: String, userUUID: String = "", name: String, completion: @escaping (Bool) -> ())

    Parameters

    server

    DNS name of the server hosting the meeting

    meetingUUID

    The meeting UUID of the meeting to join

    key

    The encryption key (obtained from initializeMeeting) for the meeting (MJWT if conecting to V3/later server)

    name

    Name of the user

    userUUID

    The unique identifier associated with this user. If an empty string is passed, a unique guest identifier will be generated

    completion

    The callback called after joining

    Return Value

    Bool if join was successful or not

  • Joins the meeting (V3+ servers)

    Declaration

    Swift

    public func joinMeetingWithToken(server: String, meetingUUID: String, token: String, userUUID: String = "", name: String, completion: @escaping (Bool) -> ())

    Parameters

    server

    DNS name of the server hosting the meeting

    meetingUUID

    The meeting UUID of the meeting to join

    token

    The MJWT token to use with this meeting (obtained from initializeMeetingWithToken)

    name

    Name of the user

    userUUID

    The unique identifier associated with this user. If an empty string is passed, a unique guest identifier will be generated

    completion

    The callback called after joining

  • Joins the meeting (V3+ servers)

    Declaration

    Swift

    public func joinMeetingWithToken(server: String, meetingUUID: String, token: String, jwt: String, name: String, completion: @escaping (Bool) -> ())

    Parameters

    server

    DNS name of the server hosting the meeting

    meetingUUID

    The meeting UUID of the meeting to join

    token

    The MJWT token to use with this meeting (obtained from initializeMeetingWithToken)

    jwt

    The JWT associatied with the user wishing to join the meeting

    name

    Name of the user

    completion

    The callback called after joining

  • Enables the audio input

    Declaration

    Swift

    public func enableAudioInput(device: String) -> Bool

    Parameters

    device

    String representation of the device. This should be a value returned from getAudioInputDevices

    Return Value

    Bool if enable operation was successful or not

  • Disables the audio input

    Declaration

    Swift

    public func disableAudioInput(device: String)

    Parameters

    device

    String representation of the device. . This should be a value returned from getAudioInputDevices

  • Disables the audio input of last device enabled

    Declaration

    Swift

    public func disableAudioInput()
  • Enables audio output

    Declaration

    Swift

    public func enableAudioOutput(device: String) -> Bool

    Parameters

    device

    String representation of the device. This should be a value returned from getAudioOutputDevices

    Return Value

    Bool if enable operation was successful or not

  • Disables audio output

    Declaration

    Swift

    public func disableAudioOutput(device: String)

    Parameters

    device

    String representation of the mic. This should be a value returned from getAudioOutputDevices

  • Disables audio output of last device enabled

    Declaration

    Swift

    public func disableAudioOutput()
  • Starts an audio input preview proces. Should only be used when not connected to a meeting. After calling, monitor audio input levels via the inputMeterChanged MeetingSDK delegate method.

    Declaration

    Swift

    public func enableAudioInputPreview(device: String) -> Bool

    Parameters

    device

    String representation of the mic to use. This should be a value returned from getAudioInputDevices

    Return Value

    Bool if operation was successful or not

  • Stops an audio input preview proces.

    Declaration

    Swift

    public func disableAudioInputPreview(device: String) -> Bool

    Parameters

    device

    String representation of the mic to stop the preview for. This should be a value returned from getAudioInputDevices

    Return Value

    Bool if operation was successful or not

  • Starts an audio output preview proces. Should only be used when not connected to a meeting. After calling, monitor audio input levels via the inputMeterChanged MeetingSDK delegate method.

    Declaration

    Swift

    public func enableAudioOutputPreview(device: String, soundPath: String) -> Bool

    Parameters

    device

    String representation of the mic to use. This should be a value returned from getAudioOutputDevices

    soundPath

    A file path name to the sound to use for the preview (should be a .wav)

    Return Value

    Bool if operation was successful or not

  • Stops an audio output preview proces.

    Declaration

    Swift

    public func disableAudioOutputPreview(device: String) -> Bool

    Parameters

    device

    String representation of the mic to stop the preview for. This should be a value returned from getAudioOutputDevices

    Return Value

    Bool if disable audio output preview operation was successful or not

  • Sets audio stream volume for given stream

    Declaration

    Swift

    public func setAudioStreamVolume(streamId: String, volume: Int32) -> Bool

    Parameters

    streamId

    String represenation of the streamId

    volume

    Volume level between 0 and 100

    Return Value

    Bool if set audio stream volume operation was successful or not

  • Set volume of the input stream. 0 to mute. Only available for MacOS, will return false when called from iOS

    Declaration

    Swift

    public func setAudioInputVolume(_ volume: Int32) -> Bool

    Return Value

    Bool if set input volume operation was successful or not

  • Set volume of the output stream. 0 to mute. Only available for MacOS, will return false when called from iOS

    Declaration

    Swift

    public func setAudioOutputVolume(_ volume: Int32) -> Bool

    Return Value

    Bool if set output volume operation was successful or not

  • Enables video capture

    Declaration

    Swift

    public func enableVideoCapture(camera: String, withMode: String, blurring: Bool = false, completion: @escaping (Bool) -> ())

    Parameters

    camera

    String representation of the camera.This should be a value returned from

    withMode

    A mode (resolution) to use when capturing. This should be a value returned by getSupportedVideoModes.

    completion

    The callback after enabling video capture. The Bool argument to the completion routine is true if the sdk was successful in enabling video capture.

  • Set the bundle id and the app group id used by the Screen Sharing extension

    • Description: This method MUST be called with the appropriate bundleId and appGroupId before you attempt to screen share from an iOS device.
  • Disables video capture

    Declaration

    Swift

    public func disableVideoCapture(camera: String)

    Parameters

    camera

    String representation of the camera. This should be a value returned from getVideoDevices

  • Enables video preview

    Declaration

    Swift

    public func enableVideoPreview(camera: String, withMode: String, andBlurring: Bool = false, lowLevel: Bool, completion: @escaping (Bool) -> ())

    Parameters

    camera

    String representation of the camera.This should be a value returned from

    withMode

    A mode (resolution) to use when previewing. This should be a value returned by getSupportedVideoModes.

    andBlurring

    Boolean flag indicating whether or not the preview should have background blurring enabled

    completion

    The callback after enabling video preview. The Bool argument to the completion routine is true if the sdk was successful in enabling video preview.

  • Disables video preview

    Declaration

    Swift

    public func disableVideoPreview(camera: String)

    Parameters

    camera

    String representation of the camera. This should be a value returned from getVideoDevices

  • Enables window sharing for a specific window

    Declaration

    Swift

    public func enableWindowSharing(windowId: String, mode: String) -> Bool
  • Disables window sharing for a specific window

    Declaration

    Swift

    public func disableWindowSharing(windowId: String) -> Bool
  • Enables network video capture

    Declaration

    Swift

    public func enableNetworkVideo(url: String, mode: String, name: String, completion: @escaping (Bool) -> ())

    Parameters

    url

    The URL of a network video source

    mode

    The video mode to use. This should be a raw value (string) from one of the CameraMode enumeration constants.

  • Disables network capture

    Declaration

    Swift

    public func disableNetworkVideo(url: String)

    Parameters

    url

    The URL of the network video source to disable

  • Disable the local display of a network video stream in the current meeting

    • Description: This will cause the appropriate VideoView to stop receiving video frame updates.

    Declaration

    Swift

    public func disableVideoStream(streamId: String)

    Parameters

    streamId

    The video stream to disable

  • Enables the video stream and creates the VideoView. Should only call this after you get the participantVideoAdded delegate method callback. Pass “true” in the lowLevel parameter if you’d like to receive low level video frame data (RGB888) instead of having the SDK automatically draw each updated frame for you in the VideoView

    Declaration

    Swift

    public func enableVideoStream(participant: Participant, streamId: String, lowLevel: Bool = false)

    Parameters

    participant

    The participant associated with the streamId

    streamId

    Stream ID of the video stream to enable

    lowLevel

    If set to true, the SDK will only provide low level video frame data (RGB888) in the imageData field of the VideoView as opposed to updating (drawing) the frames in the VideoView automatically

  • Exits meeting

    Declaration

    Swift

    public func exitMeeting()
  • Returns the VideoInfo structure associated with the specified streamId

    Declaration

    Swift

    public func findVideoInfo(streamId: String) -> VideoInfo?

    Parameters

    streamId

    The specified streamId

    Return Value

    The VideoInfo structure associated with the streamId. If no VideoInfo is found, returns nil

  • Returns the Participant structure associated with the specified streamId

    Declaration

    Swift

    public func findParticipant(withVideoStreamId: String) -> Participant?

    Parameters

    withVideoStreamId

    The specified streamId

    Return Value

    The Participant structure associated with the streamId. If no Participant can be found that is associated with the specified Stream ID, returns nil

  • Returns the Participant structure associated with the specified streamId

    Declaration

    Swift

    public func findParticipant(withAudioStreamId: String) -> Participant?

    Parameters

    withAudioStreamId

    The specified streamId

    Return Value

    The Participant structure associated with the streamId passed. If no appropriate Participant is found, returns nil

  • Tells MeetingSDK whether or not to combine log entries from IGAudio, IGVideo, CoreMeeting and MeetingSDK into one log buffer

    Declaration

    Swift

    public func enableCombinedLogs(_ enable: Bool)

    Parameters

    enable

    If true, all log sources are combined into one buffer. If false, IGAudio and IGVideo are logged separately from CoreMeeting/MeetingSDK

  • Tells MeetingSDK whether or not to send log messages to the MeetingSDKDelegate::logMessage method instead of buffering them

    Declaration

    Swift

    public func enableLogForwarding(_ enable: Bool)

    Parameters

    enable

    If true, log messages are only sent to the logMessage delegate method and are not buffered. If false, messages are buffered and NOT sent to logMessage.

  • Tells MeetingSDK whether or not to actively log messages to a file instead of buffering them OR using the MeetingSDKDelegate::logMessage method.

    Declaration

    Swift

    public func enableActiveLogging(_ filename: String)

    Parameters

    filename

    If a non-empty string, log messages written to the specified filename (there is a small buffer that is used so that the file isn’t accessed every time a message is logged). This implicitly calls enableCombinedLogs(true) and enableLogForwarding(false). If an empty string, messages are not sent to a file automatically. The filename will be appended to the directory specified by setLogDirectory(). If this is used for iOS, make sure your application has “iTunes File Sharing” enabled so that files can be retrieved from the Finder when your phone is connected to a Macintosh.

  • Sets the trace debug level for both audio and video libraries

    Declaration

    Swift

    public func setTraceLevel(_ level: DebugLevel)

    Parameters

    level

    The level requested (see DebugLevel documentation for details)

  • Sets the trace debug level for just the audio library

    Declaration

    Swift

    public func audioSetTraceLevel(_ level: DebugLevel)

    Parameters

    level

    The level requested (see DebugLevel documentation for details)

  • Sets the trace debug level for just the video library

    Declaration

    Swift

    public func videoSetTraceLevel(_ level: DebugLevel)

    Parameters

    level

    The level requested (see DebugLevel documentation for details)

  • Stores all IGVideo related log messages into the filename specified. For iOS, this will store both audio and video related log entries. On MacOS, only video log entries are stored

    Declaration

    Swift

    public func videoTraceOutputHistory(_ filename: String)

    Parameters

    filename

    The filename to store buffered log entries to

  • Stores all IGAudio related log messages into the filename specified. For iOS, this will store both audio and video related log entries. On MacOS, only audio log entries are stored

    Declaration

    Swift

    public func audioTraceOutputHistory(_ filename: String)

    Parameters

    filename

    The filename to store buffered log entries to

  • Stores all CoreMeeting/SDK related log messages into the filename specified. If you’d like to see all log entries from IGAudio and IGVideo as well, call enableCombinedLogs() when your application starts

    Declaration

    Swift

    public func coreMeetingTraceOutputHistory(_ filename: String)

    Parameters

    filename

    The filename to store buffered log entries to

  • Set the path to which log files should be written to

    Declaration

    Swift

    @objc
    public func setLogDirectory(_ path: String) -> Bool

    Parameters

    path

    An absolute path representing the directory to write log files to

    Return Value

    true if the log directory was successfully created (or already exists), false if an error occurred

  • Delete a log file from the previously specified log directory

    Declaration

    Swift

    @objc
    public func deleteLogFile(_ fileName: String) -> Bool

    Parameters

    fileName

    The name of the file in the specified log directory to delete

    Return Value

    true if the file was deleted, false if there was an error deleting the file or if no log directory has been specified

  • Delete all log files in the specified logging directory

    Declaration

    Swift

    @objc
    public func deleteAllLogFiles() -> Bool

    Return Value

    true if the files were deleted, false if an error occurred or if no log directory has been specified

  • Deletes all entries in the current log file but then continues to log to that log file

    Declaration

    Swift

    @objc
    public func resetCurrentLogFile() -> Bool

    Return Value

    true if the reset was successful, false if an error occurred

  • Trims the current log file to the most recent entries that fit within the speified number of bytes

    Declaration

    Swift

    @objc
    public func trimCurrentLogFile(_ numBytes: Int32) -> Bool

    Parameters

    numBytes

    The maximum number of bytes to leave in the log file

    Return Value

    true if the operation was successful, false if there was no log directory or log file specified.

  • Flushes any buffered log messages to the current log file.

    Declaration

    Swift

    @objc
    public func flushCurrentLogFile() -> Bool

    Return Value

    true if the operation was successful, false if there was no log directory or log file specified.

  • Returns an array of file names present in the specified log directory

    Declaration

    Swift

    @objc
    public func getLogFiles() -> [String]

    Return Value

    An array of filename. Returns an empty array if the logging directory has not been specified or if an error occurs.

  • Gets a list of all available video devices

    • Description: Each string in the array that is returned is a valid device that can be passed to API calls that take a video device as a parameter.

    Declaration

    Swift

    public func getVideoDevices() -> [String]

    Return Value

    A String array with the device names of all available video devices

  • Gets a list of all available audio input devices

    • Description: Each string in the array is a valid device that can be passed to API calls that take a video device as a parameter. For iOS devices, only expect “Default device” to be returned. For MacOS, a full array of audio devices is returned.

    Declaration

    Swift

    public func getAudioInputDevices() -> [String]

    Return Value

    A String array with the device names of all available audio input devices

  • Gets a list of all available audio output devices

    • Description: Each string in the array is a valid device that can be passed to API calls that take a video device as a parameter. For iOS devices, only expect “Default device” to be returned. For MacOS, a full array of audio devices is returned.

    Declaration

    Swift

    public func getAudioOutputDevices() -> [String]

    Return Value

    A String array with the device names of all available audio output devices

  • Gets a list of all available application windows

    • Description:

    Declaration

    Swift

    public func getWindowList() -> [Int : String]

    Return Value

    A dictionary pairing all available window ID’s to window names

  • Declaration

    Swift

    public func getWindowThumbnail(id: String, format: String, dirPath: String, width: Int32, height: Int32) -> Data?
  • Get the current time zone

    Declaration

    Swift

    public func getTimeZone() -> String

    Return Value

    A String containing the time zone identifier corresponding to this machine’s time zone

  • Plays the WAV file named in the first parameter. Assumes there is a .wav file corresponding to the name passed in the application’s bundle

    Declaration

    Swift

    public func playSound(_ resource: String) -> UInt64

    Parameters

    resource

    The name of the .wav file (without the .wav extension) stored in the application’s bundle

    Return Value

    A UInt64 representing this sound

  • Stops the WAV file playing with the specified ID

    Declaration

    Swift

    public func stopSound(_ id: UInt64)

    Parameters

    id

    The UInt64 id of the sound playing that you wish to stop

  • Gets a list of supported video codecs for the specified device

    Declaration

    Swift

    public func getSupportedVideoSendResolutions(deviceId: String) -> [String]

    Parameters

    forDeviceId

    The specified device you wish to retrieve supported codecs for. This is likely a device returned by calling getVideoDevices.

    Return Value

    A String array containing the name of each supported codec for the specified device

  • Returns the Participant object that corresponds to the local user

    Declaration

    Swift

    public func getLocalParticipant() -> Participant?

    Return Value

    A Participant object that corresponds to the local user