QNConferenceRepository

public class QNConferenceRepository
extension QNConferenceRepository: ReactiveCompatible

Represents a conference

Properties

  • True if the user was invited to the room

    Declaration

    Swift

    public var invited: Bool { get }
  • Current user media constraints

    Declaration

    Swift

    public var userConstraints: [(constraint: QNConferenceConstraint, muted: Bool)] { get }
  • Current conference state

    Declaration

    Swift

    public var state: QNConferenceState { get }
  • Incoming invitation identifier

    Declaration

    Swift

    public var incomingInvitationId: String? { get }
  • QSS room identifier

    Declaration

    Swift

    public var roomId: String { get }
  • Room participants

    Declaration

    Swift

    public var participants: [String] { get }
  • Room identifier when make an attended transfer

    Declaration

    Swift

    public var attendedTransferRoomId: String? { get }

API

  • Allows the user to join the conference.

    Declaration

    Swift

    public func join(for constraints: [QNConferenceConstraint]?,
                     configuration: QNConferenceConfiguration,
                     result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    constraints

    List of media that the user wants to share.

    configuration

    Provides info about fps,format,camera position and codes used in conference

    result

    Async Result, success when join is completed

  • Allow user to preview remote media before accept/decline an invitation This method doesn’t join the user to the conference, only subscribe to remote media

    Declaration

    Swift

    public func previewMedia(prepareAudio: Bool, result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    prepareAudio

    Publish muted audio to avoid delays when user joins conference

    result

    Async Result, success when previewMedia is completed

  • Invite a participant to the conference

    Declaration

    Swift

    public func invite(to participant: String,
                       for constraints: [QNConferenceConstraint],
                       result: @escaping (Result<QNConferenceInvitationResponse, QNConferenceError>) -> Void)

    Parameters

    to

    An identifier like username@domain or alias

    constraints

    List of media that the caller wants the participant to share. User who receives can accept it or provide another one when joining to or updating the conference.

    result

    Async Result with SippoInvitationResponse

  • Invite a contact to the conference

    Declaration

    Swift

    public func invite(contact: QNContact,
                       for constraints: [QNConferenceConstraint],
                       result: @escaping (Result<QNConferenceInvitationResponse, QNConferenceError>) -> Void)

    Parameters

    contact

    a Contact instance

    constraints

    List of media that the caller wants the user to share. The user can accept it or provide another one when joining to or updating the conference.

    result

    Async Result with SippoInvitationResponse

  • Cancel an invitation to participant

    Declaration

    Swift

    public func cancelInvitation(to participant: String, result: @escaping (Result<String, QNConferenceError>) -> Void)

    Parameters

    to

    An identifier like username@domain or alias

    result

    Async Result with invitationId

  • Cancel an invitation to contact

    Declaration

    Swift

    public func cancelInvitation(to contact: QNContact, result: @escaping (Result<String, QNConferenceError>) -> Void)

    Parameters

    to

    a Contact instance

    result

    Async Result with invitationId

  • Expel a participant from a conference

    Declaration

    Swift

    public func expel(participant: QNConferenceParticipant, result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    participant

    Participant to expel

    result

    Async Result, success when expel is completed

  • Decline an invitation

    Declaration

    Swift

    public func declineInvitation()
  • Leave a conference

    Declaration

    Swift

    public func leave(result: ((Result<Void, QNConferenceError>) -> Void)?)

    Parameters

    result

    Async Result, success when leave is completed

  • Accept an attended transfer

    Declaration

    Swift

    public func acceptAttendedTransfer(result: @escaping (Result<Void, QNConferenceError>) -> Void)
  • Cancel an attended transfer

    Declaration

    Swift

    public func cancelAttendedTransfer(result: @escaping (Result<Void, QNConferenceError>) -> Void)
  • Starts a new blind transfer

    Declaration

    Swift

    public func transferUnattendedConference(to: String,
                                             constraints: [QNConferenceConstraint],
                                             result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    to

    An identifier like username@domain or alias who will be called

    constraints

    List of media that the caller wants the participant to share.

    result

    Async Result, success when transfer is completed

  • Starts a new blind transfer

    Declaration

    Swift

    public func transferUnattendedConference(to: String,
                                             result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    to

    An identifier like username@domain or alias who will be called with current user list of media that the caller wants the participant to share.

    result

    Async Result, success when transfer is completed

  • Starts a new blind transfer

    Declaration

    Swift

    public func transferUnattendedConference(to contact: QNContact,
                                             constraints: [QNConferenceConstraint],
                                             result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    to

    a Contact instance

    constraints

    List of media that the caller wants the participant to share.

    result

    Async Result, success when transfer is completed

  • Accepts a blind transfer

    Declaration

    Swift

    public func acceptUnattendedTransfer(_ conferenceTransfer: QNConferenceTransfer,
                                         result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    sippoTransfer

    Transfer to be accepted

    result

    Async Result, success when accept is completed

  • Update a conference with new media, this override current media

    Declaration

    Swift

    public func update(constraints: [QNConferenceConstraint], result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    constraints

    New shared media

    result

    Async Result, success when update is completed

  • Pause publish and subscribe media actions to attend other conference

    Declaration

    Swift

    public func hold(completion: @escaping () -> Void)

    Return Value

    Complete when hold is finished

  • Restart media which had been published/suscribed before hold

    Declaration

    Swift

    public func unhold(completion: @escaping () -> Void)

    Return Value

    Complete when unhold is finished

  • Switch camera to front or back position

    Declaration

    Swift

    public func switchCamera()
  • Start recording conference

    Declaration

    Swift

    public func startRecording(result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    result

    Async Result, success when startRecording is completed

  • Stop recording conference

    Declaration

    Swift

    public func stopRecording(result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    result

    Async Result, success when stopRecording is completed

  • View rendering local video if user is sharing video

    Declaration

    Swift

    public func userView(frame rect: CGRect) -> UIView?

    Parameters

    rect

    Rect for UIView

    metalRender

    Use metal library for video view

    Return Value

    UIView rendering local video

  • View rendering remote video if participant is sharing video

    Declaration

    Swift

    public func viewFor(remoteParticipant: QNConferenceParticipant, frame rect: CGRect) -> UIView?

    Parameters

    participant

    Participant

    rect

    Rect for UIView

    metalRender

    Use metal library for video view

    Return Value

    A UIView rendering remote video if participant is sharing it

  • Remote participants in conference

    Declaration

    Swift

    public func remoteParticipants(completion: @escaping ([(participant: QNConferenceParticipant, activeConstraints: [QNConferenceConstraint], status: QNConferenceParticipant.Status)]) -> Void)

    Parameters

    completion

    Closure to receive participants with active constraints and status

  • Mute conference audio

    Declaration

    Swift

    public func muteConferenceAudio()
  • Unmute conference audio

    Declaration

    Swift

    public func unmuteConferenceAudio()
  • Mute local media

    Declaration

    Swift

    public func muteLocal(constraint: QNConferenceConstraint)

    Parameters

    constraint

    video or audio

  • Unmute local media

    Declaration

    Swift

    public func unmuteLocal(constraint: QNConferenceConstraint)

    Parameters

    constraint

    video or audio

  • Mute remote media

    Declaration

    Swift

    public func muteRemoteVideo(participant: QNConferenceParticipant)

    Parameters

    participant

    Participant to mute

  • Unmute remote media

    Declaration

    Swift

    public func unmuteRemoteVideo(participant: QNConferenceParticipant)

    Parameters

    participant

    Participant to unmute

  • Send dtmf sounds

    Declaration

    Swift

    public func send(dtmf: String,
                     result: @escaping (Result<Void, QNConferenceError>) -> Void)

    Parameters

    dtmf

    dialpad number