ApeConsts.js
7.5 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
export default function ApeConsts(id) {
for (var type_const in ApeConsts) {
if (ApeConsts[type_const] === id) {
return type_const;
}
}
}
//课堂状态
ApeConsts.CLASS_STATUS_WAIT= 0;//课堂还未开始
ApeConsts.CLASS_STATUS_STARTED= 1;//直播中
ApeConsts.CLASS_STATUS_PAUSE= 2;//暂停
ApeConsts.CLASS_STATUS_CLOSE= 3;//结束//这个是点击结束会议,把所有人踢出课堂,然后把状态值还原为0*************
ApeConsts.CLASS_STATUS_UPTATE= 4;//更新课堂状态信息
ApeConsts.CLASS_WAIT_START = "class.wait.start";//课堂还未开始
ApeConsts.CLASS_STARTING = "class.started";//直播中
ApeConsts.CLASS_PAUSING = "class.pause";//暂停
ApeConsts.CLASS_PAUSING = "class.closed";//关闭
ApeConsts.CLASS_PAUSING = "class.update";//更新当前的状态信息
//课堂控制
ApeConsts.CLASS_ACTION_CLOSE_ALL=1;//所有人关闭会议
//课堂类型
ApeConsts.CLASS_TYPE_INTERACT= 1; // 互动课堂,通过MS转发音视频,不能进行H5观看
ApeConsts.CLASS_TYPE_LIVE= 2; // 直播课堂,通过CDN转发音视频,不能进行音视频互动
//角色身份
ApeConsts.NR_GUEST = 0; // 客人
ApeConsts.NR_NORMAL = 1;// 普通与会者
ApeConsts.NR_ADMIN = 2;// 管理员
ApeConsts.NR_MASTER = 4; // 主持人
ApeConsts.NR_SLAVE = 8; // 主讲人
ApeConsts.NR_ASSISTANT = 16; // 助教
ApeConsts.NR_INVISIBLE = 32; // 隐身用户
//用户的身份,5种类型:
ApeConsts.host="host";//(主持人/老师)
ApeConsts.presenter="presenter";//(主讲人)
ApeConsts.assistant="assistant";//(助教)
ApeConsts.normal="normal";//(普通角色/学生)
ApeConsts.record="record";//(暂时没用.
ApeConsts.INVALIDATE_CHANNEL_ID = -1;
ApeConsts.INVALIDATE_NODE_ID = -1;
// doc update status
ApeConsts.DOC_ACTION_NORMAL=0;//无操作
ApeConsts.DOC_ACTION_SWITCH_DOC=1;//切换文档
ApeConsts.DOC_ACTION_SWITCH_PAGE=2;//文档翻页
ApeConsts.DOC_ACTION_COMMAND=3;//文档操作:滚动、缩放
// RCChannelGrabStatus
ApeConsts.CGS_RELEASED = 0;///< 无人占用状态
ApeConsts.CGS_PENDING = 1;///< 占用成功,等待打开
ApeConsts.CGS_OPENNED = 2;///< 打开成功
ApeConsts.CGS_GRABBING = 3; ///< 准备占用中, 属于本地状态机需要用的状态,在多点数据库中不存在。
// defs for common session id
ApeConsts.CONFERENCE_SESSION_ID = 11;
ApeConsts.CHAT_SESSION_ID = 12;
ApeConsts.GIFT_SESSION_ID = 13;
ApeConsts.AUDIO_SESSION_ID = 14;
ApeConsts.VIDEO_SESSION_ID = 15;
ApeConsts.WEBSHARING_SESSION_ID = 16;
ApeConsts.DOCSHARING_SESSION_ID = 17;
ApeConsts.WHITEBOARD_SESSION_ID = 18;
ApeConsts.MEDIA_SESSION_ID = 19;
ApeConsts.SCREENSHARING_SESSION_ID = 20;
ApeConsts.POLL_SESSION_ID = 21;
// defs for common channel id
ApeConsts.BROADCAST_CHANNEL_ID = 0;
ApeConsts.CONFERENCE_CHANNEL_ID = ApeConsts.CONFERENCE_SESSION_ID;
ApeConsts.CHAT_CHANNEL_ID = ApeConsts.CHAT_SESSION_ID;
ApeConsts.GIFT_CHANNEL_ID = ApeConsts.GIFT_SESSION_ID;
ApeConsts.WEBSHARING_CHANNEL_ID = ApeConsts.WEBSHARING_SESSION_ID;
ApeConsts.DOCSHARING_CHANNEL_ID = ApeConsts.DOCSHARING_SESSION_ID;
ApeConsts.WHITEBOARD_CHANNEL_ID = ApeConsts.WHITEBOARD_SESSION_ID;
ApeConsts.MEDIA_CHANNEL_ID = ApeConsts.MEDIA_SESSION_ID;
ApeConsts.SCREENSHARING_CHANNEL_ID = ApeConsts.SCREENSHARING_SESSION_ID;
// defs for common session name
ApeConsts.CONFERENCE_SESSION_NAME = "conference app";
ApeConsts.CHAT_SESSION_NAME = "chat app";
ApeConsts.GIFT_SESSION_NAME = "gift app";
ApeConsts.AUDIO_SESSION_NAME = "audio app";
ApeConsts.VIDEO_SESSION_NAME = "video app";
ApeConsts.WEBSHARING_SESSION_NAME = "web sharing app";
ApeConsts.DOCSHARING_SESSION_NAME = "doc sharing app";
ApeConsts.WHITEBOARD_SESSION_NAME = "whiteboard app";
ApeConsts.MEDIA_SESSION_NAME = "media sharing app";
ApeConsts.SCREENSHARING_SESSION_NAME = "screen sharing app";
// def for common session tag
ApeConsts.CONFERENCE_SESSION_TAG = "con-tag";
ApeConsts.CHAT_SESSION_TAG = "cha-tag";
ApeConsts.GIFT_SESSION_TAG = "gif-tag";
ApeConsts.AUDIO_SESSION_TAG = "aud-tag";
ApeConsts.VIDEO_SESSION_TAG = "vid-tag";
ApeConsts.WEBSHARING_SESSION_TAG = "web-tag";
ApeConsts.DOCSHARING_SESSION_TAG = "doc-tag";
ApeConsts.WHITEBOARD_SESSION_TAG = "wbd-tag";
ApeConsts.MEDIA_SESSION_TAG = "med-tag";
ApeConsts.SCREENSHARING_SESSION_TAG = "scr-tag";
ApeConsts.CONFERENCE_OBJ_ROSTER_ID = ((ApeConsts.CONFERENCE_SESSION_ID << 16) + 1);
ApeConsts.CONFERENCE_OBJ_ROSTER_NAME = "node list";
ApeConsts.CONFERENCE_OBJ_ROSTER_TAG = "node list tag";
ApeConsts.CONFERENCE_OBJ_QUEUE_ID = ((ApeConsts.CONFERENCE_SESSION_ID << 16) + 2);
ApeConsts.CONFERENCE_OBJ_QUEUE_NAME = "mic list";
ApeConsts.CONFERENCE_OBJ_QUEUE_TAG = "mic list tag";
// conference tab pages
ApeConsts.CONFERENCE_OBJ_TABLE_ID = ((ApeConsts.CONFERENCE_SESSION_ID << 16) + 3);
ApeConsts.CONFERENCE_OBJ_TABLE_NAME = "tabbar list";
ApeConsts.CONFERENCE_OBJ_TABLE_TAG = "tabbar list tag";
// owned id list is unique in conference
ApeConsts.CONFERENCE_OBJ_COUNTER_ID = ((ApeConsts.CONFERENCE_SESSION_ID << 16) + 4);
ApeConsts.CONFERENCE_OBJ_COUNTER_NAME = "id list";
ApeConsts.CONFERENCE_OBJ_COUNTER_TAG = "id list tag";
// web sharing objects
ApeConsts.WEBSHARING_OBJ_TABLE_ID = ((ApeConsts.WEBSHARING_SESSION_ID << 16) + 1);
ApeConsts.WEBSHARING_OBJ_TABLE_NAME = "web list";
ApeConsts.WEBSHARING_OBJ_TABLE_TAG = "web list tag";
// doc sharing objects
ApeConsts.DOCSHARING_OBJ_TABLE_ID = ((ApeConsts.DOCSHARING_SESSION_ID << 16) + 1);
ApeConsts.DOCSHARING_OBJ_TABLE_NAME = "doc list";
ApeConsts.DOCSHARING_OBJ_TABLE_TAG = "doc list tag";
// doc sharing objects h5
ApeConsts.DOCSHARING_OBJ_TABLE_ID_H5 = ((ApeConsts.DOCSHARING_SESSION_ID << 16) + 2);
ApeConsts.DOCSHARING_OBJ_TABLE_NAME_H5 = "doc list h5";
ApeConsts.DOCSHARING_OBJ_TABLE_TAG_H5 = "doc list tag h5";
// whiteboard objects
ApeConsts.WHITEBOARD_OBJ_TABLE_ID = ((ApeConsts.WHITEBOARD_SESSION_ID << 16) + 1);
ApeConsts.WHITEBOARD_OBJ_TABLE_NAME = "wbd list";
ApeConsts.WHITEBOARD_OBJ_TABLE_TAG = "wbd list tag";
// media sharing objects
ApeConsts.MEDIA_OBJ_TABLE_ID = ((ApeConsts.MEDIA_SESSION_ID << 16) + 1);
ApeConsts.MEDIA_OBJ_TABLE_NAME = "med list";
ApeConsts.MEDIA_OBJ_TABLE_TAG = "med list tag";
// chat sharing objects
ApeConsts.CHAT_OBJ_TABLE_ID = ((ApeConsts.CHAT_SESSION_ID << 16) + 1);
ApeConsts.CHAT_OBJ_TABLE_NAME = "chat list";
ApeConsts.CHAT_OBJ_TABLE_TAG = "chat list tag";
ApeConsts.AUDIO_OBJ_TABLE_ID = ((ApeConsts.AUDIO_SESSION_ID << 16) + 1);
ApeConsts.AUDIO_OBJ_TABLE_NAME = "audio channel list";
ApeConsts.AUDIO_OBJ_TABLE_TAG = "audio channel list tag";
ApeConsts.VIDEO_OBJ_TABLE_ID = ((ApeConsts.VIDEO_SESSION_ID << 16) + 1);
ApeConsts.VIDEO_OBJ_TABLE_NAME = "video channel list";
ApeConsts.VIDEO_OBJ_TABLE_TAG = "video channel list tag";
// screen sharing objects
ApeConsts.SCREENSHARING_OBJ_TABLE_ID = ((ApeConsts.SCREENSHARING_SESSION_ID << 16) + 1);
ApeConsts.SCREEN_OBJ_TABLE_NAME = "scr list";
ApeConsts.SCREEN_OBJ_TABLE_TAG = "scr list tag";
// poll sharing objects
ApeConsts.POLL_OBJ_TABLE_ID = ((ApeConsts.POLL_SESSION_ID << 16) + 1);
ApeConsts.VOTE_OBJ_TABLE_ID = ((ApeConsts.POLL_SESSION_ID << 16) + 2);
ApeConsts.RECORD_OBJ_TABLE_ID = ((ApeConsts.POLL_SESSION_ID << 16) + 3);
ApeConsts.SHAMLIVE_OBJ_TABLE_ID = ((ApeConsts.POLL_SESSION_ID << 16) + 4);
ApeConsts.POLL_OBJ_TABLE_NAME = "poll list";
ApeConsts.POLL_OBJ_TABLE_TAG = "poll list tag";
// registry operation const
ApeConsts.REG_TABLE_INSERT_TAIL = 0xFFFFFF;
ApeConsts.REG_TABLE_DELETE_ALL = 0xFFFFFF;
ApeConsts.CJS_RELEASED = 0;
ApeConsts.CJS_JOINNING = 1;
ApeConsts.CJS_JOINNED = 2;
// 白板动作
ApeConsts.WBA_CLOSE = 1;
ApeConsts.WBA_CHANGE = 2;
ApeConsts.WBA_OPEN = 3;
ApeConsts.WBA_DOC_ANNOTATION = 4;
ApeConsts.WBA_LASER_PEN = 5;