Protocols

The following protocols are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PLVFloatableWebViewBridgeDelegate <NSObject>
    
    @optional
    
    #pragma mark Float
    
    /// 用户信息的回调
    /// @param userInfo 用户信息
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge liveUserInfo:(NSDictionary *)userInfo;
    
    /// 直播频道信息的回调
    /// @param channelInfo 频道信息
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge liveChannelInfo:(NSDictionary *)channelInfo;
    
    /// 点击商品的回调
    /// @param link 需要新跳转的链接
    /// @param data 第三方应用信息(客户自定义使用)
    /// @param size 小窗尺寸
    /// @param newPage 是否需要新建小窗
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge
          changeToWindowForProduct:(NSString *)link
                     data:(NSDictionary *)data
                     size:(CGSize)size
                  newPage:(BOOL)newPage;
    
    /// 小窗恢复全屏的回调
    - (void)webviewBridgeDidChangeToNormal:(PLVFloatableWebViewBridge *)bridge;
    
    /// 小窗关闭的回调
    - (void)webviewBridgeDidCloseWindow:(PLVFloatableWebViewBridge *)bridge;
    
    #pragma mark Event
    
    /// 隐藏/显示导航条事件的回调
    /// @param hide YES 隐藏 NO显示
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge hideNavigationBar:(BOOL)hide;
    
    /// 返回上一页的回调
    - (void)webviewBridgeGoBack:(PLVFloatableWebViewBridge *)bridge;
    
    /// 分享的回调
    - (void)webviewBridgeShare:(PLVFloatableWebViewBridge *)bridge;
    
    /// 收藏的回调
    - (void)webviewBridgeCollect:(PLVFloatableWebViewBridge *)bridge;
    
    /// 屏幕旋转的回调
    /// @param orientation 旋转方向
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge rotateOrientation:(UIDeviceOrientation)orientation;
    
    /// 获取后台是否自动开启小窗的回调
    - (void)webviewBridgeAutoFloatWindowEnable:(PLVFloatableWebViewBridge *)bridge;
    
    /// 是否开启后台自动小窗的回调
    /// @param enable YES 开启 NO 不开启
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge enableAutoFloatWindow:(BOOL)enable;
    
    /// 当前直播间直播状态的回调
    /// @param status 直播状态 play、paused
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge liveRoomPlayStatus:(NSString *)status;
    
    /// 当前播放器播放时间的回调
    /// @param playbackTime 当前播放时间
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge currentPlaybackTime:(NSTimeInterval)playbackTime;
    
    /// 获取当前网络状态的回调
    - (void)webviewBridgeGetCurrentNetworkStatus:(PLVFloatableWebViewBridge *)bridge;
    
    /// 其它事件的回调
    /// @param event 其它事件数据
    - (void)webviewBridge:(PLVFloatableWebViewBridge *)bridge handlerOtherEvent:(NSDictionary *)event;
    
    @end

    Swift

    protocol PLVFloatableWebViewBridgeDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    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