Stream

open class Stream : Observable<StreamEvent>
extension Stream: Equatable
  • id

    Undocumented

    Declaration

    Swift

    open private(set) var id: String! { get }
  • Declaration

    Swift

    open private(set) var type: StreamType { get }
  • Stream pub/sub direction

    Declaration

    Swift

    open var direction: StreamDirection { get }
  • Capture device if local

    Declaration

    Swift

    open private(set) var device: AVCaptureDevice? { get }
  • Capture format if local

    Declaration

    Swift

    open private(set) var format: AVCaptureDevice.Format? { get }
  • Undocumented

    Declaration

    Swift

    open var hasAudio: Bool
  • Undocumented

    Declaration

    Swift

    open var hasVideo: Bool
  • Undocumented

    Declaration

    Swift

    open internal(set) var isAudioMuted: Bool { get }
  • Undocumented

    Declaration

    Swift

    open internal(set) var isVideoMuted: Bool { get }
  • Creates a camera stream with given settings

    Declaration

    Swift

    open class func createCameraStream(position: AVCaptureDevice.Position, format: AVCaptureDevice.Format? = nil) throws -> Stream
  • Creates audio stream

    Declaration

    Swift

    open class func createAudioStream() -> Stream
  • Creates external camera stream

    Declaration

    Swift

    open class func createExternalCameraStream() -> Stream
  • Adds renderer to the current VideoTrack

    Declaration

    Swift

    open func addRenderer(_ renderer: RTCVideoRenderer, mediaStream: MediaStream)
  • Declaration

    Swift

    open func getOwner() -> Contact?

    Return Value

    Stream’s owner Contact

  • 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

    Declaration

    Swift

    open func muteAudio()
  • 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

    Declaration

    Swift

    open func unmuteAudio()
  • 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

    Declaration

    Swift

    open func muteVideo()
  • 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

    Declaration

    Swift

    open func unmuteVideo()
  • Declaration

    Swift

    open class func supportedFormats(_ device: AVCaptureDevice) -> [AVCaptureDevice.Format]

    Return Value

    WebRTC supported formats for the given device

  • Takes the local stream’s snapshot

    Declaration

    Swift

    open func takePhoto(completion: @escaping (_ error: Error?, _ image: UIImage?) -> Void)
  • Undocumented

    Declaration

    Swift

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

    Swift

    public static func == (lhs: Stream, rhs: Stream) -> Bool