Package apple.avkit

Class AVPictureInPictureController

  • All Implemented Interfaces:
    NSObject

    public class AVPictureInPictureController
    extends NSObject
    AVPictureInPictureController AVPictureInPictureController is a subclass of NSObject that can be used to present the contents of an AVPlayerLayer or AVPlayerView floating on top of applications. API-Since: 9.0
    • Constructor Detail

      • AVPictureInPictureController

        protected AVPictureInPictureController​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isPictureInPictureSupported

        public static boolean isPictureInPictureSupported()
        isPictureInPictureSupported Whether or not Picture in Picture is supported on the current device. When NO, all initializers will return nil.
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • pictureInPictureButtonStartImageCompatibleWithTraitCollection

        @NotNull
        public static @NotNull UIImage pictureInPictureButtonStartImageCompatibleWithTraitCollection​(@Nullable
                                                                                                     @Nullable UITraitCollection traitCollection)
        pictureInPictureButtonStartImageCompatibleWithTraitCollection: System default Picture in Picture start template image for use in client's Picture in Picture button.
        Parameters:
        traitCollection - Traits that describe the image to retrieve, pass nil to use traits that describe the main screen.
      • pictureInPictureButtonStopImageCompatibleWithTraitCollection

        @NotNull
        public static @NotNull UIImage pictureInPictureButtonStopImageCompatibleWithTraitCollection​(@Nullable
                                                                                                    @Nullable UITraitCollection traitCollection)
        pictureInPictureButtonStopImageCompatibleWithTraitCollection: System default Picture in Picture stop template image for use in client's Picture in Picture button.
        Parameters:
        traitCollection - Traits that describe the image to retrieve, pass nil to use traits that describe the main screen.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • initWithPlayerLayer

        public AVPictureInPictureController initWithPlayerLayer​(@NotNull
                                                                @NotNull AVPlayerLayer playerLayer)
        initWithPlayerLayer: Initialize the picture in picture controller with a player layer.
        Parameters:
        playerLayer - The player layer from which to source the media content for the Picture in Picture controller.
      • isPictureInPictureActive

        public boolean isPictureInPictureActive()
        [@property] pictureInPictureActive Whether or not Picture in Picture is currently active.
      • isPictureInPicturePossible

        public boolean isPictureInPicturePossible()
        [@property] pictureInPicturePossible Whether or not Picture in Picture is currently possible.
      • isPictureInPictureSuspended

        public boolean isPictureInPictureSuspended()
        [@property] pictureInPictureSuspended Whether or not Picture in Picture is currently suspended.
      • playerLayer

        @NotNull
        public @NotNull AVPlayerLayer playerLayer()
        [@property] playerLayer The receiver's player layer.
      • startPictureInPicture

        public void startPictureInPicture()
        startPictureInPicture Start Picture in Picture for the provided AVPlayerLayer if possible. Receiver will call -pictureInPictureControllerWillStartPictureInPicture: if Picture in Picture is currently possible and -pictureInPictureControllerDidStartPictureInPicture: after a successful start. If starting Picture in Picture fails, -pictureInPictureControllerFailedToStartPictureInPicture:withError: is called on the delegate instead. Client can stop Picture in Picture by calling -stopPictureInPicture. In addition the user can stop Picture in Picture through user interaction. It is also possible that Picture in Picture is stopped by the Picture in Picture controller at any time. In all these cases receiver calls -pictureInPictureControllerWillStopPictureInPicture: on the delegate and -pictureInPictureControllerDidStopPictureInPicture:after the stop animation completed.
      • stopPictureInPicture

        public void stopPictureInPicture()
        stopPictureInPicture Stop the local Picture in Picture if currently active. On tvOS, this can also stop Picture in Picture sessions for other applications. See startPictureInPicture for details.
      • pictureInPictureButtonStartImage

        @NotNull
        public static @NotNull UIImage pictureInPictureButtonStartImage()
        [@property] pictureInPictureButtonStartImage System default Picture in Picture start template image for use in client's Picture in Picture button. API-Since: 13.0
      • pictureInPictureButtonStopImage

        @NotNull
        public static @NotNull UIImage pictureInPictureButtonStopImage()
        [@property] pictureInPictureButtonStopImage System default Picture in Picture stop template image for use in client's Picture in Picture button. API-Since: 13.0
      • requiresLinearPlayback

        public boolean requiresLinearPlayback()
        [@property] requiresLinearPlayback Disables certain user operations (fast forward, forward skip, and scrubbing). This can be used to temporarily enforce playback of mandatory content (such as legalese or advertisements). API-Since: 14.0
      • setRequiresLinearPlayback

        public void setRequiresLinearPlayback​(boolean value)
        [@property] requiresLinearPlayback Disables certain user operations (fast forward, forward skip, and scrubbing). This can be used to temporarily enforce playback of mandatory content (such as legalese or advertisements). API-Since: 14.0
      • canStartPictureInPictureAutomaticallyFromInline

        public boolean canStartPictureInPictureAutomaticallyFromInline()
        [@property] canStartPictureInPictureAutomaticallyFromInline Indicates whether Picture in Picture should be allowed to start automatically when transitioning to background when the receiver’s content is embedded inline. Default is NO. This property must only be set to YES for content intended to be the user's primary focus. API-Since: 14.2
      • setCanStartPictureInPictureAutomaticallyFromInline

        public void setCanStartPictureInPictureAutomaticallyFromInline​(boolean value)
        [@property] canStartPictureInPictureAutomaticallyFromInline Indicates whether Picture in Picture should be allowed to start automatically when transitioning to background when the receiver’s content is embedded inline. Default is NO. This property must only be set to YES for content intended to be the user's primary focus. API-Since: 14.2
      • contentSource

        @Nullable
        public @Nullable AVPictureInPictureControllerContentSource contentSource()
        [@property] contentSource The receiver's content source. Can be changed while Picture in Picture is active, but the new content source must be ready for display (in the case of AVPlayerLayer, that means AVPlayerLayer.isReadyForDisplay must return YES), otherwise Picture in Picture will stop. API-Since: 15.0
      • initWithContentSource

        public AVPictureInPictureController initWithContentSource​(@NotNull
                                                                  @NotNull AVPictureInPictureControllerContentSource contentSource)
        initWithContentSource: Use this initializer for content that may be a sample buffer display layer or a player layer. API-Since: 15.0
        Parameters:
        contentSource - The content source to be shown in Picture in Picture.
      • invalidatePlaybackState

        public void invalidatePlaybackState()
        invalidatePlaybackState Informs Picture in Picture controller that it should request an updated playback state from its sampleBufferPlaybackDelegate. This should always be called whenever playback is paused or unpaused, or the underlying content duration changes. API-Since: 15.0
      • setContentSource

        public void setContentSource​(@Nullable
                                     @Nullable AVPictureInPictureControllerContentSource value)
        [@property] contentSource The receiver's content source. Can be changed while Picture in Picture is active, but the new content source must be ready for display (in the case of AVPlayerLayer, that means AVPlayerLayer.isReadyForDisplay must return YES), otherwise Picture in Picture will stop. API-Since: 15.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.