QNConferenceRepository
@MainActor
public final class QNConferenceRepository
Represents a conference
-
True if the user was invited to the room
Declaration
Swift
@MainActor public var invited: Bool { get } -
userConstraintsAsynchronousCurrent user media constraints
Declaration
Swift
@MainActor public var userConstraints: [(constraint: QNConferenceConstraint, muted: Bool)] { get async } -
Current conference state
Declaration
Swift
@MainActor public var state: QNConferenceState { get } -
Incoming invitation identifier
Declaration
Swift
@MainActor public var incomingInvitationId: String? { get } -
QSS room identifier
Declaration
Swift
@MainActor public var roomId: String { get } -
Room participants
Declaration
Swift
@MainActor public var participants: [String] { get } -
Room identifier when make an attended transfer
Declaration
Swift
@MainActor public var attendedTransferRoomId: String? { get }
-
join(for:Asynchronousconfiguration: ) Allows the user to join the conference.
Declaration
Swift
@MainActor public func join(for constraints: [QNConferenceConstraint]? = nil, configuration: QNConferenceConfiguration = QNConferenceConfiguration()) async throwsParameters
constraintsList of media that the user wants to share.
configurationProvides info about fps,format,camera position and codes used in conference
-
previewMedia(prepareAudio:Asynchronous) 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
@MainActor public func previewMedia(prepareAudio: Bool) async throwsParameters
prepareAudioPublish muted audio to avoid delays when user joins conference
-
invite(to:Asynchronousfor: ) Invite a participant to the conference
Declaration
Swift
@MainActor public func invite(to participant: String, for constraints: [QNConferenceConstraint]) async throws -> QNConferenceInvitationResponseParameters
toAn identifier like username@domain or alias
constraintsList 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.
resultAsync Result with ConferenceInvitationResponse
-
invite(contact:Asynchronousfor: ) Invite a contact to the conference
Declaration
Swift
@MainActor public func invite(contact: QNContact, for constraints: [QNConferenceConstraint]) async throws -> QNConferenceInvitationResponseParameters
contacta Contact instance
constraintsList 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.
resultAsync Result with ConferenceInvitationResponse
-
cancelInvitation(to:Asynchronous) Cancel an invitation to participant
Declaration
Swift
@MainActor public func cancelInvitation(to participant: String) async throws -> StringParameters
toAn identifier like username@domain or alias
resultAsync Result with invitationId
-
cancelInvitation(to:Asynchronous) Cancel an invitation to contact
Declaration
Swift
@MainActor public func cancelInvitation(to contact: QNContact) async throws -> StringParameters
toa Contact instance
resultAsync Result with invitationId
-
expel(participant:Asynchronous) Expel a participant from a conference
Declaration
Swift
@MainActor public func expel(participant: QNConferenceParticipant) async throwsParameters
participantParticipant to expel
resultAsync Result, success when expel is completed
-
Decline an invitation
Declaration
Swift
@MainActor public func declineInvitation() -
leave()AsynchronousLeave a conference
Declaration
Swift
@MainActor public func leave() async throwsParameters
resultAsync Result, success when leave is completed
-
acceptAttendedTransfer()AsynchronousAccept an attended transfer
Declaration
Swift
@MainActor public func acceptAttendedTransfer() async throws -
cancelAttendedTransfer()AsynchronousCancel an attended transfer
Declaration
Swift
@MainActor public func cancelAttendedTransfer() async throws -
transferUnattendedConference(to:Asynchronousconstraints: ) Starts a new blind transfer
Declaration
Swift
@MainActor public func transferUnattendedConference(to: String, constraints: [QNConferenceConstraint]) async throwsParameters
toAn identifier like username@domain or alias who will be called
constraintsList of media that the caller wants the participant to share.
resultAsync Result, success when transfer is completed
-
transferUnattendedConference(to:Asynchronous) Starts a new blind transfer
Declaration
Swift
@MainActor public func transferUnattendedConference(to: String) async throwsParameters
toAn identifier like username@domain or alias who will be called with current user list of media that the caller wants the participant to share.
resultAsync Result, success when transfer is completed
-
transferUnattendedConference(to:Asynchronousconstraints: ) Starts a new blind transfer
Declaration
Swift
@MainActor public func transferUnattendedConference(to contact: QNContact, constraints: [QNConferenceConstraint]) async throwsParameters
toa Contact instance
constraintsList of media that the caller wants the participant to share.
resultAsync Result, success when transfer is completed
-
acceptUnattendedTransfer(_:Asynchronous) Accepts a blind transfer
Declaration
Swift
@MainActor public func acceptUnattendedTransfer(_ conferenceTransfer: QNConferenceTransfer) async throwsParameters
conferenceTransferTransfer to be accepted
resultAsync Result, success when accept is completed
-
update(constraints:Asynchronous) Update a conference with new media, this override current media
Declaration
Swift
@MainActor public func update(constraints: [QNConferenceConstraint]) async throwsParameters
constraintsNew shared media
resultAsync Result, success when update is completed
-
hold()AsynchronousPause publish and subscribe media actions to attend other conference
Declaration
Swift
@MainActor public func hold() async throwsReturn Value
Complete when hold is finished
-
unhold()AsynchronousRestart media which had been published/suscribed before hold
Declaration
Swift
@MainActor public func unhold() async throwsReturn Value
Complete when unhold is finished
-
switchCamera()AsynchronousSwitch camera to front or back position
Declaration
Swift
@MainActor public func switchCamera() async -
startRecording()AsynchronousStart recording conference
Declaration
Swift
@MainActor public func startRecording() async throwsParameters
resultAsync Result, success when startRecording is completed
-
stopRecording()AsynchronousStop recording conference
Declaration
Swift
@MainActor public func stopRecording() async throwsParameters
resultAsync Result, success when stopRecording is completed
-
userView(frame:Asynchronous) View rendering local video if user is sharing video
Declaration
Swift
@MainActor public func userView(frame rect: CGRect) async -> UIView?Parameters
rectRect for UIView
metalRenderUse metal library for video view
Return Value
UIView rendering local video
-
viewFor(remoteParticipant:Asynchronousframe: ) View rendering remote video if participant is sharing video
Declaration
Swift
@MainActor public func viewFor(remoteParticipant: QNConferenceParticipant, frame rect: CGRect) async -> UIView?Parameters
participantParticipant
rectRect for UIView
metalRenderUse metal library for video view
Return Value
A UIView rendering remote video if participant is sharing it
-
remoteParticipants()AsynchronousRemote participants in conference
Declaration
Swift
@MainActor public func remoteParticipants() async throws -> [(participant: QNConferenceParticipant, activeConstraints: [QNConferenceConstraint], status: QNConferenceParticipant.Status)]Parameters
completionClosure to receive participants with active constraints and status
-
muteConferenceAudio()AsynchronousMute conference audio
Declaration
Swift
@MainActor public func muteConferenceAudio() async -
unmuteConferenceAudio()AsynchronousUnmute conference audio
Declaration
Swift
@MainActor public func unmuteConferenceAudio() async -
muteLocal(constraint:Asynchronous) Mute local media
Declaration
Swift
@MainActor public func muteLocal(constraint: QNConferenceConstraint) asyncParameters
constraintvideo or audio
-
unmuteLocal(constraint:Asynchronous) Unmute local media
Declaration
Swift
@MainActor public func unmuteLocal(constraint: QNConferenceConstraint) asyncParameters
constraintvideo or audio
-
muteRemoteVideo(participant:Asynchronous) Mute remote media
Declaration
Swift
@MainActor public func muteRemoteVideo(participant: QNConferenceParticipant) asyncParameters
participantParticipant to mute
-
unmuteRemoteVideo(participant:Asynchronous) Unmute remote media
Declaration
Swift
@MainActor public func unmuteRemoteVideo(participant: QNConferenceParticipant) asyncParameters
participantParticipant to unmute
-
send(dtmf:Asynchronous) Send dtmf sounds
Declaration
Swift
@MainActor public func send(dtmf: String) async throwsParameters
dtmfdialpad number