Skip to navigation

VILocalVideoStream

VoximplantCalls · iOS SDK v3

View as Markdown

Class that represents a local video stream.

@objc final class VILocalVideoStream

Initializers

init(videoSource:)

@objc init?(videoSource: VILocalVideoSource)

Creates the local video stream instance with the provided video source.

Parameters

videoSource VILocalVideoSource

Video source for the local video stream.

Properties

description

override var description: String { get }

Stream description.

id

let id: String

Local video stream id.

renderers

var renderers: [VIVideoRenderer] { get }

Array of video renderers that are currently rendering the video stream.

size

var size: CGSize { get }

Width and height of a captured video frame.

source

@objc let source: VILocalVideoSource

Local video stream source.

type

Local video stream type.

Methods

addRenderer(_:completion:)

func addRenderer(_ renderer: VIVideoRenderer, completion: @escaping (VIVideoSourceError?) -> Void)

Adds a new video renderer to the video stream.

Parameters

renderer VIVideoRenderer

Video renderer. Must be the instance of VIVideoRendererUIView.

completion @escaping (VIVideoSourceError?) -> Void

Completion handler to call when the operation is complete. This handler is executed on the main queue. The SDK passes the VIVideoSourceError object if the operation has failed.

It is recommended to call this method on the main queue and when the application is in the foreground.

isEqual(_:)

override func isEqual(_ object: Any?) -> Bool

removeAllRenderers()

func removeAllRenderers()

Removes all video renderers associated with the video stream.

It is recommended to call this method on the main queue.

removeRenderer(_:)

func removeRenderer(_ renderer: VIVideoRenderer)

Removes the previously added video renderer from the video stream.

Parameters

renderer VIVideoRenderer

Video renderer

It is recommended to call this method on the main queue.

Relationships

Inherits From: NSObject

Conforms To: ObjectiveC.NSObjectProtocol, Swift.CVarArg, Swift.CustomDebugStringConvertible, Swift.CustomStringConvertible, Swift.Equatable, Swift.Hashable, VIVideoStream