Actors

The following actors are available globally.

  • An object that provides the interface to control audio playback.

    See more

    Declaration

    Swift

    public final actor AudioPlayer
  • An actor that provides a stream playback feature.

    See more

    Declaration

    Swift

    public final actor HKIncomingStream
    extension HKIncomingStream: AsyncRunner
  • An actor provides an algorithm that focuses on video bitrate control.

    See more

    Declaration

    Swift

    public final actor HKStreamVideoAdaptiveBitRateStrategy : HKStreamBitRateStrategy
  • An actor represents video and audio recorder.

    This actor is compatible with both HKStreamOutput and MediaMixerOutput. This means it can record the output from MediaMixer in addition to HKStream.

     // An example of recording MediaMixer.
     let recorder = HKStreamRecorder()
     let mixer = MediaMixer()
     mixer.addOutput(recorder)
    
     // An example of recording streaming.
     let recorder = HKStreamRecorder()
     let mixer = MediaMixer()
     let stream = RTMPStream()
     mixer.addOutput(stream)
     stream.addOutput(recorder)
    
    See more

    Declaration

    Swift

    public actor HKStreamRecorder
    extension HKStreamRecorder: HKStreamOutput
    extension HKStreamRecorder: MediaMixerOutput
  • An actor that mixies audio and video for streaming.

    See more

    Declaration

    Swift

    public final actor MediaMixer
    extension MediaMixer: AsyncRunner
  • An objec thatt provides the RTMPConnection, SRTConnection’s monitoring events.

    See more

    Declaration

    Swift

    public final actor NetworkMonitor
    extension NetworkMonitor: AsyncRunner
  • The RTMPConneciton class create a two-way RTMP connection.

    See more

    Declaration

    Swift

    public actor RTMPConnection : NetworkConnection
  • The RTMPSharedObject class is used to read and write data on a server.

    See more

    Declaration

    Swift

    public actor RTMPSharedObject
  • An object that provides the interface to control a one-way channel over an RTMPConnection.

    See more

    Declaration

    Swift

    public actor RTMPStream
    extension RTMPStream: HKStream
    extension RTMPStream: MediaMixerOutput
  • A singleton actor whose executor screen object rendering.

    See more

    Declaration

    Swift

    @globalActor
    public actor ScreenActor
  • An actor that provides the interface to control a two-way SRT connection.

    See more

    Declaration

    Swift

    public actor SRTConnection : NetworkConnection
  • An actor that provides the interface to control a one-way channel over a SRTConnection.

    See more

    Declaration

    Swift

    public actor SRTStream
    extension SRTStream: HKStream
    extension SRTStream: MediaMixerOutput