HKStream
public protocol HKStream : MediaMixerOutput, Actor
The interface is the foundation of the RTMPStream and SRTStream.
-
The current state of the stream.
Declaration
Swift
var readyState: HKStreamReadyState { get }
-
soundTransform
AsynchronousThe sound transform value control.
Declaration
Swift
var soundTransform: SoundTransform? { get async }
-
The audio compression properties.
Declaration
Swift
var audioSettings: AudioCodecSettings { get }
-
The video compression properties.
Declaration
Swift
var videoSettings: VideoCodecSettings { get }
-
Sets the bitrate storategy object.
Declaration
Swift
func setBitrateStorategy(_ bitrateStorategy: (some HKStreamBitRateStrategy)?)
-
Sets the audio compression properties.
Declaration
Swift
func setAudioSettings(_ audioSettings: AudioCodecSettings)
-
Sets the video compression properties.
Declaration
Swift
func setVideoSettings(_ videoSettings: VideoCodecSettings)
-
setSoundTransform(_:
Asynchronous) Sets the sound transform value control.
Declaration
Swift
func setSoundTransform(_ soundTransfrom: SoundTransform) async
-
Sets the video input buffer counts.
Declaration
Swift
func setVideoInputBufferCounts(_ videoInputBufferCounts: Int)
-
Appends a CMSampleBuffer.
Declaration
Swift
func append(_ sampleBuffer: CMSampleBuffer)
Parameters
sampleBuffer
The sample buffer to append.
-
Appends an AVAudioBuffer.
Declaration
Swift
func append(_ audioBuffer: AVAudioBuffer, when: AVAudioTime)
Parameters
audioBuffer
The audio buffer to append.
when
The audio time to append.
-
attachAudioPlayer(_:
Asynchronous) Attaches an audio player instance for playback.
Declaration
Swift
func attachAudioPlayer(_ audioPlayer: AudioPlayer?) async
-
Adds an output observer.
Declaration
Swift
func addOutput(_ obserber: some HKStreamOutput)
-
Removes an output observer.
Declaration
Swift
func removeOutput(_ observer: some HKStreamOutput)
-
dispatch(_:
Asynchronous) Dispatch a network monitor event.
Declaration
Swift
func dispatch(_ event: NetworkMonitorEvent) async