initial commit

This commit is contained in:
Caleb
2026-03-01 15:59:27 +08:00
commit a9e97d56cb
1426 changed files with 172367 additions and 0 deletions

View 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