SRTStream

public actor SRTStream
extension SRTStream: HKStream
extension SRTStream: MediaMixerOutput

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() Asynchronous

    Stops playing or publishing and makes available other uses.

    Declaration

    Swift

    public func close() async

HKStream

MediaMixerOutput