Conversation
open class Conversation : Observable<ConversationEvent>
extension Conversation: Equatable
Represents conversation N-N communication context
-
Undocumented
Declaration
Swift
open internal(set) var cloudPublicId: String? { get }
-
Undocumented
Declaration
Swift
open internal(set) var instanceId: String? { get }
-
Declaration
Swift
open internal(set) var accessType: ConversationAccessType! { get }
-
Declaration
Swift
open internal(set) var status: ConversationStatus! { get }
-
Declaration
Swift
open internal(set) var access: ConversationAccess? { get }
-
Local user conversation related role
Declaration
Swift
open internal(set) var role: ConversationUserRole? { get }
-
Declaration
Swift
open internal(set) var friendlyName: String? { get }
-
Conversation’s moderator user id
Declaration
Swift
open internal(set) var moderatorId: String? { get }
-
Joins a conversation. Once in the conversation the user will be able to see other contacts inside it, send and receive messages, publish and subscribe to streams
Declaration
Swift
open func join(completion: @escaping (_ error: Error?, _ accessAllowed: Bool) -> Void)
-
Cancel joining process
Declaration
Swift
open func cancelJoin()
-
Leaves conversation. The user will automatically stop publishing its streams to the conversation and stop subscribing to any events from the conversation.
Declaration
Swift
open func leave(completion: @escaping (() -> Void))
-
Invites
Contact
to the conversationDeclaration
Swift
open func sendInvitation(contact: Contact, completion: @escaping (_ invitation: SentInvitation?) -> Void)
-
Undocumented
Declaration
Swift
open func sendMessage(message: String, file: FileInfo? = nil, completion: @escaping (_ error: Error?, _ message: ChatMessage?) -> Void)
-
Unpublishes currently published stream to conversation
Declaration
Swift
open func unpublishStreamWithId(_ streamId: String, completion: (() -> Void)? = nil)
-
Subscribes to a stream. The subscription will automatically stop if the contact publishing the stream unpublishes it. The
ConversationEvent.streamAdded(_:)
event will be fired when the stream becomes available. TheConversationEvent.streamRemoved(_:)
event will be fired when the stream is no longer available.Declaration
Swift
open func subscribeToStream(streamId: String)
-
Unsubscribes from a conversation’s stream
Declaration
Swift
open func unsubscribeFromStreamWithId(_ streamId: String, completion: (() -> Void)? = nil)
-
Declaration
Swift
open func getAvailableStreamList() -> [StreamInfo]?
Return Value
Information for media streams available in the conversation
-
Gets a stream using
ConversationCall.id
Declaration
Swift
open func getStreamForConversationCall(callId: String) -> Stream?
-
Declaration
Swift
open func getPublishedStreams() -> [Stream]?
Return Value
Published streams list
-
Declaration
Swift
open func getSubscribedStreams() -> [Stream]?
Return Value
Subscribed streams list
-
Declaration
Swift
open func getStream(streamId: String) -> Stream?
-
Declaration
Swift
open func getContacts() -> [Contact]?
Return Value
Contacts list within the conversation
-
Declaration
Swift
open func getName() -> String
Return Value
Conversation name
-
Declaration
Swift
open func getConversationCall(_ streamId: String) -> ConversationCall?
Return Value
ConversationCall
usingStream.id
-
Checks if the conversation is joined
Declaration
Swift
open func isJoined() -> Bool
-
Starts new whiteboard session
Declaration
Swift
open func startWhiteboardSession(completion: @escaping (_ error: Error?, _ client: WhiteboardClient?) -> Void)
-
Stops whiteboard session
Declaration
Swift
open func stopWhiteboardSession()
-
Uploads media Currently limited to .jpeg only Use
Conversation.pushData
to upload other data typesDeclaration
Swift
open func uploadMedia(media: Data, completion: @escaping (_ error: Error?, _ media: CloudMediaInfo?) -> Void)
-
Fetch conversation media list from the cloud
Declaration
Swift
open func fetchMediaList(options: [String : Any?]? = nil, completion: @escaping ((_ error: Error?, _ medias: [Media]?) -> Void))
-
Pushes arbitrary data using data channel Limited by 50MB
Declaration
Swift
open func pushData(descriptor: PushBufferDataDescriptor, completion: @escaping (_ error: Error?, _ info: CloudMediaInfo?) -> Void)
-
Undocumented
Declaration
Swift
open func cancelPushData(id: String, completion: @escaping () -> Void)
-
Send raw data json message to conversation contacts Use
Conversation.pushData
to upload data of large amountsDeclaration
Swift
open func sendRawData(data: [String : Any])
-
Throws
Conversation.Err
if the name is not validDeclaration
Swift
open class func typeOfName(_ name: String) throws -> ConversationAccessType
Return Value
ConversationAccessType
using conversation name -
Declaration
Swift
open class func isNameValid(_ id: String) -> Bool
Return Value
Name check result
-
Undocumented
Declaration
Swift
open override func onEvent(_ observer: AnyObject, _ callback: @escaping ((ConversationEvent) -> Void))
-
Declaration
Swift
public static func == (lhs: Conversation, rhs: Conversation) -> Bool