BBASMRTCConvertModel.h
2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//
// BBASMRTCConvertModel.h
// BBAMNP
//
// Created by baidu on 2020/5/11.
// Copyright © 2020 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// 视图类型
typedef NS_ENUM(NSUInteger, BBASMRtcViewType) {
/// 本地视图
BBASMRtcViewLocal = 0,
/// 远端视图
BBASMRtcViewRemote
};
// 声音状态
typedef NS_ENUM(NSUInteger, BBASMRtcSoundMode) {
/// 扬声器
BBASMRtcSoundModeSpeaker = 0,
/// 听筒
BBASMRtcSoundModeEar
};
// 房间状态事件
typedef NS_ENUM(NSInteger, BBASMRtcRoomEventType) {
BBASMRTC_ROOM_EVENTS_ROOM_JOINED = 101, // 加入房间成功
BBASMRTC_ROOM_EVENTS_USER_JOINED = 102, // 有用户加入房间
BBASMRTC_ROOM_EVENTS_USER_LEAVING = 103, // 有用户离开房间
BBASMRTC_ROOM_EVENTS_RECEIVED_TIMEOUT = 105, // 与服务器链接丢失
BBASMRTC_ROOM_EVENTS_SENDING_MEDIA_FAILED = 108, // 发布流失败
BBASMRTC_ROOM_EVENTS_SOMEBODY_KICKOUT = 115, // 踢出房间
};
// 音视频流状态
typedef NS_ENUM(NSInteger, BBASMRtcStreamingStates) {
BBASMRTC_VIDEO_AUDIO_STREAMING_STATES_ARRIVAL = 0,
BBASMRTC_VIDEO_AUDIO_STREAMING_STATES_REMOVE,
};
typedef NS_ENUM(NSInteger, BBASMRtcErrorCodes) {
BBASMRTC_NO_SUCH_ROOM_ERROR = 426,
BBASMRTC_USERID_ALREADY_EXIST_ERROR = 436,
};
typedef NS_ENUM(NSInteger, BBASMRtcChannelStats) {
BBASMRTC_SIGNAL_CHANNEL_STATS_CLOSED = 152,
BBASMRTC_SIGNAL_CHANNEL_STATS_FAILED = 153,
BBASMRTC_SIGNAL_CHANNEL_STATS_DISCONNECT = 154,
BBASMRTC_MEDIA_CHANNEL_STATS_FAILED = 203,
};
/** 用户状态 */
@interface BBASMRtcRoomUserInfo : NSObject
/** 用户 ID */
@property (nonatomic, strong) NSNumber *userId;
/** 用户名 */
@property (nonatomic, copy) NSString *userName;
/** 属性 */
@property (nonatomic, copy) NSString *attribute;
@end
@interface BBASMRTCRoomEvents : NSObject
@property (nonatomic, assign) BBASMRtcRoomEventType rtcRoomEventType;
@property (nonatomic, strong) BBASMRtcRoomUserInfo *rtcRoomUserInfo;
@end
@interface BBASMRtcStreamInfo : NSObject
/// streaming 的归属者
@property (nonatomic, strong) NSNumber *userId;
/// 表述流的状态,到达 or 移除
@property (nonatomic, assign) BBASMRtcStreamingStates streamState;
@end
NS_ASSUME_NONNULL_END