SellyCloudSDK_demo/SellyCloudSDK/sdk/SellyCloudSDK.framework/Headers/SellyVideoPusher.h

110 lines
2.9 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// SellyVideoPusher.h
// SellyCloudSDK
//
// Created by Caleb on 18/9/25.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import "SellyPusherManagerDelegate.h"
#import "SellyPlayerStreamInfo.h"
NS_ASSUME_NONNULL_BEGIN
@interface SellyVideoPusher : NSObject
//接盾的情况下请调用该方法初始化rtc推流也通过该方法
- (instancetype)initWithStreamInfo:(SellyPlayerStreamInfo *)streamInfo;
- (instancetype)initWithUrl:(NSString *)url;
/**
是否开启本地预览镜像
*/
@property (nonatomic, assign)BOOL mirror;
/**
开始采集音视频流程,默认会采集语音和视频
@param captureDevicePosition 使用前置还是后置摄像头
@param videoConfig 视频采集/推流参数传nil将使用默认推流参数
@param audioConfig 音频采集/推流参数传nil将使用默认推流参数
*/
- (void)startRunning:(AVCaptureDevicePosition)captureDevicePosition videoConfig:(nullable SellyLiveVideoConfiguration *)videoConfig audioConfig:(nullable SellyLiveAudioConfiguration *)audioConfig;
/**
纯语音直播调用该方法,开始采集语音流程,不会采集视频
无法在直播中开启视频需要开关摄像头的请调用startRunning:videoConfig:audioConfig:方法
@param audioConfig 音频采集/推流参数传nil将使用默认推流参数
*/
- (void)startRunningAudio:(nullable SellyLiveAudioConfiguration *)audioConfig;
/**
开启视频采集,中途关闭摄像头再次开启需要调用
*/
- (nullable NSError *)startCamera;
/**
停止视频采集,中途关闭摄像头调用
*/
- (void)stopCamera;
/**
切换前后摄像头
*/
- (void)switchCameraPosition:(void (^)(NSError * _Nullable error))completion;
/**
开启音频采集
*/
- (void)startMicrophone;
/**
停止语音采集
*/
- (void)stopMicrophone;
/**
开始推流
@return 返回nil表示流程成功不代表推流成功
*/
- (nullable NSError *)startLive;
/**
停止推流
*/
- (void)stopLive:(void(^)(NSError *error))callback;
/**
截取当前图片
*/
- (UIImage *)getCurrentImage;
/**
推送静态图片调用1次即可不用循环调用
*/
- (void)pushStaticImage:(UIImage *)image;
/**
停止推送静态图片
*/
- (void)stopPushImage;
/**
本地预览view
*/
@property (nonatomic, strong)UIView *preview;
/**
回调
*/
@property (nonatomic, weak)id<SellyPusherManagerDelegate> delegate;
@property (nonatomic, assign, readonly)BOOL isMute;
@property (nonatomic, assign, readonly)BOOL isCameraEnable;
@property (nonatomic, assign, readonly)SellyLiveState liveState;
/**
是否支持视频前置处理,例如实现美颜功能. default no
*/
@property (nonatomic, assign)BOOL enableCustomVideoProcess;
//当前的摄像头方向
@property (nonatomic, assign)AVCaptureDevicePosition captureDevicePosition;
//缩放
@property (nonatomic, assign)SellyPlayerScalingMode scaleMode;
@end
NS_ASSUME_NONNULL_END