LiveKit Swift Client SDK Documentation

Class Track

@objc
public class Track: NSObject, Loggable  
%21 Track Track Identifiable Identifiable Track->Identifiable Loggable Loggable Track->Loggable NSObject NSObject Track->NSObject MulticastDelegateProtocol MulticastDelegateProtocol Track->MulticastDelegateProtocol LocalAudioTrack LocalAudioTrack LocalAudioTrack->Track RemoteAudioTrack RemoteAudioTrack RemoteAudioTrack->Track RemoteVideoTrack RemoteVideoTrack RemoteVideoTrack->Track LocalVideoTrack LocalVideoTrack LocalVideoTrack->Track

Nested Types

Track.Kind
Track.TrackState
Track.Source
Track.PublishState

Subclasses

LocalAudioTrack
LocalVideoTrack
RemoteAudioTrack
RemoteVideoTrack

Conforms To

Loggable

Allows to extend with custom log method which automatically captures current type (class name).

MulticastDelegateProtocol
Identifiable
NSObject

Properties

description

public override var description: String  

camera​Name

@objc
    public static let cameraName = "camera"

microphone​Name

@objc
    public static let microphoneName = "microphone"

screen​Share​Video​Name

@objc
    public static let screenShareVideoName = "screen_share"

screen​Share​Audio​Name

@objc
    public static let screenShareAudioName = "screen_share_audio"

kind

@objc
    public let kind: Track.Kind

source

@objc
    public let source: Track.Source

name

@objc
    public let name: String

sid

@objc
    public var sid: Sid?  

muted

@objc
    public var muted: Bool  

stats

@objc
    public var stats: TrackStats?  

dimensions

@objc
    public var dimensions: Dimensions?  

Dimensions of the video (only if video track)

video​Frame

public var videoFrame: RTCVideoFrame?  

The last video frame received for this track

track​State

@objc
    public var trackState: TrackState  

state

@available(*, deprecated, renamed: "trackState")
    public var state: TrackState  

id

public var id: String  

Methods

start​Obj​C()

@objc(start)
    @discardableResult
    public func startObjC() -> Promise<Bool>.ObjCPromise<NSNumber>  

stop​Obj​C()

@objc(stop)
    @discardableResult
    public func stopObjC() -> Promise<Bool>.ObjCPromise<NSNumber>  

start()

public func start() -> Promise<Bool>  

stop()

public func stop() -> Promise<Bool>  

add(delegate:​)

@objc(addDelegate:)
    public func add(delegate: TrackDelegate)  

remove(delegate:​)

@objc(removeDelegate:)
    public func remove(delegate: TrackDelegate)  

remove​All​Delegates()

@objc
    public func removeAllDelegates()