PlanetKitScreenControllable

@objc
public protocol PlanetKitScreenControllable : PlanetKitFpsLimitUpdateDelegate

A protocol that defines the controllable behavior of a PlanetKit screen.

  • The current device used for screen capture.

    Declaration

    Swift

    var currentDevice: PlanetKitScreenCaptureDevice? { get }
  • The preferred frame rate for the screen.

    Declaration

    Swift

    var preferredFrameRate: PlanetKitFrameRate { get set }
  • A Boolean value indicating whether the screen is started.

    Declaration

    Swift

    var isStart: Bool { get }
  • Starts the screen capture with the specified device.

    Declaration

    Swift

    func start(device: PlanetKitScreenCaptureDevice, completion: @escaping (Bool) -> Void)

    Parameters

    device

    The device to use for screen capture.

    completion

    A closure that is called when the start operation is completed. The closure takes a Boolean parameter indicating whether the operation was successful.

  • Stops the screen capture.

    Declaration

    Swift

    func stop(completion: @escaping (Bool) -> Void)

    Parameters

    completion

    A closure that is called when the stop operation is completed. The closure takes a Boolean parameter indicating whether the operation was successful.

  • Changes the device used for screen capture.

    Declaration

    Swift

    func change(device: PlanetKitScreenCaptureDevice, completion: @escaping (Bool) -> Void)

    Parameters

    device

    The new device to use for screen capture.

    completion

    A closure that is called when the change operation is completed. The closure takes a Boolean parameter indicating whether the operation was successful.

  • Adds an interrupt receiver to the screen.

    Declaration

    Swift

    func addInterruptReceiver(_ interruptReceiver: PlanetKitScreenInterruptDelegate)

    Parameters

    interruptReceiver

    The interrupt receiver to add.

  • Removes an interrupt receiver from the screen.

    Declaration

    Swift

    func removeInterruptReceiver(_ interruptReceiver: PlanetKitScreenInterruptDelegate)

    Parameters

    interruptReceiver

    The interrupt receiver to remove.

  • The delegate for the video stream.

    Declaration

    Swift

    weak var delegate: PlanetKitVideoStreamDelegate? { get set }