PLVWebViewPictureInPictureLifeManager
Objective-C
@interface PLVWebViewPictureInPictureLifeManager : NSObject
@property (nonatomic, weak) id<PLVWebViewPictureInPictureLifeManagerDelegate> delegate;
/// 用于开启画中画后离开页面时,持有原来的页面
@property (nonatomic, strong, nullable) UIViewController *viewController;
/// 直播视频解码是否使用“硬解码” (默认为NO 软解码)
@property (nonatomic, assign) BOOL videoToolBox;
/// 是否开启 后台自动开启画中画功能
@property (nonatomic, assign) BOOL backgroundAutoPictureInPicture;
/// 用户信息
@property (nonatomic, strong) PLVWebViewLiveUserInfo * _Nullable liveUserInfo;
/// 频道信息
@property (nonatomic, strong) PLVWebViewLiveChannelInfo * _Nullable liveChannelInfo;
/// 画中画是否将要开启状态
@property (nonatomic, assign, readonly) BOOL pictureInPictureWillStart;
/// 画中画是否已开启
@property (nonatomic, assign, readonly) BOOL pictureInPictureActive;
/// 画中画播放器当前播放时间
@property (nonatomic, assign, readonly) NSTimeInterval currentPlaybackTime;
/// 画中画底层播放器 是否处于播放中
@property (nonatomic, assign, readonly) BOOL basePlayerIsPlaying;
/// 画中画管理器单例
+ (instancetype)sharedManager;
/// 跳转画中画回放播放器到指定时间
/// - Parameter toTime: 播放的时间
- (void)seekPictureInPictureToTime:(NSTimeInterval)toTime;
/// 更新画中画自动开启的状态
- (void)updateAutoPictureInPictureEnableStatus;
/// 开启画中画
- (void)startPictureInPicture;
/// 开启画中画
/// - Parameter block: 是否开启成功的回调
- (void)startPictureInPictureBlock:(PLVWebViewStartPictureInPictureBlock)block;
/// 关闭画中画
- (void)stopPictureInPicture;
/// 清理画中画管理的数据
- (void)cleanPictureInPictureLifeManager;
@end
Swift
class PLVWebViewPictureInPictureLifeManager : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
@property (nonatomic, weak) id<PLVWebViewPictureInPictureLifeManagerDelegate> delegateSwift
weak var delegate: PLVWebViewPictureInPictureLifeManagerDelegate? { get set } -
用于开启画中画后离开页面时,持有原来的页面
Declaration
Objective-C
@property (nonatomic, strong, nullable) UIViewController *viewController -
直播视频解码是否使用“硬解码” (默认为NO 软解码)
Declaration
Objective-C
@property (nonatomic) BOOL videoToolBox;Swift
var videoToolBox: Bool { get set } -
是否开启 后台自动开启画中画功能
Declaration
Objective-C
@property (nonatomic) BOOL backgroundAutoPictureInPicture;Swift
var backgroundAutoPictureInPicture: Bool { get set } -
用户信息
Declaration
Objective-C
@property (nonatomic, strong) PLVWebViewLiveUserInfo *_Nullable liveUserInfo;Swift
var liveUserInfo: PLVWebViewLiveUserInfo? { get set } -
频道信息
Declaration
Objective-C
@property (nonatomic, strong) PLVWebViewLiveChannelInfo *_Nullable liveChannelInfo;Swift
var liveChannelInfo: PLVWebViewLiveChannelInfo? { get set } -
画中画是否将要开启状态
Declaration
Objective-C
@property (nonatomic, readonly) BOOL pictureInPictureWillStart;Swift
var pictureInPictureWillStart: Bool { get } -
画中画是否已开启
Declaration
Objective-C
@property (nonatomic, readonly) BOOL pictureInPictureActive;Swift
var pictureInPictureActive: Bool { get } -
画中画播放器当前播放时间
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval currentPlaybackTime;Swift
var currentPlaybackTime: TimeInterval { get } -
画中画底层播放器 是否处于播放中
Declaration
Objective-C
@property (nonatomic, readonly) BOOL basePlayerIsPlaying;Swift
var basePlayerIsPlaying: Bool { get } -
画中画管理器单例
Declaration
Objective-C
+ (nonnull instancetype)sharedManager;Swift
class func shared() -> Self -
跳转画中画回放播放器到指定时间
Declaration
Objective-C
- (void)seekPictureInPictureToTime:(NSTimeInterval)toTime;Swift
func seekPictureInPicture(toTime: TimeInterval) -
更新画中画自动开启的状态
Declaration
Objective-C
- (void)updateAutoPictureInPictureEnableStatus;Swift
func updateAutoPictureInPictureEnableStatus() -
开启画中画
Declaration
Objective-C
- (void)startPictureInPicture;Swift
func startPictureInPicture() -
开启画中画
Declaration
Objective-C
- (void)startPictureInPictureBlock: (nonnull PLVWebViewStartPictureInPictureBlock)block;Swift
func startPicture(inPictureBlock block: @escaping PLVWebViewStartPictureInPictureBlock) -
关闭画中画
Declaration
Objective-C
- (void)stopPictureInPicture;Swift
func stopPictureInPicture() -
清理画中画管理的数据
Declaration
Objective-C
- (void)cleanPictureInPictureLifeManager;Swift
func clean()
View on GitHub
PLVWebViewPictureInPictureLifeManager Class Reference