PLVWebViewPictureInPictureLifeManagerDelegate
Objective-C
@protocol PLVWebViewPictureInPictureLifeManagerDelegate <NSObject>
@optional
/// 画中画将要开始
/// @param pipManager 画中画管理器
- (void)plvPIPLifeManagerPictureInPictureWillStart:(PLVWebViewPictureInPictureLifeManager *)pipManager;
/// 画中画已经开始
/// @param pipManager 画中画管理器
- (void)plvPIPLifeManagerPictureInPictureDidStart:(PLVWebViewPictureInPictureLifeManager *)pipManager;
/// 画中画开启失败
/// @param pipManager 画中画管理器
/// @param error 失败错误原因
- (void)plvPIPLifeManager:(PLVWebViewPictureInPictureLifeManager *)pipManager pictureInPictureFailedToStartWithError:(NSError *)error;
/// 画中画将要停止
/// @param pipManager 画中画管理器
- (void)plvPIPLifeManagerPictureInPictureWillStop:(PLVWebViewPictureInPictureLifeManager *)pipManager;
/// 画中画已经停止
/// @param pipManager 画中画管理器
- (void)plvPIPLifeManagerPictureInPictureDidStop:(PLVWebViewPictureInPictureLifeManager *)pipManager;
/// 点击画中画恢复按钮,画中画关闭之前的用户界面恢复实现
/// @param completionHandler completionHandler
- (void)plvPIPLifeManagerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler:(void (^)(BOOL restored))completionHandler;
@end
Swift
protocol PLVWebViewPictureInPictureLifeManagerDelegate : NSObjectProtocol
Undocumented
-
画中画将要开始
Declaration
Objective-C
- (void)plvPIPLifeManagerPictureInPictureWillStart: (nonnull PLVWebViewPictureInPictureLifeManager *)pipManager;
Swift
optional func plvPIPLifeManagerPicture(inPictureWillStart pipManager: PLVWebViewPictureInPictureLifeManager)
Parameters
pipManager
画中画管理器
-
画中画已经开始
Declaration
Objective-C
- (void)plvPIPLifeManagerPictureInPictureDidStart: (nonnull PLVWebViewPictureInPictureLifeManager *)pipManager;
Swift
optional func plvPIPLifeManagerPicture(inPictureDidStart pipManager: PLVWebViewPictureInPictureLifeManager)
Parameters
pipManager
画中画管理器
-
画中画开启失败
Declaration
Objective-C
- (void)plvPIPLifeManager: (nonnull PLVWebViewPictureInPictureLifeManager *)pipManager pictureInPictureFailedToStartWithError:(nonnull NSError *)error;
Swift
optional func plvPIPLifeManager(_ pipManager: PLVWebViewPictureInPictureLifeManager, pictureInPictureFailedToStartWithError error: any Error)
Parameters
pipManager
画中画管理器
error
失败错误原因
-
画中画将要停止
Declaration
Objective-C
- (void)plvPIPLifeManagerPictureInPictureWillStop: (nonnull PLVWebViewPictureInPictureLifeManager *)pipManager;
Swift
optional func plvPIPLifeManagerPicture(inPictureWillStop pipManager: PLVWebViewPictureInPictureLifeManager)
Parameters
pipManager
画中画管理器
-
画中画已经停止
Declaration
Objective-C
- (void)plvPIPLifeManagerPictureInPictureDidStop: (nonnull PLVWebViewPictureInPictureLifeManager *)pipManager;
Swift
optional func plvPIPLifeManagerPicture(inPictureDidStop pipManager: PLVWebViewPictureInPictureLifeManager)
Parameters
pipManager
画中画管理器
-
点击画中画恢复按钮,画中画关闭之前的用户界面恢复实现
Declaration
Objective-C
- (void) plvPIPLifeManagerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler: (nonnull void (^)(BOOL))completionHandler;
Swift
optional func plvPIPLifeManagerRestoreUserInterfaceForPictureInPictureStop() async -> Bool
Parameters
completionHandler
completionHandler