Class
Stream
open class Stream: Observable<StreamEvent>
Relationships
Conforms To
Observable<StreamEvent>
Properties
id
var id: String!
type
var type: StreamType = .unknown
captureSession
var captureSession: AVCaptureSession?
Capture session if applicable
device
var device: AVCaptureDevice?
Capture device if applicable
format
var format: AVCaptureDevice.Format?
Capture format if applicable
Methods
createCameraStream(position:format:)
open class func createCameraStream(position: AVCaptureDevice.Position, format: AVCaptureDevice.Format? = nil) throws -> Stream
Creates a camera stream with given settings
createExternalCameraStream()
open class func createExternalCameraStream() -> Stream
muteAudio()
open func muteAudio()
Mutes audio. If this stream is published to another contact, the stream will also be muted on the contact's side. If this stream is subscribed from another contact, muting the stream will have no impact on the contact's side
unmuteAudio()
open func unmuteAudio()
Unmutes audio. If this stream is published to another contact, the stream will also be unmuted on the contact's side. If this stream is subscribed from another contact, unmuting the stream will have no impact on the contact's side, moreover, it will not unmute the stream if it has been muted by the contact
muteVideo()
open func muteVideo()
Mutes video. If this stream is published to another contact, the stream will also be muted on the contact's side. If this stream is subscribed from another contact, muting the stream will have no impact on the contact's side
unmuteVideo()
open func unmuteVideo()
Unmutes video. If this stream is published to another contact, the stream will also be unmuted on the contact's side. If this stream is subscribed from another contact, muting the stream will have no impact on the contact's side, moreover, it will not unmute the stream if it has been muted by the contact
isAudioMuted()
open func isAudioMuted() -> Bool
Returns whether the audio track in muted
isVideoMuted()
open func isVideoMuted() -> Bool
Returns whether the video track in muted
hasAudio()
open func hasAudio() -> Bool
Checks if stream has at least one audio track
hasVideo()
open func hasVideo() -> Bool
Checks if stream has at least one video track
supportedFormats(_:)
open class func supportedFormats(_ device: AVCaptureDevice) -> [AVCaptureDevice.Format]
Returns supported formats by WebRTC for the given device
addRenderer(_:)
open func addRenderer(_ renderer: RTCVideoRenderer)
Adds renderer to the current VideoTrack
if applicable
getConversations()
open func getConversations() -> [Conversation]?
Returns conversations the stream is published in
onEvent(_:_:)
open override func onEvent(_ observer: AnyObject, _ callback: @escaping ((StreamEvent) -> Void))