#import "SoftLinking.h"
#import <objc/runtime.h>
#if PLATFORM(IOS)
#import <AVKit/AVKit.h>
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
#if USE(APPLE_INTERNAL_SDK)
#import <AVKit/AVPlayerController.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-no-attribute"
#import <AVKit/AVPlayerLayerView.h>
#pragma clang diagnostic pop
#import <AVKit/AVPlayerViewController_Private.h>
#import <AVKit/AVPlayerViewController_WebKitOnly.h>
#else
@interface AVPlayerController : UIResponder
@end
@interface AVPlayerController (Details)
typedef NS_ENUM(NSInteger, AVPlayerControllerStatus) {
AVPlayerControllerStatusUnknown = 0,
AVPlayerControllerStatusReadyToPlay = 2,
};
typedef NS_ENUM(NSInteger, AVPlayerControllerExternalPlaybackType) {
AVPlayerControllerExternalPlaybackTypeNone = 0,
AVPlayerControllerExternalPlaybackTypeAirPlay = 1,
AVPlayerControllerExternalPlaybackTypeTVOut = 2,
};
@property (NS_NONATOMIC_IOSONLY, readonly) AVPlayerControllerStatus status;
@end
@class AVPlayerLayer;
@interface AVPictureInPicturePlayerLayerView : UIView
@property (nonatomic, readonly) AVPlayerLayer *playerLayer;
@end
@interface __AVPlayerLayerView : UIView
@property (nonatomic, readonly) AVPlayerLayer *playerLayer;
@property (nonatomic, readonly) AVPictureInPicturePlayerLayerView *pictureInPicturePlayerLayerView;
- (void)startRoutingVideoToPictureInPicturePlayerLayerView;
- (void)stopRoutingVideoToPictureInPicturePlayerLayerView;
@end
@protocol AVPlayerViewControllerDelegate <NSObject>
@optional
typedef NS_ENUM(NSInteger, AVPlayerViewControllerExitFullScreenReason) {
AVPlayerViewControllerExitFullScreenReasonDoneButtonTapped,
AVPlayerViewControllerExitFullScreenReasonFullScreenButtonTapped,
AVPlayerViewControllerExitFullScreenReasonPinchGestureHandled,
AVPlayerViewControllerExitFullScreenReasonRemoteControlStopEventReceived,
AVPlayerViewControllerExitFullScreenReasonPictureInPictureStarted
};
- (BOOL)playerViewController:(AVPlayerViewController *)playerViewController shouldExitFullScreenWithReason:(AVPlayerViewControllerExitFullScreenReason)reason;
- (void)playerViewController:(AVPlayerViewController *)playerViewController restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:(void (^)(BOOL restored))completionHandler;
@end
@interface AVPlayerViewController (Details)
- (instancetype)initWithPlayerLayerView:(__AVPlayerLayerView *)playerLayerView;
- (void)enterFullScreenAnimated:(BOOL)animated completionHandler:(void (^)(BOOL success, NSError *))completionHandler;
- (void)exitFullScreenAnimated:(BOOL)animated completionHandler:(void (^)(BOOL success, NSError *))completionHandler;
- (BOOL)isPictureInPicturePossible;
- (void)startPictureInPicture;
- (void)stopPictureInPicture;
@property (nonatomic) BOOL allowsPictureInPicturePlayback;
@property (nonatomic, strong) AVPlayerController *playerController;
@property (nonatomic, weak) id <AVPlayerViewControllerDelegate> delegate;
@end
#endif // USE(APPLE_INTERNAL_SDK)
#if USE(APPLE_INTERNAL_SDK) && __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
#import <AVKit/AVValueTiming.h>
#else
@interface AVValueTiming : NSObject <NSCoding, NSCopying, NSMutableCopying>
@end
@interface AVValueTiming (Details)
+ (AVValueTiming *)valueTimingWithAnchorValue:(double)anchorValue anchorTimeStamp:(NSTimeInterval)timeStamp rate:(double)rate;
@property (NS_NONATOMIC_IOSONLY, readonly) double currentValue;
@end
#endif
#endif // PLATFORM(IOS)
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
#if USE(APPLE_INTERNAL_SDK)
#import <AVKit/AVOutputDeviceMenuController.h>
#else
@class AVOutputContext;
NS_CLASS_AVAILABLE_MAC(10_11)
@interface AVOutputDeviceMenuController : NSObject
- (instancetype)initWithOutputContext:(AVOutputContext *)outputContext NS_DESIGNATED_INITIALIZER;
@property (readonly) AVOutputContext *outputContext;
@property (readonly, getter=isExternalOutputDeviceAvailable) BOOL externalOutputDeviceAvailable;
@property (readonly, getter=isExternalOutputDevicePicked) BOOL externalOutputDevicePicked;
- (void)showMenuForRect:(NSRect)screenRect appearanceName:(NSString *)appearanceName;
- (BOOL)showMenuForRect:(NSRect)screenRect appearanceName:(NSString *)appearanceName allowReselectionOfSelectedOutputDevice:(BOOL)allowReselectionOfSelectedOutputDevice;
@end
#endif
#endif