SRTStream
An actor that provides the interface to control a one-way channel over a SRTConnection.
-
Declaration
Swift
@Published public private(set) var readyState: HKStreamReadyState { get set }
-
Declaration
Swift
public private(set) var videoTrackId: UInt8? { get }
-
Declaration
Swift
public private(set) var audioTrackId: UInt8? { get }
-
Creates a new stream object.
Declaration
Swift
public init(connection: SRTConnection)
-
publish(_:
Asynchronous) Sends streaming audio, vidoe and data message from client.
Declaration
Swift
public func publish(_ name: String? = "") async
-
play(_:
Asynchronous) Playback streaming audio and video message from server.
Declaration
Swift
public func play(_ name: String? = "") async
-
close()
AsynchronousStops playing or publishing and makes available other uses.
Declaration
Swift
public func close() async
-
soundTransform
AsynchronousDeclaration
Swift
public var soundTransform: SoundTransform? { get async }
-
setSoundTransform(_:
Asynchronous) Declaration
Swift
public func setSoundTransform(_ soundTransform: SoundTransform) async
-
Declaration
Swift
public var audioSettings: AudioCodecSettings { get }
-
Declaration
Swift
public var videoSettings: VideoCodecSettings { get }
-
Declaration
Swift
public func setAudioSettings(_ audioSettings: AudioCodecSettings)
-
Declaration
Swift
public func setVideoSettings(_ videoSettings: VideoCodecSettings)
-
Declaration
Swift
public func setBitrateStorategy(_ bitrateStorategy: (some HKStreamBitRateStrategy)?)
-
Declaration
Swift
public func setVideoInputBufferCounts(_ videoInputBufferCounts: Int)
-
Declaration
Swift
public func append(_ sampleBuffer: CMSampleBuffer)
-
Declaration
Swift
public func append(_ audioBuffer: AVAudioBuffer, when: AVAudioTime)
-
attachAudioPlayer(_:
Asynchronous) Declaration
Swift
public func attachAudioPlayer(_ audioPlayer: AudioPlayer?) async
-
Declaration
Swift
public func addOutput(_ observer: some HKStreamOutput)
-
Declaration
Swift
public func removeOutput(_ observer: some HKStreamOutput)
-
dispatch(_:
Asynchronous) Declaration
Swift
public func dispatch(_ event: NetworkMonitorEvent) async
-
Declaration
Swift
public func selectTrack(_ id: UInt8?, mediaType: CMFormatDescription.MediaType)
-
Declaration
Swift
nonisolated public func mixer(_ mixer: MediaMixer, didOutput sampleBuffer: CMSampleBuffer)
-
Declaration
Swift
nonisolated public func mixer(_ mixer: MediaMixer, didOutput buffer: AVAudioPCMBuffer, when: AVAudioTime)