Protocols

The following protocols are available globally.

  • The interface is the foundation of the RTMPStream and SRTStream.

    See more

    Declaration

    Swift

    public protocol HKStream : MediaMixerOutput, Actor
  • A type with a network bitrate strategy representation.

    See more

    Declaration

    Swift

    public protocol HKStreamBitRateStrategy : Sendable
  • A delegate protocol your app implements to receive capture stream output events.

    See more

    Declaration

    Swift

    public protocol HKStreamOutput : AnyObject, Sendable
  • A delegate protocol implements to receive stream output events.

    See more

    Declaration

    Swift

    public protocol MediaMixerOutput : AnyObject, Sendable
  • The interface is the foundation of the RTMPConneciton.

    See more

    Declaration

    Swift

    public protocol NetworkConnection : Actor
  • A type that represents a factory of network monitor object.

    See more

    Declaration

    Swift

    public protocol NetworkTransportReporter : Actor
  • A marker type with a chroma key processable screen object.

    See more

    Declaration

    Swift

    @ScreenActor
    public protocol ChromaKeyProcessable
  • An interface a screen uses to inform its delegate.

    See more

    Declaration

    Swift

    public protocol ScreenDelegate : AnyObject
  • A type that renders a screen object.

    See more

    Declaration

    Swift

    @ScreenActor
    public protocol ScreenRenderer : AnyObject
  • An object that apply a video effect.

    Example code:

    final class MonochromeEffect: VideoEffect {
        let filter: CIFilter? = CIFilter(name: "CIColorMonochrome")
    
        func execute(_ image: CIImage) -> CIImage {
            guard let filter: CIFilter = filter else {
                return image
            }
            filter.setValue(image, forKey: "inputImage")
            filter.setValue(CIColor(red: 0.75, green: 0.75, blue: 0.75), forKey: "inputColor")
            filter.setValue(1.0, forKey: "inputIntensity")
            return filter.outputImage ?? image
        }
    }
    
    See more

    Declaration

    Swift

    public protocol VideoEffect : AnyObject
  • A type that methods for running.

    See more

    Declaration

    Swift

    public protocol Runner : AnyObject
  • A type that methods for running.

    See more

    Declaration

    Swift

    public protocol AsyncRunner : Actor