PlayerPictureInPicturePlayable

public protocol PlayerPictureInPicturePlayable : AnyObject

Player interface for Picture In Picture playback. These APIs must be used for supporting PiP playback with custom UI ViewController. These APIs are no-op while using AVPlayerViewController.

  • Indicates whether Picture in Picture is supported on the current device.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    var isPictureInPictureSupported: Bool { get }
  • A Boolean value that indicates whether the Picture in Picture playback is currently possible.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    var isPicureInPicturePossible: Bool { get }
  • A Boolean value that indicates whether the controller’s Picture in Picture window is onscreen.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    var isPictureInPictureActive: Bool { get }
  • A Boolean value that indicates whether the controller’s Picture in Picture window is suspended.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    var isPictureInPictureSuspended: Bool { get }
  • API to temporarily enforce playback of mandatory content (such as legalese or advertisements) with PIP

    Declaration

    Swift

    @available(iOS 14.0, tvOS 14.0, *)
    var requiresLinearPlayback: Bool? { get set }
  • Picture In Picture Proxy. Ad providers providing support for PiP can use this to get PiP callbacks.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    var pictureInPictureProxy: AVPictureInPictureControllerDelegate? { get set }
  • PIP starts automatically when transitioning to the background when the view controller presents its content inline.

    Declaration

    Swift

    @available(iOS 14.2, *)
    var canStartPictureInPictureAutomaticallyFromInline: Bool? { get set }
  • Starts Picture in Picture.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    func startPictureInPicture()
  • Stops Picture in Picture.

    Declaration

    Swift

    @available(tvOS 14.0, *)
    func stopPictureInPicture()