initial commit
This commit is contained in:
45
Example/SellyCloudSDK/VideoCall/SellyCallPiPManager.h
Normal file
45
Example/SellyCloudSDK/VideoCall/SellyCallPiPManager.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// SellyCallPiPManager.h
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
// Created by Caleb on 19/11/25.
|
||||
// Copyright © 2025 Caleb. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AVKit/AVKit.h>
|
||||
#import <SellyCloudSDK/SellyCloudManager.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 负责:
|
||||
/// - 初始化 AVSampleBufferDisplayLayer
|
||||
/// - 管理 AVPictureInPictureController
|
||||
/// - 接收业务层传入的 SellyRTCVideoFrame 并送入 PiP
|
||||
@interface SellyCallPiPManager : NSObject
|
||||
<AVPictureInPictureControllerDelegate, AVPictureInPictureSampleBufferPlaybackDelegate>
|
||||
|
||||
/// 是否当前设备/系统支持自定义 PiP
|
||||
@property (nonatomic, assign, readonly) BOOL pipPossible;
|
||||
|
||||
/// 方便外界知道当前是否在 PiP
|
||||
@property (nonatomic, assign, readonly) BOOL pipActive;
|
||||
|
||||
/// 指定在哪个 view 里显示(App 内)这条 PiP 的画面(可选)
|
||||
- (instancetype)initWithRenderView:(UIView *)renderView;
|
||||
|
||||
/// 初始化 / 配置 PiP,通常在 viewDidLoad 调一次
|
||||
- (void)setupIfNeeded;
|
||||
|
||||
/// 外界点按钮时调用:开启 / 关闭 PiP
|
||||
- (void)togglePiP;
|
||||
|
||||
/// 外界在收到远端视频帧回调时调用
|
||||
- (void)feedVideoFrame:(SellyRTCVideoFrame *)frame;
|
||||
|
||||
/// 彻底销毁 PiP,释放 controller 和 layer,页面退出时必须调用
|
||||
- (void)invalidate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user