PLVLivePictureInPictureManager
Objective-C
@interface PLVLivePictureInPictureManager : NSObject
#pragma mark - [ 属性 ]
#pragma mark 可配置项
/// 画中画恢复前的用户界面逻辑代理
@property (nonatomic, weak, nullable) id <PLVLivePictureInPictureRestoreDelegate> restoreDelegate;
/// 画中画播放器是否正在播放正片
@property (nonatomic, assign, readonly) BOOL pictureInPicturePlayerPlaying;
/// 画中画小窗是否开启
@property (nonatomic, assign, readonly) BOOL pictureInPictureActive;
#pragma mark - [ 方法 ]
/// 单例方法
+ (instancetype)sharedInstance;
/// 停止画中画
- (void)stopPictureInPicture;
/// 检查是否支持开启画中画,ipad需要在9.0以上版本,iPhone需要在14.0以上版本
- (BOOL)checkPictureInPictureSupported;
@end
Swift
class PLVLivePictureInPictureManager : NSObject
Undocumented
-
画中画恢复前的用户界面逻辑代理
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<PLVLivePictureInPictureRestoreDelegate> restoreDelegate;
Swift
weak var restoreDelegate: PLVLivePictureInPictureRestoreDelegate? { get set }
-
画中画播放器是否正在播放正片
Declaration
Objective-C
@property (nonatomic, readonly) BOOL pictureInPicturePlayerPlaying;
Swift
var pictureInPicturePlayerPlaying: Bool { get }
-
画中画小窗是否开启
Declaration
Objective-C
@property (nonatomic, readonly) BOOL pictureInPictureActive;
Swift
var pictureInPictureActive: Bool { get }
-
单例方法
Declaration
Objective-C
+ (nonnull instancetype)sharedInstance;
Swift
class func sharedInstance() -> Self
-
停止画中画
Declaration
Objective-C
- (void)stopPictureInPicture;
Swift
func stopPictureInPicture()
-
检查是否支持开启画中画,ipad需要在9.0以上版本,iPhone需要在14.0以上版本
Declaration
Objective-C
- (BOOL)checkPictureInPictureSupported;
Swift
func checkPictureInPictureSupported() -> Bool