WDGLocalStream
表示用户设备采集的本地媒体流。继承自 WDGStream ,具有父类所有的属性和方法。
delegate
Section titled “delegate”定义
@property (weak, nonatomic, nullable) id<WDGLocalStreamDelegate> delegate;说明
符合 WDGLocalStreamDelegate 协议的代理,可以对本地视频流进行处理。
cameraDevice
Section titled “cameraDevice”定义
@property (nonatomic , strong , readonly) AVCaptureDevice *cameraDevice;说明
当前本地流所使用的摄像头,可以用来控制闪光灯等功能。 注:使用需要配合“lockForConfiguration”
attributes
Section titled “attributes”定义
@property (nonatomic, strong, readwrite) NSDictionary *_Nullable attributes;说明
媒体流中可携带的自定义信息,字典类型,且 JSON 序列化之后长度不能超过 2000 个字符。
+ localStreamWithOptions:
Section titled “+ localStreamWithOptions:”定义
+ (instancetype)localStreamWithOptions:(WDGLocalStreamOptions *)options;说明
创建 WDGLocalStream 实例。
参数
| 参数名 | 说明 |
|---|---|
| options | WDGLocalStream 的配置选项。请参考 WDGLocalStreamOptions。 |
返回值
WDGLocalStream 实例。
- close
Section titled “- close”定义
- (void)close;说明
关闭媒体流采集,媒体流被关闭后不能继续使用。
- switchCamera:
Section titled “- switchCamera:”定义
- (void)switchCamera;说明
切换摄像头。