ApiRTC iOS SDK Documentation

Class Call

open class Call: Observable<CallEvent>  

Designates a P2P call with another contact. During a call, both the user and the contact may publish and subscribe to each other's streams.

Call Call Descriptable Descriptable Call->Descriptable Observable<CallEvent> Observable<CallEvent> Call->Observable<CallEvent>

Conforms To

Observable<CallEvent>

Properties

id

open private(set) var id: String! 

status

open private(set) var status: CallStatus! 

Methods

hang​Up(completion:​)

open func hangUp(completion: @escaping () -> Void)  

Stops call with contact

replace​Published​Stream(with​Stream:​completion:​)

open func replacePublishedStream(withStream stream: Stream, completion: @escaping (_ error: Error?) -> Void)  

Replaces the currently published stream by a given one. If the first parameter is null then the second parameter must provides a property named getStream. The getStream property shall be a function returning a Promise of a Stream

stop​Published​Stream(stream​Id:​completion:​)

open func stopPublishedStream(streamId: String, completion: @escaping (_ error: Error?) -> Void)  

Stops the currently published stream

get​Received​Streams()

open func getReceivedStreams() -> [Stream]?  

Returns call's currently received streams

get​Published​Streams()

open func getPublishedStreams() -> [Stream]?  

Returns call's currently published streams

get​Contact()

open func getContact() -> Contact?  

Returns called contact

on​Event(_:​_:​)

open override func onEvent(_ observer: AnyObject, _ callback: @escaping ((CallEvent) -> Void))