Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
李勇
/
McuClient
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
李勇
2017-02-10 17:32:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c0fa496620bad0d3acc4c892b576abd833ab565a
c0fa4966
1 parent
ca61cf39
1.Sass初始化和登陆细化错误异常提示
2.Sass获取会参数完成,在文档模块同步完成之后,自动同步提前上传的文档到MCU服务器 3.调整文档模块的PDU结构,增加文档的唯一标识docId
隐藏空白字符变更
内嵌
并排对比
正在显示
13 个修改的文件
包含
855 行增加
和
172 行删除
dist/McuClient.js
src/EngineEntrance.js
src/EngineUtils.js
src/GlobalConfig.js
src/MessageTypes.js
src/Sass.js
src/apes/Ape.js
src/apes/ApeConsts.js
src/apes/ConferApe.js
src/apes/DocApe.js
src/apes/WhiteBoardApe.js
src/mcu.js
src/pdus/pro.js
dist/McuClient.js
查看文件 @
c0fa496
...
...
@@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/
}
/******/
var
hotApplyOnUpdate
=
true
;
/******/
var
hotCurrentHash
=
"
774e26cde5ed56285a5a
"
;
// eslint-disable-line no-unused-vars
/******/
var
hotCurrentHash
=
"
f35e06ee9a27d11fe730
"
;
// eslint-disable-line no-unused-vars
/******/
var
hotCurrentModuleData
=
{};
/******/
var
hotCurrentParents
=
[];
// eslint-disable-line no-unused-vars
...
...
@@ -794,6 +794,7 @@ return /******/ (function(modules) { // webpackBootstrap
});
_doc_ape
.
on
(
_MessageTypes2
.
default
.
DOC_UPDATE
,
_this
.
docUpdateHandler
.
bind
(
_this
));
_doc_ape
.
on
(
_MessageTypes2
.
default
.
DOC_DELETE
,
_this
.
docDeleteHandler
.
bind
(
_this
));
_doc_ape
.
on
(
_DocApe2
.
default
.
DOC_JOIN_CHANNEL_SUCCESS
,
_this
.
docJoinChannelSuccess
.
bind
(
_this
));
_whiteboard_ape
=
new
_WhiteBoardApe2
.
default
();
_whiteboard_ape
.
on
(
'*'
,
function
(
type
,
data
)
{
...
...
@@ -841,10 +842,11 @@ return /******/ (function(modules) { // webpackBootstrap
_createClass
(
MessageEntrance
,
[{
key
:
'_mcuErrorHandler'
,
value
:
function
_mcuErrorHandler
(
_data
)
{
value
:
function
_mcuErrorHandler
(
_data
,
_option
)
{
if
(
_mcuErrorCallBackFun
)
{
var
errorMessage
=
{
"code"
:
_data
,
"reson"
:
""
};
loger
.
log
(
"MCU_ERROR"
,
errorMessage
);
var
option
=
_option
||
""
;
var
errorMessage
=
{
"code"
:
_data
,
"reson"
:
_MessageTypes2
.
default
.
ErrorReson
[
_data
]
+
" "
+
option
};
loger
.
error
(
"MCU_ERROR"
,
errorMessage
);
_mcuErrorCallBackFun
(
errorMessage
);
}
}
...
...
@@ -870,18 +872,17 @@ return /******/ (function(modules) { // webpackBootstrap
key
:
'_init'
,
value
:
function
_init
(
_param
,
_onSuccess
,
_mcuErrorCallBack
)
{
_initSuccessCallBackFun
=
_onSuccess
;
// _initFailureCallBackFun=_onFailure;
_mcuErrorCallBackFun
=
_mcuErrorCallBack
;
//{"meetingNumber":"1653304953","portal":"112.126.80.182:80","userRole":"normal","userId":0}
//判断传入的参数是否存在
if
(
_param
==
null
||
_EngineUtils2
.
default
.
isEmptyObject
(
_param
)
||
_onSuccess
==
null
||
_mcuErrorCallBack
==
null
)
{
loger
.
log
(
'init初始化失败,参数错误'
);
loger
.
error
(
'init初始化失败,参数错误'
);
this
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_PAEAM
);
return
;
}
//判断必要的参数字段值
if
(
_param
.
meetingNumber
==
null
||
isNaN
(
_param
.
meetingNumber
)
||
_param
.
portal
==
null
||
_param
.
portal
==
""
)
{
loger
.
log
(
'init初始化失败'
,
_param
);
loger
.
error
(
'init初始化失败'
,
_param
);
this
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_PAEAM
);
return
;
}
...
...
@@ -889,7 +890,7 @@ return /******/ (function(modules) { // webpackBootstrap
//保存参数
_GlobalConfig2
.
default
.
confId
=
_param
.
meetingNumber
;
_GlobalConfig2
.
default
.
portal
=
_param
.
portal
;
_GlobalConfig2
.
default
.
userRole
=
_param
.
userRole
||
"normal"
;
_GlobalConfig2
.
default
.
userRole
=
_param
.
userRole
||
_ApeConsts2
.
default
.
normal
;
_GlobalConfig2
.
default
.
userId
=
_param
.
userId
||
"0"
;
//获取课堂校验信息
...
...
@@ -950,7 +951,7 @@ return /******/ (function(modules) { // webpackBootstrap
_GlobalConfig2
.
default
.
md5
=
_data
.
md5
||
""
;
//这个暂时用假数据,后台接口写完就有数据了
_GlobalConfig2
.
default
.
msType
=
_data
.
msType
||
1
;
_GlobalConfig2
.
default
.
siteId
=
_data
.
siteId
||
""
;
_GlobalConfig2
.
default
.
classType
=
_data
.
classType
||
_ApeConsts2
.
default
.
CLASS_TYPE_INTERACT
;
_GlobalConfig2
.
default
.
classType
=
_data
.
meetingType
||
0
;
//host默认需要密码,Sass服务器只判断学生是否需要密码,没有判断老师的
if
(
_GlobalConfig2
.
default
.
userRole
==
"host"
)
{
...
...
@@ -1063,14 +1064,25 @@ return /******/ (function(modules) { // webpackBootstrap
_GlobalConfig2
.
default
.
setClassDetail
=
_data
;
}
//获取会议所有参数 api/meeting/detail.do?
//获取会议所有参数 api/meeting/detail.do?
flash中的接口文件是 getMeetingParam.do
},
{
key
:
'_h5SassGetMeetingParaSuccessHandler'
,
value
:
function
_h5SassGetMeetingParaSuccessHandler
(
_data
)
{
loger
.
log
(
'获取api/meeting/detail.do完成.'
);
//包含整个会议最全的信息
_GlobalConfig2
.
default
.
meetingParam
=
_data
;
console
.
log
(
_data
.
docListPrepare
);
console
.
log
(
_data
.
mcuList
);
//包含整个会议最全的信息,储存数据
if
(
_data
)
{
_GlobalConfig2
.
default
.
setDocListPrepare
(
_data
.
docListPrepare
);
//提前上传的文档列表
_GlobalConfig2
.
default
.
setDocRecordList
(
_data
.
docRecordList
);
//
_GlobalConfig2
.
default
.
setDocList
(
_data
.
docList
);
//
_GlobalConfig2
.
default
.
setMsList
(
_data
.
msList
);
//
_GlobalConfig2
.
default
.
setMcuList
(
_data
.
mcuList
);
//
_GlobalConfig2
.
default
.
setMusicList
(
_data
.
musicList
);
//
_GlobalConfig2
.
default
.
setMusicListPrepare
(
_data
.
musicListPrepare
);
//
_GlobalConfig2
.
default
.
setRsList
(
_data
.
rsList
);
//
}
}
// MCU 会议成功
...
...
@@ -1092,7 +1104,7 @@ return /******/ (function(modules) { // webpackBootstrap
//GlobalConfig.classRole=_data.classRole;
_GlobalConfig2
.
default
.
confId
=
_data
.
confId
;
_GlobalConfig2
.
default
.
h5Module
=
_data
.
h5Module
;
_GlobalConfig2
.
default
.
isHost
=
_data
.
isHost
;
//GlobalConfig.isHost=
_data.isHost;
_GlobalConfig2
.
default
.
maxAudioChannels
=
_data
.
maxAudioChannels
;
_GlobalConfig2
.
default
.
maxVideoChannels
=
_data
.
maxVideoChannels
;
_GlobalConfig2
.
default
.
maxMediaChannels
=
_data
.
maxMediaChannels
;
...
...
@@ -1150,7 +1162,7 @@ return /******/ (function(modules) { // webpackBootstrap
initSuccessCallBackData
.
userRole
=
_GlobalConfig2
.
default
.
userRole
;
initSuccessCallBackData
.
userId
=
_GlobalConfig2
.
default
.
userId
;
initSuccessCallBackData
.
passwordRequired
=
_GlobalConfig2
.
default
.
passwordRequired
;
initSuccessCallBackData
.
classType
=
_GlobalConfig2
.
default
.
classType
;
initSuccessCallBackData
.
classType
=
_GlobalConfig2
.
default
.
classType
||
_ApeConsts2
.
default
.
CLASS_TYPE_INTERACT
;
loger
.
log
(
'加入会议成功'
,
initSuccessCallBackData
);
_joinClassSuccessCallBackFun
(
initSuccessCallBackData
);
}
...
...
@@ -1367,6 +1379,81 @@ return /******/ (function(modules) { // webpackBootstrap
this
.
_emit
(
_MessageTypes2
.
default
.
DOC_DELETE
,
docItem
);
}
}
//文档加入频道成功,同步到MCU服务器上的数据
},
{
key
:
'docJoinChannelSuccess'
,
value
:
function
docJoinChannelSuccess
()
{
loger
.
log
(
"docJoinChannelSuccess isHost="
,
_GlobalConfig2
.
default
.
isHost
);
console
.
log
(
_GlobalConfig2
.
default
.
docListPrepare
);
loger
.
log
(
"docJoinChannelSuccess docListPrepare="
);
//如果是主持人,那么需要判断一下文档模块同步的数据和从sass获取的文档数据是否相同,如果mcu服务器不存在的,需要上传
if
(
_GlobalConfig2
.
default
.
isHost
)
{
var
_iteratorNormalCompletion
=
true
;
var
_didIteratorError
=
false
;
var
_iteratorError
=
undefined
;
try
{
for
(
var
_iterator
=
_GlobalConfig2
.
default
.
docListPrepare
[
Symbol
.
iterator
](),
_step
;
!
(
_iteratorNormalCompletion
=
(
_step
=
_iterator
.
next
()).
done
);
_iteratorNormalCompletion
=
true
)
{
var
value
=
_step
.
value
;
if
(
value
)
{
//{
// "MD5": "f3feb3fac8cd3a953bded00e07a0c66b",
// "absoluteLocation": "http://101.200.150.192/DocSharing/data/526661904/20170203-115400026/f3feb3fac8cd3a953bded00e07a0c66b.swf",
// "createUserID": "972",
// "createUserIP": "114.241.81.175",
// "createUserName": "base",
// "dynamicPPT": 0,
// "dynamicTransferStatic": "",
// "id": "8ab3b0ed5a00f2fa015a0219a3df016c",
// "meetingNumber": "",
// "name": "McuClient_v.1.0.1_API.pdf",
// "orderStr": "",
// "pdfSize": 5,
// "processEndTime": "2017-02-03 11:54:31",
// "processRate": 0,
// "processStartTime": "2017-02-03 11:54:27",
// "relativeLocation": "/DocSharing/data/526661904/20170203-115400026/f3feb3fac8cd3a953bded00e07a0c66b.swf",
// "siteID": "h5test",
// "size": 360920,
// "status": 3,
// "type": "pdf",
// "uploadEndTime": "2017-02-03 11:54:27",
// "uploadStartTime": "2017-02-03 11:54:27"
//}
loger
.
log
(
"上传文档到mcu"
,
value
);
var
paramInfo
=
{
"pageNum"
:
value
.
pdfSize
,
"fileName"
:
value
.
name
,
"fileType"
:
value
.
type
,
"relativeUrl"
:
value
.
relativeLocation
,
"url"
:
value
.
absoluteLocation
,
"creatUserId"
:
value
.
createUserID
,
"docId"
:
value
.
id
,
"md5"
:
value
.
MD5
,
"visible"
:
false
};
this
.
_sendDocumentUpload
(
paramInfo
);
}
}
}
catch
(
err
)
{
_didIteratorError
=
true
;
_iteratorError
=
err
;
}
finally
{
try
{
if
(
!
_iteratorNormalCompletion
&&
_iterator
.
return
)
{
_iterator
.
return
();
}
}
finally
{
if
(
_didIteratorError
)
{
throw
_iteratorError
;
}
}
}
}
}
}]);
return
MessageEntrance
;
...
...
@@ -1457,15 +1544,36 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
}
/* _emit(eid, data) {
if (eid) {
//eid=* broadcast
let asteriskStub =this.MAPS['*'];
if (asteriskStub && asteriskStub.length) {
asteriskStub.forEach(function (elistener) {
elistener(eid, data);
})
}
// eid= normal
let stub = this.MAPS[eid];
if (stub && stub.length) {
stub.forEach(function (elistener) {
elistener(data);
});
}
}
}*/
},
{
key
:
'_emit'
,
value
:
function
_emit
(
eid
,
data
)
{
value
:
function
_emit
(
eid
,
data
,
option
)
{
if
(
eid
)
{
//eid=* broadcast
var
asteriskStub
=
this
.
MAPS
[
'*'
];
if
(
asteriskStub
&&
asteriskStub
.
length
)
{
asteriskStub
.
forEach
(
function
(
elistener
)
{
elistener
(
eid
,
data
);
elistener
(
eid
,
data
,
option
);
});
}
...
...
@@ -1473,7 +1581,7 @@ return /******/ (function(modules) { // webpackBootstrap
var
stub
=
this
.
MAPS
[
eid
];
if
(
stub
&&
stub
.
length
)
{
stub
.
forEach
(
function
(
elistener
)
{
elistener
(
data
);
elistener
(
data
,
option
);
});
}
}
...
...
@@ -1606,16 +1714,32 @@ return /******/ (function(modules) { // webpackBootstrap
throw
''
;
}
}).
then
(
function
(
ret
)
{
// code int 0 正常
// 1 课堂号必填
//2 无效的课堂号
//3 没有对应的站点
//4 站点已过期
if
(
ret
.
code
===
0
)
{
loger
.
log
(
'Sass获取课堂校验信息完成'
);
_this2
.
_emit
(
Sass
.
CLASS_INIT_SUCCESS
,
ret
);
}
else
if
(
ret
.
code
===
1
)
{
//loger.warn('Sass获取课堂校验信息失败.');
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_FAILED_1
);
}
else
if
(
ret
.
code
===
2
)
{
//loger.warn('Sass获取课堂校验信息失败.');
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_FAILED_2
);
}
else
if
(
ret
.
code
===
3
)
{
//loger.warn('Sass获取课堂校验信息失败.');
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_FAILED_3
);
}
else
if
(
ret
.
code
===
4
)
{
//loger.warn('Sass获取课堂校验信息失败.');
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_FAILED_4
);
}
else
{
loger
.
warn
(
'Sass获取课堂校验信息失败.'
);
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_FAILED
);
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_FAILED
,
ret
);
}
}).
catch
(
function
(
err
)
{
loger
.
error
(
'Sass\u83B7\u53D6\u8BFE\u5802\u6821\u9A8C\u4FE1\u606F\u5F02\u5E38.\u72B6\u6001\u7801:'
+
err
);
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_PROTOCOL
);
_this2
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_CLASS_INIT_PROTOCOL
,
err
);
});
}
...
...
@@ -1808,7 +1932,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
}).
then
(
function
(
ret
)
{
if
(
ret
.
code
===
0
)
{
loger
.
log
(
'
H5
Sass获取getMeetingParam完成'
);
loger
.
log
(
'Sass获取getMeetingParam完成'
);
_this6
.
_emit
(
Sass
.
CLASS_GET_MEETING_PARAM
,
ret
);
}
else
{
loger
.
warn
(
'H5Sass获取getMeetingParam失败.'
);
...
...
@@ -2066,18 +2190,17 @@ return /******/ (function(modules) { // webpackBootstrap
MessageTypes
.
MCU_ERROR
=
"mcuError"
;
//MCU错误
//---------------错误消息 code 定义-------------------------------------------------
MessageTypes
.
ERR_NETWORK
=
10000
;
//网络错误
MessageTypes
.
ERR_UNKNOWN
=
10001
;
//未知错误
MessageTypes
.
ERR_SOCKET_DISCONNECT
=
20000
;
//MCU断开连接,已经离开会议
//---------------错误消息 ErrorCode 定义-------------------------------------------------
//会议初始化失败的几种情况
MessageTypes
.
ERR_CLASS_INIT_PAEAM
=
100
;
//初始化参数错误
MessageTypes
.
ERR_CLASS_INIT_NETWORK
=
101
;
//初始化网络错误
MessageTypes
.
ERR_CLASS_INIT_PROTOCOL
=
102
;
//初始化协议错误
MessageTypes
.
ERR_CLASS_INIT_FAILED
=
103
;
//初始化验证失败
MessageTypes
.
ERR_CLASS_INIT_FAILED_1
=
104
;
//初始化验证失败,课堂号必填
MessageTypes
.
ERR_CLASS_INIT_FAILED_2
=
105
;
//初始化验证失败,无效的课堂号
MessageTypes
.
ERR_CLASS_INIT_FAILED_3
=
106
;
//初始化验证失败,没有对应的站点
MessageTypes
.
ERR_CLASS_INIT_FAILED_4
=
107
;
//初始化验证失败,站点已过期
//加入会议失败的几种情况
MessageTypes
.
ERR_CLASS_JOIN_NETWORK
=
200
;
//加入会议网络错误
...
...
@@ -2093,11 +2216,49 @@ return /******/ (function(modules) { // webpackBootstrap
MessageTypes
.
ERR_GET_CLASS_DETAIL
=
300
;
//获取classDetail失败
MessageTypes
.
ERR_GET_MEETING_PARAML
=
301
;
//获取MeetingParam失败
//APE
MessageTypes
.
ERR_APE_SEND_FAILED_NO_JOIN
=
500
;
//APE在sdk为初始化或未加入会议之前调用发送数据接口
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
=
501
;
//APE在接口调用时参数错误
MessageTypes
.
ERR_NETWORK
=
10000
;
//网络错误
MessageTypes
.
ERR_UNKNOWN
=
10001
;
//未知错误
MessageTypes
.
ERR_SOCKET_DISCONNECT
=
20000
;
//MCU断开连接,已经离开会议
//---------------错误消息 Error Reson 定义-------------------------------------------------
MessageTypes
.
ErrorReson
=
{};
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_PAEAM
]
=
"初始化参数错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_NETWORK
]
=
"初始化网络错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_PROTOCOL
]
=
"初始化协议错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED
]
=
"初始化验证失败"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_1
]
=
"初始化验证失败,课堂号必填"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_2
]
=
"初始化验证失败,无效的课堂号"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_3
]
=
"初始化验证失败,没有对应的站点"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_4
]
=
"初始化验证失败,站点已过期"
;
//加入会议失败的几种情况
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_NETWORK
]
=
"加入会议网络错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_PROTOCOL
]
=
"加入会议化协议错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_FAILED
]
=
"加入会议化异常错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_PARAM
]
=
"加入会议参数错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_FULL
]
=
"人数已满"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_MD5_WRONG
]
=
"MD5验证失败"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_PASSWORD_WRONG
]
=
"密码错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_CONFILICT
]
=
"已经在其它地方登陆"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_GET_CLASS_DETAIL
=
300
]
=
"获取classDetail失败"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_GET_MEETING_PARAML
]
=
"获取MeetingParam失败"
;
//APE
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_APE_SEND_FAILED_NO_JOIN
]
=
"APE在sdk为初始化或未加入会议之前调用发送数据接口"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
]
=
"APE在接口调用时参数错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_NETWORK
]
=
"网络错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_UNKNOWN
]
=
"未知错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_SOCKET_DISCONNECT
]
=
"MCU断开连接,已经离开会议"
;
var
_default
=
MessageTypes
;
exports
.
default
=
_default
;
;
...
...
@@ -2219,6 +2380,169 @@ return /******/ (function(modules) { // webpackBootstrap
};
}
}
// 判断自己是否主持人角色
},
{
key
:
'setDocListPrepare'
,
//储存已经提前上传的文档列表
value
:
function
setDocListPrepare
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
docListPrepare
=
_data
;
}
},
{
key
:
'getDocListPrepare'
,
value
:
function
getDocListPrepare
()
{
return
this
.
docListPrepare
;
}
//储存文档录制列表
},
{
key
:
'setDocRecordList'
,
value
:
function
setDocRecordList
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
docRecordList
=
_data
;
}
},
{
key
:
'getDocRecordList'
,
value
:
function
getDocRecordList
()
{
return
this
.
docRecordList
;
}
//文档服务器列表
},
{
key
:
'setDocList'
,
value
:
function
setDocList
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
docList
=
_data
;
}
},
{
key
:
'getDocList'
,
value
:
function
getDocList
()
{
return
this
.
docList
;
}
//ms列表
},
{
key
:
'setMsList'
,
value
:
function
setMsList
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
msList
=
_data
;
}
},
{
key
:
'getMsList'
,
value
:
function
getMsList
()
{
return
this
.
msList
;
}
//mcu列表
},
{
key
:
'setMcuList'
,
value
:
function
setMcuList
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
mcuList
=
_data
;
}
},
{
key
:
'getMcuList'
,
value
:
function
getMcuList
()
{
return
this
.
mcuList
;
}
//声音列表
},
{
key
:
'setMusicList'
,
value
:
function
setMusicList
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
musicList
=
_data
;
}
},
{
key
:
'getMusicList'
,
value
:
function
getMusicList
()
{
return
this
.
musicList
;
}
//已经上传的声音列表
},
{
key
:
'setMusicListPrepare'
,
value
:
function
setMusicListPrepare
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
musicListPrepare
=
_data
;
}
},
{
key
:
'getMusicListPrepare'
,
value
:
function
getMusicListPrepare
()
{
return
this
.
musicListPrepare
;
}
//rs列表
},
{
key
:
'setRsList'
,
value
:
function
setRsList
(
_data
)
{
if
(
_data
==
null
)
return
;
this
.
rsList
=
_data
;
}
},
{
key
:
'getRsList'
,
value
:
function
getRsList
()
{
return
this
.
rsList
;
}
},
{
key
:
'isHost'
,
get
:
function
get
()
{
if
(
this
.
userRole
==
_ApeConsts2
.
default
.
host
)
{
return
true
;
}
return
false
;
}
// 判断自己是否助教角色
},
{
key
:
'isAssistant'
,
get
:
function
get
()
{
if
(
this
.
userRole
==
_ApeConsts2
.
default
.
assistant
)
{
return
true
;
}
return
false
;
}
// 判断自己是否主讲人角色
},
{
key
:
'isPresenter'
,
get
:
function
get
()
{
if
(
this
.
userRole
==
_ApeConsts2
.
default
.
presenter
)
{
return
true
;
}
return
false
;
}
// 判断自己是否普通角色
},
{
key
:
'isNormal'
,
get
:
function
get
()
{
if
(
this
.
userRole
==
_ApeConsts2
.
default
.
normal
)
{
return
true
;
}
return
false
;
}
// 判断自己是否是隐身用户
},
{
key
:
'isInvisible'
,
get
:
function
get
()
{
if
(
this
.
userRole
==
_ApeConsts2
.
default
.
invisible
)
{
return
true
;
}
return
false
;
}
}]);
return
GlobalConfig
;
...
...
@@ -2234,9 +2558,9 @@ return /******/ (function(modules) { // webpackBootstrap
GlobalConfig
.
confId
=
0
;
//课堂号=classId=meetingNumber 之后统一修改为classId
GlobalConfig
.
nodeId
=
0
;
//随机生成
GlobalConfig
.
topNodeID
=
101
;
//现在固定值,还不知道是做什么用
GlobalConfig
.
userRole
=
"normal"
;
GlobalConfig
.
userRole
=
_ApeConsts2
.
default
.
normal
;
GlobalConfig
.
role
=
1
;
GlobalConfig
.
isHost
=
false
;
//GlobalConfig.isHost=
false;
//GlobalConfig.classRole=0;//废弃
GlobalConfig
.
userId
=
0
;
...
...
@@ -2247,7 +2571,8 @@ return /******/ (function(modules) { // webpackBootstrap
GlobalConfig
.
passwordRequired
=
false
;
GlobalConfig
.
md5
=
""
;
GlobalConfig
.
msType
=
1
;
GlobalConfig
.
mcuDelay
=
3000
;
GlobalConfig
.
mcuDelay
=
3000
;
//默认的延迟时间
GlobalConfig
.
docDelay
=
1600
;
//文档模块加入成功之后延迟发送送成功的消息给主模块
GlobalConfig
.
portal
=
"112.126.80.182:80"
;
GlobalConfig
.
ip
=
"112.126.80.182"
;
GlobalConfig
.
port
=
"80"
;
...
...
@@ -2259,6 +2584,8 @@ return /******/ (function(modules) { // webpackBootstrap
GlobalConfig
.
maxMediaChannels
=
2
;
GlobalConfig
.
isDebug
=
false
;
GlobalConfig
.
deBugData
=
{};
GlobalConfig
.
deviceType
=
-
1
;
//设备类型 0:电脑 1:安卓 2:ios -1未知
GlobalConfig
.
userIP
=
""
;
//用户当前IP
GlobalConfig
.
className
=
""
;
// 课程名称
GlobalConfig
.
classId
=
""
;
// 课程号
...
...
@@ -2269,13 +2596,21 @@ return /******/ (function(modules) { // webpackBootstrap
GlobalConfig
.
recordEndTime
=
""
;
GlobalConfig
.
recordPlayURL
=
""
;
GlobalConfig
.
recordConfigFile
=
""
;
// 录制脚本文件
GlobalConfig
.
tickValues
=
{};
// 滚动条关键点,用于快进快退 pzm+ 20150909
GlobalConfig
.
tickValues
=
{};
// 滚动条关键点,用于快进快退
GlobalConfig
.
classType
=
_ApeConsts2
.
default
.
CLASS_TYPE_INTERACT
;
//1:互动课堂,2:直播课堂
GlobalConfig
.
meetingParam
=
{};
GlobalConfig
.
classDetail
=
{};
GlobalConfig
.
meetingParam
=
{};
//Sass直接返回的所有会议信息(最全)
GlobalConfig
.
classDetail
=
{};
//Sass直接返回的当前课堂基本信息
GlobalConfig
.
docListPrepare
=
[];
// 已经提前上传的文档,进入课堂后需要自动加载
GlobalConfig
.
docRecordList
=
[];
//录制服务器地址集合
GlobalConfig
.
docList
=
[];
//文档服务器地址集合
GlobalConfig
.
mcuList
=
[];
//录制服务器地址集合
GlobalConfig
.
msList
=
[];
//ms服务器地址集合
GlobalConfig
.
musicList
=
[];
//music服务器地址集合
GlobalConfig
.
musicListPrepare
=
[];
//提提前上传的music集合
GlobalConfig
.
rsList
=
[];
// client type
//点对点会议版本
...
...
@@ -2339,6 +2674,15 @@ return /******/ (function(modules) { // webpackBootstrap
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
;
...
...
@@ -2485,11 +2829,16 @@ return /******/ (function(modules) { // webpackBootstrap
ApeConsts
.
WBA_DOC_ANNOTATION
=
4
;
ApeConsts
.
WBA_LASER_PEN
=
5
;
//class status
PZM+ 2015.12.4
//class status
ApeConsts
.
CLASS_WAIT_START_STATUS
=
0
;
//课堂还未开始
ApeConsts
.
CLASS_STARTING_STATUS
=
1
;
//直播中
ApeConsts
.
CLASS_PAUSING_STATUS
=
2
;
//课间休息
ApeConsts
.
CLASS_WAIT_START
=
"class.wait.start"
;
//课堂还未开始
ApeConsts
.
CLASS_STARTING
=
"class.starting"
;
//直播中
ApeConsts
.
CLASS_PAUSING
=
"class.pausing"
;
//课间休息
//class type
ApeConsts
.
CLASS_TYPE_INTERACT
=
1
;
// 互动课堂,通过MS转发音视频,不能进行H5观看
ApeConsts
.
CLASS_TYPE_LIVE
=
2
;
// 直播课堂,通过CDN转发音视频,不能进行音视频互动
...
...
@@ -3075,7 +3424,7 @@ return /******/ (function(modules) { // webpackBootstrap
_confInfo
.
confId
=
parseInt
(
_confInfo
.
confId
);
// confId 必须整形
this
.
confInfo
=
_confInfo
;
// 创建刷新nodeId
this
.
confInfo
.
nodeId
=
_EngineUtils2
.
default
.
generateNodeID
();
this
.
confInfo
.
nodeId
=
_EngineUtils2
.
default
.
creatTimestamp
();
_GlobalConfig2
.
default
.
nodeId
=
this
.
confInfo
.
nodeId
;
//这是标识自己身份的id
var
nodeInfoRecordPdu
=
new
_index2
.
default
[
'RCNodeInfoRecordPdu'
]();
...
...
@@ -13912,7 +14261,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
_default
=
"\n//start\n// pdu_def.proto\n\n// syntax = \"proto3\";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n DP_TOP = 0;\n DP_HIGH = 1;\n DP_MEDIUM = 2;\n DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n SEG_BEGIN = 0;\n SEG_END = 1;\n SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n TS_NOT_IN_USE = 0;\n TS_SELF_GRABBED = 1;\n TS_OTHER_GRABBED = 2;\n TS_SELF_INHIBITED = 3;\n TS_OTHER_INHIBITED = 4;\n TS_SELF_RECIPIENT = 5;\n TS_SELF_GIVING = 6;\n TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n RCPDU_ROSTER_UPDATE_INDICATION = 60;\n RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n // MCS PDU\n RCPDU_SESSION_JOIN_REQUEST = 90;\n RCPDU_SESSION_JOIN_RESPONSE = 91;\n RCPDU_CHANNEL_GRAB_REQUEST = 100;\n RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n RCPDU_CHANNEL_GRAB_INDICATION = 102;\n RCPDU_CHANNEL_JOIN_REQUEST = 103;\n RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n RCPDU_SEND_DATA_REQUEST = 120;\n RCPDU_SEND_DATA_INDICATION = 121;\n RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n RCPDU_TOKEN_GRAB_REQUEST = 130;\n RCPDU_TOKEN_GRAB_CONFIRM = 131;\n RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n RCPDU_TOKEN_GIVE_REQUEST = 134;\n RCPDU_TOKEN_GIVE_INDICATION = 135;\n RCPDU_TOKEN_GIVE_RESPONSE = 136;\n RCPDU_TOKEN_GIVE_CONFIRM = 137;\n RCPDU_TOKEN_PLEASE_REQUEST = 138;\n RCPDU_TOKEN_PLEASE_INDICATION = 139;\n RCPDU_TOKEN_RELEASE_REQUEST = 140;\n RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n RCPDU_TOKEN_TEST_REQUEST = 142;\n RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n // Registry PDU\n RCPDU_REG_REGISTER_KEY = 200;\n RCPDU_REG_UNREGISTER_KEY = 201;\n RCPDU_REG_REGISTER_ROSTER = 202;\n RCPDU_REG_REGISTER_TOKEN = 203;\n RCPDU_REG_REGISTER_PARAMETER = 204;\n RCPDU_REG_REGISTER_COUNTER = 205;\n RCPDU_REG_REGISTER_TABLE = 206;\n RCPDU_REG_REGISTER_CACHE = 207;\n RCPDU_REG_REGISTER_OBJ = 208;\n RCPDU_REG_UNREGISTER_OBJ = 209;\n RCPDU_REG_UPDATE_OBJ = 210;\n RCPDU_REG_ADAPTER = 211;\n RCPDU_REG_CLEANUP_NODE = 212;\n RCPDU_REG_REGISTER_QUEUE = 213;\n\n // Registry Obj update PDU\n RCPDU_REG_TABLE_INSERT_PDU = 230;\n RCPDU_REG_TABLE_DELETE_PDU = 231;\n RCPDU_REG_TABLE_UPDATE_PDU = 232;\n RCPDU_REG_ROSTER_INSERT_PDU = 240;\n RCPDU_REG_ROSTER_DELETE_PDU = 241;\n RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n RCPDU_REG_QUEUE_INSERT_PDU = 255;\n RCPDU_REG_QUEUE_DELETE_PDU = 256;\n RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n // data\n RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n RCPDU_VOTING_POLL_RECORD = 265;\n\n // Registry resource request or response PDU\n RCPDU_REG_REQUEST_OBJ = 290;\n RCPDU_REG_RESPONSE_OBJ = 291;\n RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n // Index exchange\n RCPDU_INDEX_ADAPTER = 300;\n RCPDU_INDEX_SERVER_USERS = 301;\n RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n RCPDU_INDEX_CONFERENCE_USERS = 304;\n}\n\nenum RCPduNodeType_E {\n NT_TERMINAL = 0;\n NT_MULTIPORT_TERMINAL = 1;\n NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n RSN_USERINITIATED = 0;\n RSN_DISCONNECTED = 1;\n RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n RET_SUCCESS = 0;\n RET_USER_REJECTED = 1;\n RET_INVALID_CONFERENCE = 2;\n RET_INVALID_PASSWORD = 3;\n RET_INVALID_CONVENER_PASSWORD = 4;\n RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n RET_INVALID_CHALLENGE_RESPONSE = 6;\n RET_NO_CONNECTION = 7;\n RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n NC_CONVENTIONAL = 0;\n NC_COUNTED = 1;\n NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n required uint32 id = 1;\n required bytes name = 2;\n optional bytes description = 3;\n //optional string net_address = 4;\n optional uint32 mode = 4;\n optional string password = 5;\n optional uint32 capacity = 6;\n optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n required uint32 id = 1;\n optional uint32 superior_node = 2;\n required RCPduNodeType_E type = 3;\n required string name = 4;\n required uint32 capability = 5;\n optional string net_address = 6;\n optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n required uint32 id = 1; // session id\n required string name = 2;\n required string tag = 3;\n repeated uint32 channel_ids = 4 [packed = true];\n optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n optional RCPduType_E type = 1;\n required uint32 obj_id = 2;\n required string name = 3;\n required string tag = 4;\n optional uint32 owner = 5;\n optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n required RCPduType_E type = 1;\n required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n required uint32 item_idx = 1;\n required uint32 owner = 2;\n required bytes item_data = 3;\n optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\n//message RCCleanupNodePdu\n//{\n// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];\n// required uint32 node_id = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n required uint32 value = 2 [default = 0];\n optional uint32 begin_bit = 3 [default = 31];\n optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n required uint32 owner = 1;\n required uint32 item_id = 2;\n optional bytes item_data = 3;\n optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n required uint32 start = 2;\n required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes session_data = 5; //\u805A\u5408\u5728\u4E00\u8D77\u7684registry\u4FE1\u606F\n}\n\nmessage RCSessionJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n required uint32 id = 2;\n optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n required uint32 initiator = 2;\n optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n required uint32 initiator = 2;\n repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n required RCPduType_E sub_type = 2;\n required uint32 initiator = 3;\n required uint32 conf_id = 4;\n required uint32 session_id = 5;\n required uint32 channel_id = 6;\n required bool upward = 7;\n required bool reliability = 8;\n required RCPduPriority_E priority = 9;\n required bytes data = 10;\n optional uint32 peer = 11;\n optional RCPduSegment_E seg = 12;\n optional uint32 total_size = 13;\n optional uint32 site_id = 14;\n optional string user_id = 15;\n optional string user_name = 16;\n optional string user_role = 17;\n optional string device_type = 18;\n optional string site = 19;\n}\n\n// Token management\nmessage RCTokenGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n required uint32 initiator = 2;\n required RCPduNodeType_E node_type = 3;\n required RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n required uint32 conf_id = 2;\n required RCPduResult_E result = 3;\n optional RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n required uint32 initiator = 2;\n required RCConferenceDescriptorPdu conf_desc = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n required RCPduResult_E result = 2;\n optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n required uint32 ejected_node_id = 2;\n required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n required bool full_refresh = 2; // Conference Roster and all\n repeated RCNodeRecordPdu node_record = 3;\n repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n required string from_role = 5;\n required bytes from_name = 6;\n}\n\nmessage RCDocSendDataRequestPdu {\n required uint32 id = 1;\n required string doc_type = 2;\n required string uri = 3;\n optional uint32 owner = 4;\n optional uint32 from = 5;\n optional string name = 6;\n optional uint32 cur_page_no = 7;\n optional uint32 cur_H = 8;\n optional uint32 cur_V = 9;\n optional uint32 scale = 10;\n optional uint32 page_num = 11;\n}\nmessage RCDocSendDataModelPdu {\n required uint32 item_idx=1;//\u552F\u4E00\u6807\u8BC6\n required uint32 owner=2;\n optional uint32 from=3;\n optional uint32 cur_page_no=4;\n optional uint32 page_num =5;\n optional string file_type=6;\n optional string
doc_type=7;\n optional string relative_url=8;//\u6587\u6863\u76F8\u5BF9\u5730\u5740\n optional string url =9;//\u6587\u6863\u5730\u5740\n optional uint32 cur_V=10;\n optional uint32 cur_H=11;\n optional uint32 scale=12;\n optional bool visible=13;\n optional uint32 action=14;//0\uFF0C\u65E0\u64CD\u4F5C\uFF0C 1\u7FFB\u9875\u30012.\u663E\u793A/\u9690\u85CF\n optional string doc_id=15;//\u6587\u6863\u5728\u670D\u52A1\u5668\u6570\u636E\u5E93\u4E2D\u7684\u552F\u4E00id\n optional string file_name=16;//\u6587\u6863\u7684\u540D\u5B57\n optional string dynamic_TS=17;//\"dynamicTransferStatic\": \"0\"
\n}\nmessage RCGiftSendDataRequestPdu {\n optional uint32 initiator = 1;\n required uint32 peer = 2;\n required uint32 index = 3;\n required uint32 num = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bytes user_data = 2;\n}\n\nmessage RCVideoSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bool key_frame = 2;\n required uint32 sequence_id = 3;\n required uint32 slice_id = 4;\n required bytes user_data = 5;\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n required uint32 status = 1;\n required uint32 device_id = 2;\n required uint32 framerate = 3;\n required uint32 bitrate = 4;\n required uint32 codec = 5;\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n optional uint32 status = 1;\n optional uint32 device_id = 2;\n optional uint32 width = 3;\n optional uint32 height = 4;\n optional uint32 framerate = 5;\n optional uint32 bitrate = 6;\n optional uint32 codec = 7;\n optional string peer_id = 8;\n optional string url = 9;\n optional uint32 type = 10;\n optional string shamlive = 11;\n optional uint32 livetype = 12;\n optional uint32 releaseGrab = 13;\n optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n required uint32 node_id = 1;\n required string name = 2;\n required uint32 role = 3;\n required uint32 level = 4;\n repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n optional uint32 status = 7;\n optional bytes user_data = 8;\n optional string user_id = 9;\n optional uint32 handUpTime = 10;\n optional uint32 deviceType = 11;\n optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n required bool timer = 1;\n optional uint32 time_limit = 2;\n optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n required string title = 1;\n required string content = 2;\n optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n required uint32 index = 1;\n required uint32 type = 2;\n required string title = 3;\n repeated string options = 4;\n optional uint32 score = 5;\n optional uint32 time_limit = 6;\n optional string restrict_input = 7;\n optional uint32 char_limit = 8;\n optional string answer = 9;\n repeated uint32 selections = 10;\n repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n required RCVotingPollSettingsPdu settings = 1;\n required string title = 2;\n repeated RCVotingPollResultPdu results = 3;\n repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n optional string qq = 1;\n optional string skype = 2;\n optional string mobile = 3;\n}\nmessage RCTabUpdateDataRequestPdu {\n optional uint32 id = 1;\n optional bytes action = 2;\n optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteBoardDataModel {\n required uint32 type= 1;//\u767D\u677F\u7C7B\u578B\n required uint32 itemIdx= 2;//itemIdx \u6BCF\u4E00\u6B21\u7ED8\u5236\u7684\u552F\u4E00\u6807\u8BC6\n required uint32 initiator=3; //\u7ED8\u5236\u6765\u81EA\u8C01\n required uint32 parentId=4; //\u7236\u7EA7\u7684id\n required uint32 curPage= 5;//\u9875\u7801\n optional string pointGroup=6; //\u5750\u6807\u70B9\u96C6\u6570\u7EC4\u7684JSON\u5B57\u7B26\u4E32\n optional string color=7 [default = \"#000000\"]; //\u989C\u8272\n optional uint32 thickness= 8 ;//\u7EBF\u6761\u7C97\u7EC6\n optional uint32 radius= 9;//\u56ED\u7684\u534A\u5F84\n optional uint32 fontSize= 10;//\u5B57\u4F53\u5927\u5C0F\n optional string fontName= 11;//\u5B57\u4F53\u540D\u79F0\n optional string text= 12;//\u6587\u672C\u5185\u5BB9\n optional bytes data = 13;//\u6682\u65F6\u9884\u7559\u7684\u53C2\u6570\n}\n\n\n//end\n"
;
var
_default
=
"\n//start\n// pdu_def.proto\n\n// syntax = \"proto3\";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n DP_TOP = 0;\n DP_HIGH = 1;\n DP_MEDIUM = 2;\n DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n SEG_BEGIN = 0;\n SEG_END = 1;\n SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n TS_NOT_IN_USE = 0;\n TS_SELF_GRABBED = 1;\n TS_OTHER_GRABBED = 2;\n TS_SELF_INHIBITED = 3;\n TS_OTHER_INHIBITED = 4;\n TS_SELF_RECIPIENT = 5;\n TS_SELF_GIVING = 6;\n TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n RCPDU_ROSTER_UPDATE_INDICATION = 60;\n RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n // MCS PDU\n RCPDU_SESSION_JOIN_REQUEST = 90;\n RCPDU_SESSION_JOIN_RESPONSE = 91;\n RCPDU_CHANNEL_GRAB_REQUEST = 100;\n RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n RCPDU_CHANNEL_GRAB_INDICATION = 102;\n RCPDU_CHANNEL_JOIN_REQUEST = 103;\n RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n RCPDU_SEND_DATA_REQUEST = 120;\n RCPDU_SEND_DATA_INDICATION = 121;\n RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n RCPDU_TOKEN_GRAB_REQUEST = 130;\n RCPDU_TOKEN_GRAB_CONFIRM = 131;\n RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n RCPDU_TOKEN_GIVE_REQUEST = 134;\n RCPDU_TOKEN_GIVE_INDICATION = 135;\n RCPDU_TOKEN_GIVE_RESPONSE = 136;\n RCPDU_TOKEN_GIVE_CONFIRM = 137;\n RCPDU_TOKEN_PLEASE_REQUEST = 138;\n RCPDU_TOKEN_PLEASE_INDICATION = 139;\n RCPDU_TOKEN_RELEASE_REQUEST = 140;\n RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n RCPDU_TOKEN_TEST_REQUEST = 142;\n RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n // Registry PDU\n RCPDU_REG_REGISTER_KEY = 200;\n RCPDU_REG_UNREGISTER_KEY = 201;\n RCPDU_REG_REGISTER_ROSTER = 202;\n RCPDU_REG_REGISTER_TOKEN = 203;\n RCPDU_REG_REGISTER_PARAMETER = 204;\n RCPDU_REG_REGISTER_COUNTER = 205;\n RCPDU_REG_REGISTER_TABLE = 206;\n RCPDU_REG_REGISTER_CACHE = 207;\n RCPDU_REG_REGISTER_OBJ = 208;\n RCPDU_REG_UNREGISTER_OBJ = 209;\n RCPDU_REG_UPDATE_OBJ = 210;\n RCPDU_REG_ADAPTER = 211;\n RCPDU_REG_CLEANUP_NODE = 212;\n RCPDU_REG_REGISTER_QUEUE = 213;\n\n // Registry Obj update PDU\n RCPDU_REG_TABLE_INSERT_PDU = 230;\n RCPDU_REG_TABLE_DELETE_PDU = 231;\n RCPDU_REG_TABLE_UPDATE_PDU = 232;\n RCPDU_REG_ROSTER_INSERT_PDU = 240;\n RCPDU_REG_ROSTER_DELETE_PDU = 241;\n RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n RCPDU_REG_QUEUE_INSERT_PDU = 255;\n RCPDU_REG_QUEUE_DELETE_PDU = 256;\n RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n // data\n RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n RCPDU_VOTING_POLL_RECORD = 265;\n\n // Registry resource request or response PDU\n RCPDU_REG_REQUEST_OBJ = 290;\n RCPDU_REG_RESPONSE_OBJ = 291;\n RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n // Index exchange\n RCPDU_INDEX_ADAPTER = 300;\n RCPDU_INDEX_SERVER_USERS = 301;\n RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n RCPDU_INDEX_CONFERENCE_USERS = 304;\n}\n\nenum RCPduNodeType_E {\n NT_TERMINAL = 0;\n NT_MULTIPORT_TERMINAL = 1;\n NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n RSN_USERINITIATED = 0;\n RSN_DISCONNECTED = 1;\n RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n RET_SUCCESS = 0;\n RET_USER_REJECTED = 1;\n RET_INVALID_CONFERENCE = 2;\n RET_INVALID_PASSWORD = 3;\n RET_INVALID_CONVENER_PASSWORD = 4;\n RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n RET_INVALID_CHALLENGE_RESPONSE = 6;\n RET_NO_CONNECTION = 7;\n RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n NC_CONVENTIONAL = 0;\n NC_COUNTED = 1;\n NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n required uint32 id = 1;\n required bytes name = 2;\n optional bytes description = 3;\n //optional string net_address = 4;\n optional uint32 mode = 4;\n optional string password = 5;\n optional uint32 capacity = 6;\n optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n required uint32 id = 1;\n optional uint32 superior_node = 2;\n required RCPduNodeType_E type = 3;\n required string name = 4;\n required uint32 capability = 5;\n optional string net_address = 6;\n optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n required uint32 id = 1; // session id\n required string name = 2;\n required string tag = 3;\n repeated uint32 channel_ids = 4 [packed = true];\n optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n optional RCPduType_E type = 1;\n required uint32 obj_id = 2;\n required string name = 3;\n required string tag = 4;\n optional uint32 owner = 5;\n optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n required RCPduType_E type = 1;\n required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n required uint32 item_idx = 1;\n required uint32 owner = 2;\n required bytes item_data = 3;\n optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\n//message RCCleanupNodePdu\n//{\n// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];\n// required uint32 node_id = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n required uint32 value = 2 [default = 0];\n optional uint32 begin_bit = 3 [default = 31];\n optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n required uint32 owner = 1;\n required uint32 item_id = 2;\n optional bytes item_data = 3;\n optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n required uint32 start = 2;\n required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes session_data = 5; //\u805A\u5408\u5728\u4E00\u8D77\u7684registry\u4FE1\u606F\n}\n\nmessage RCSessionJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n required uint32 id = 2;\n optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n required uint32 initiator = 2;\n optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n required uint32 initiator = 2;\n repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n required RCPduType_E sub_type = 2;\n required uint32 initiator = 3;\n required uint32 conf_id = 4;\n required uint32 session_id = 5;\n required uint32 channel_id = 6;\n required bool upward = 7;\n required bool reliability = 8;\n required RCPduPriority_E priority = 9;\n required bytes data = 10;\n optional uint32 peer = 11;\n optional RCPduSegment_E seg = 12;\n optional uint32 total_size = 13;\n optional uint32 site_id = 14;\n optional string user_id = 15;\n optional string user_name = 16;\n optional string user_role = 17;\n optional string device_type = 18;\n optional string site = 19;\n}\n\n// Token management\nmessage RCTokenGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n required uint32 initiator = 2;\n required RCPduNodeType_E node_type = 3;\n required RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n required uint32 conf_id = 2;\n required RCPduResult_E result = 3;\n optional RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n required uint32 initiator = 2;\n required RCConferenceDescriptorPdu conf_desc = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n required RCPduResult_E result = 2;\n optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n required uint32 ejected_node_id = 2;\n required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n required bool full_refresh = 2; // Conference Roster and all\n repeated RCNodeRecordPdu node_record = 3;\n repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n required string from_role = 5;\n required bytes from_name = 6;\n}\n\nmessage RCDocSendDataRequestPdu {\n required uint32 id = 1;\n required string doc_type = 2;\n required string uri = 3;\n optional uint32 owner = 4;\n optional uint32 from = 5;\n optional string name = 6;\n optional uint32 cur_page_no = 7;\n optional uint32 cur_H = 8;\n optional uint32 cur_V = 9;\n optional uint32 scale = 10;\n optional uint32 page_num = 11;\n}\nmessage RCDocSendDataModelPdu {\n required uint32 item_idx=1;//\u552F\u4E00\u6807\u8BC6\n required uint32 owner=2;\n optional uint32 from=3;\n optional uint32 cur_page_no=4;\n optional uint32 page_num =5;\n optional string file_type=6;\n optional string
creat_user_id=7;//\u521B\u5EFA\u6587\u6863userid\n optional string relative_url=8;//\u6587\u6863\u76F8\u5BF9\u5730\u5740\n optional string url =9;//\u6587\u6863\u5730\u5740\n optional uint32 cur_V=10;\n optional uint32 cur_H=11;\n optional uint32 scale=12;\n optional bool visible=13;\n optional uint32 action=14;//0\uFF0C\u65E0\u64CD\u4F5C\uFF0C 1\u7FFB\u9875\u30012.\u663E\u793A/\u9690\u85CF\n optional string doc_id=15;//\u6587\u6863\u5728\u670D\u52A1\u5668\u6570\u636E\u5E93\u4E2D\u7684\u552F\u4E00id\n optional string file_name=16;//\u6587\u6863\u7684\u540D\u5B57\n optional string dynamic_TS=17;//\"dynamicTransferStatic\": \"0\"\n optional string md5=18;//md5\n
\n}\nmessage RCGiftSendDataRequestPdu {\n optional uint32 initiator = 1;\n required uint32 peer = 2;\n required uint32 index = 3;\n required uint32 num = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bytes user_data = 2;\n}\n\nmessage RCVideoSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bool key_frame = 2;\n required uint32 sequence_id = 3;\n required uint32 slice_id = 4;\n required bytes user_data = 5;\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n required uint32 status = 1;\n required uint32 device_id = 2;\n required uint32 framerate = 3;\n required uint32 bitrate = 4;\n required uint32 codec = 5;\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n optional uint32 status = 1;\n optional uint32 device_id = 2;\n optional uint32 width = 3;\n optional uint32 height = 4;\n optional uint32 framerate = 5;\n optional uint32 bitrate = 6;\n optional uint32 codec = 7;\n optional string peer_id = 8;\n optional string url = 9;\n optional uint32 type = 10;\n optional string shamlive = 11;\n optional uint32 livetype = 12;\n optional uint32 releaseGrab = 13;\n optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n required uint32 node_id = 1;\n required string name = 2;\n required uint32 role = 3;\n required uint32 level = 4;\n repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n optional uint32 status = 7;\n optional bytes user_data = 8;\n optional string user_id = 9;\n optional uint32 handUpTime = 10;\n optional uint32 deviceType = 11;\n optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n required bool timer = 1;\n optional uint32 time_limit = 2;\n optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n required string title = 1;\n required string content = 2;\n optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n required uint32 index = 1;\n required uint32 type = 2;\n required string title = 3;\n repeated string options = 4;\n optional uint32 score = 5;\n optional uint32 time_limit = 6;\n optional string restrict_input = 7;\n optional uint32 char_limit = 8;\n optional string answer = 9;\n repeated uint32 selections = 10;\n repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n required RCVotingPollSettingsPdu settings = 1;\n required string title = 2;\n repeated RCVotingPollResultPdu results = 3;\n repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n optional string qq = 1;\n optional string skype = 2;\n optional string mobile = 3;\n}\nmessage RCTabUpdateDataRequestPdu {\n optional uint32 id = 1;\n optional bytes action = 2;\n optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteBoardDataModel {\n required uint32 type= 1;//\u767D\u677F\u7C7B\u578B\n required uint32 itemIdx= 2;//itemIdx \u6BCF\u4E00\u6B21\u7ED8\u5236\u7684\u552F\u4E00\u6807\u8BC6\n required uint32 initiator=3; //\u7ED8\u5236\u6765\u81EA\u8C01\n required uint32 parentId=4; //\u7236\u7EA7\u7684id\n required uint32 curPage= 5;//\u9875\u7801\n optional string pointGroup=6; //\u5750\u6807\u70B9\u96C6\u6570\u7EC4\u7684JSON\u5B57\u7B26\u4E32\n optional string color=7 [default = \"#000000\"]; //\u989C\u8272\n optional uint32 thickness= 8 ;//\u7EBF\u6761\u7C97\u7EC6\n optional uint32 radius= 9;//\u56ED\u7684\u534A\u5F84\n optional uint32 fontSize= 10;//\u5B57\u4F53\u5927\u5C0F\n optional string fontName= 11;//\u5B57\u4F53\u540D\u79F0\n optional string text= 12;//\u6587\u672C\u5185\u5BB9\n optional bytes data = 13;//\u6682\u65F6\u9884\u7559\u7684\u53C2\u6570\n}\n\n\n//end\n"
;
exports
.
default
=
_default
;
;
...
...
@@ -14300,8 +14649,12 @@ return /******/ (function(modules) { // webpackBootstrap
},
{
key
:
'rosterInsertHandler'
,
value
:
function
rosterInsertHandler
(
nodeId
,
nodeData
)
{
loger
.
log
(
"有人加入 rosterInsertHandler"
);
this
.
rosterUpdateHandler
(
nodeId
,
nodeData
);
if
(
_GlobalConfig2
.
default
.
nodeId
==
nodeId
)
{
loger
.
log
(
"自己加入 rosterInsertHandler"
);
}
else
{
loger
.
log
(
"有人加入 rosterInsertHandler"
);
this
.
rosterUpdateHandler
(
nodeId
,
nodeData
);
}
}
//更新人员列表数据
...
...
@@ -14309,7 +14662,6 @@ return /******/ (function(modules) { // webpackBootstrap
},
{
key
:
'rosterUpdateHandler'
,
value
:
function
rosterUpdateHandler
(
nodeId
,
nodeData
)
{
//loger.log("更新人员列表数据 rosterUpdateHandler");
if
(
nodeData
.
role
===
_ApeConsts2
.
default
.
NR_MASTER
||
nodeData
.
role
===
_ApeConsts2
.
default
.
NR_SLAVE
)
{
this
.
hostNodeId
=
nodeData
.
nodeId
;
this
.
hostUserId
=
nodeData
.
userId
;
...
...
@@ -14337,13 +14689,15 @@ return /******/ (function(modules) { // webpackBootstrap
},
{
key
:
'rosterDelHandler'
,
value
:
function
rosterDelHandler
(
nodeId
)
{
loger
.
log
(
"有人离开 rosterDelHandler"
);
delete
this
.
rosters
[
nodeId
];
this
.
_emit
(
_MessageTypes2
.
default
.
CLASS_DELETE_ROSTER
,
{
"nodeId"
:
nodeId
});
this
.
emitRosterChange
();
// 自己退出
if
(
nodeId
==
this
.
_confInfo
.
nodeId
)
{
if
(
_GlobalConfig2
.
default
.
nodeId
==
nodeId
)
{
loger
.
log
(
"自己离开 rosterDelHandler"
);
// 自己退出
this
.
_emit
(
_MessageTypes2
.
default
.
CLASS_EXIT
);
}
else
{
loger
.
log
(
"有人离开 rosterDelHandler"
);
delete
this
.
rosters
[
nodeId
];
this
.
_emit
(
_MessageTypes2
.
default
.
CLASS_DELETE_ROSTER
,
{
"nodeId"
:
nodeId
});
this
.
emitRosterChange
();
}
}
...
...
@@ -14474,6 +14828,8 @@ return /******/ (function(modules) { // webpackBootstrap
_this
.
on
(
_pdus2
.
default
.
RCPDU_CHANNEL_JOIN_RESPONSE
,
_this
.
_joinChannelHandler
.
bind
(
_this
));
_this
.
on
(
_pdus2
.
default
.
RCPDU_REG_ADAPTER
,
_this
.
_pduMessageHandler
.
bind
(
_this
));
//先收到onJoinSessionHandlerSuccess 后收到 onJoinChannelHandlerSuccess
// 监听底层MCU会议
_this
.
mcu
=
_mcu2
.
default
;
_this
.
mcu
.
on
(
_MessageTypes2
.
default
.
CLASS_JOIN_SUCCESS
,
_this
.
_mcuConferenceJoinSuccessHandler
.
bind
(
_this
));
...
...
@@ -14498,7 +14854,7 @@ return /******/ (function(modules) { // webpackBootstrap
// this._apeDelayedStart();
setTimeout
(
function
()
{
_this2
.
_pduRegAdapterHandler
(
regBuffer
);
},
this
.
_confInfo
[
'mcuDelay'
]
||
12000
);
},
_GlobalConfig2
.
default
.
mcuDelay
||
12000
);
return
;
}
this
.
_pduRegAdapterHandler
(
regBuffer
);
...
...
@@ -14656,13 +15012,23 @@ return /******/ (function(modules) { // webpackBootstrap
value
:
function
tableDeleteHandler
(
tableId
,
record
)
{
loger
.
warn
(
this
.
_session_name
+
' tableDelHandler 应有子类具体覆盖处理.'
);
}
},
{
key
:
'onJoinChannelHandlerSuccess'
,
value
:
function
onJoinChannelHandlerSuccess
()
{
loger
.
warn
(
this
.
_session_name
+
' onJoinChannelHandlerSuccess 应有子类具体覆盖处理.'
);
}
},
{
key
:
'onJoinSessionHandlerSuccess'
,
value
:
function
onJoinSessionHandlerSuccess
()
{
loger
.
warn
(
this
.
_session_name
+
' onJoinSessionHandlerSuccess 应有子类具体覆盖处理.'
);
}
// 加入Session处理
},
{
key
:
'_joinSessionHandler'
,
value
:
function
_joinSessionHandler
(
data
)
{
loger
.
log
(
this
.
_session_name
,
' -> 加入Session'
);
this
.
onJoinSessionHandlerSuccess
();
}
// 加入Channel处理
...
...
@@ -14674,6 +15040,7 @@ return /******/ (function(modules) { // webpackBootstrap
if
(
joinedChannel
.
result
===
_pdus2
.
default
.
RET_SUCCESS
)
{
loger
.
log
(
this
.
_session_name
,
' -> 加入Channel成功. ChannelId'
,
joinedChannel
.
requestedChannelId
);
this
.
_session_channels
[
joinedChannel
.
requestedChannelId
]
=
_ApeConsts2
.
default
.
CJS_JOINNED
;
this
.
onJoinChannelHandlerSuccess
();
}
else
{
loger
.
log
(
this
.
_session_name
,
' -> 加入Channel失败.'
,
joinedChannel
);
}
...
...
@@ -15445,14 +15812,14 @@ return /******/ (function(modules) { // webpackBootstrap
return
null
;
}
//生成
nodeId的随机数
//生成
时间戳随 保证唯一
},
{
key
:
"generateNodeID"
,
value
:
function
generateNodeID
()
{
key
:
"creatTimestamp"
,
value
:
function
creatTimestamp
()
{
var
time
=
new
Date
().
getTime
();
var
nodeID
=
time
%
1000000000
;
//time后9位
return
nodeID
;
var
timestamp
=
time
%
1000000000
;
//time后9位
return
timestamp
;
}
}]);
...
...
@@ -15919,8 +16286,14 @@ return /******/ (function(modules) { // webpackBootstrap
this
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
//判断文档是否已经存在,每个文档都有唯一的docId,如果已经同步的文档中存在相同的docId就不需要再同步
if
(
this
.
checkDocId
(
paramInfo
.
docId
))
{
//文档已经存在相同的docId,不需要同步上传
loger
.
warn
(
'documentUpload 已经存在相同的docId,不需要上传'
);
return
;
}
itemIdx
=
parseInt
(
Date
.
now
()
/
1000
);
itemIdx
=
_EngineUtils2
.
default
.
creatTimestamp
(
);
var
docDataModelPdu
=
this
.
packPdu
(
paramInfo
,
itemIdx
);
if
(
docDataModelPdu
==
null
)
{
loger
.
log
(
'documentUpload失败,参数错误'
);
...
...
@@ -16010,7 +16383,7 @@ return /******/ (function(modules) { // webpackBootstrap
//获取已经存在的数据
var
docDataModel
=
this
.
docList
[
paramInfo
.
itemIdx
];
if
(
docDataModel
==
null
)
{
loger
.
log
(
'documentSwitch失败,文档不存在'
,
paramInfo
);
loger
.
warn
(
'documentSwitch失败,文档不存在'
,
paramInfo
);
this
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
...
...
@@ -16044,7 +16417,6 @@ return /******/ (function(modules) { // webpackBootstrap
},
{
key
:
'documentDeleteAll'
,
value
:
function
documentDeleteAll
(
_param
)
{
var
len
=
0
;
for
(
var
key
in
this
.
docList
)
{
//console.log("key:"+key);
loger
.
log
(
"删除文档数据,itemIdx:"
+
key
);
...
...
@@ -16101,7 +16473,7 @@ return /******/ (function(modules) { // webpackBootstrap
optional uint32 cur_page_no=4;
optional uint32 page_num =5;
optional string file_type=6;
optional string
doc_type=7;
optional string
creat_user_id=7;//创建文档userid
optional string relative_url=8;//文档相对地址
optional string url =9;//文档地址
optional uint32 cur_V=10;
...
...
@@ -16111,6 +16483,8 @@ return /******/ (function(modules) { // webpackBootstrap
optional uint32 action=14;//0,无操作, 1翻页、2.显示/隐藏
optional string doc_id=15;//文档在服务器数据库中的唯一id
optional string file_name=16;//文档的名字
optional string dynamic_TS=17;//"dynamicTransferStatic": "0"
optional string md5=18;//md5
}*/
//判断type类型,根据type设置不同的参数
...
...
@@ -16121,7 +16495,7 @@ return /******/ (function(modules) { // webpackBootstrap
docModelPdu
.
curPageNo
=
_param
.
curPageNo
||
1
;
docModelPdu
.
pageNum
=
_param
.
pageNum
||
1
;
docModelPdu
.
fileType
=
_param
.
fileType
||
""
;
docModelPdu
.
docType
=
_param
.
docType
||
"pdf2swf
"
;
docModelPdu
.
creatUserId
=
_param
.
creatUserId
||
"0
"
;
docModelPdu
.
url
=
_param
.
url
||
""
;
//"http://101.200.150.192/DocSharing/data/h5test/20170206-171100025/7e9c4178cac1133e0dd9d5b583439122.jpg";
docModelPdu
.
relativeUrl
=
_param
.
relativeUrl
||
""
;
//"/DocSharing/data/h5test/20170206-171100025/7e9c4178cac1133e0dd9d5b583439122.jpg";
docModelPdu
.
curV
=
_param
.
curV
||
0
;
...
...
@@ -16129,7 +16503,8 @@ return /******/ (function(modules) { // webpackBootstrap
docModelPdu
.
scale
=
_param
.
scale
||
1
;
docModelPdu
.
visible
=
_param
.
visible
||
false
;
docModelPdu
.
action
=
_param
.
action
||
0
;
//0,无操作, 1翻页、2.显示/隐藏
docModelPdu
.
docId
=
_param
.
docId
||
""
;
//文档在服务器数据库中的唯一id
docModelPdu
.
docId
=
_param
.
docId
||
""
;
//文档在服务器数据库中的唯一id,必须有
docModelPdu
.
md5
=
_param
.
md5
||
""
;
//MD5
docModelPdu
.
fileName
=
_param
.
fileName
||
"doc_"
+
_itemIdx
;
//文档的名字
docModelPdu
.
dynamicTS
=
_param
.
dynamicTS
||
"0"
;
//文档上传后返回值中的字段dynamicTransferStatic
console
.
log
(
docModelPdu
);
...
...
@@ -16190,32 +16565,13 @@ return /******/ (function(modules) { // webpackBootstrap
value
:
function
tableUpdateHandler
(
owner
,
itemIdx
,
itemData
)
{
//let itemDataInfo = pdu['RCDocSendDataRequestPdu'].decode(itemData);
var
itemDataInfo
=
this
.
unPackPdu
(
owner
,
itemIdx
,
itemData
);
this
.
docList
[
itemIdx
]
=
itemDataInfo
;
if
(
itemDataInfo
==
null
)
{
try
{
var
recordInfo
=
_pdus2
.
default
[
'RCDocSendDataRequestPdu'
].
decode
(
itemData
);
recordInfo
.
type
=
_ApeConsts2
.
default
.
DOCUMENT_LOAD
;
recordInfo
.
ext
=
recordInfo
.
name
.
substr
(
recordInfo
.
name
.
indexOf
(
'.'
)
+
1
);
recordInfo
.
wbid
=
(
recordInfo
.
id
<<
10
)
+
recordInfo
.
curPageNo
;
recordInfo
.
isPicture
=
~
[
'bmp'
,
'png'
,
'gif'
,
'jpg'
,
'jpeg'
].
indexOf
(
recordInfo
.
ext
);
if
(
recordInfo
.
isPicture
)
{
recordInfo
.
namePath
=
recordInfo
.
uri
.
substring
(
0
,
recordInfo
.
uri
.
lastIndexOf
(
'.'
));
recordInfo
.
loadURL
=
recordInfo
.
namePath
+
'.'
+
recordInfo
.
ext
;
}
else
{
recordInfo
.
namePath
=
recordInfo
.
uri
.
substring
(
0
,
recordInfo
.
uri
.
lastIndexOf
(
'/'
));
recordInfo
.
loadURL
=
recordInfo
.
namePath
+
'/'
+
recordInfo
.
curPageNo
+
'.jpg'
;
}
this
.
docList
[
itemIdx
]
=
recordInfo
;
// this.emit(MessageTypes.DOC_UPDATE, recordInfo);
loger
.
log
(
'Doc update ->'
+
itemIdx
,
recordInfo
);
}
catch
(
e
)
{
loger
.
warn
(
'Doc Table Update Decode包异常'
);
}
return
;
if
(
itemDataInfo
!=
null
)
{
this
.
docList
[
itemIdx
]
=
itemDataInfo
;
loger
.
log
(
'tableUpdateHandler'
,
itemDataInfo
);
}
else
{
loger
.
log
(
'tableUpdateHandler 数据无效--> itemIdx'
,
itemIdx
);
}
loger
.
log
(
'tableUpdateHandler'
,
itemDataInfo
);
/*try {
const recordInfo = pdu['RCDocSendDataRequestPdu'].decode(itemData);
recordInfo.type = ApeConsts.DOCUMENT_LOAD;
...
...
@@ -16236,11 +16592,50 @@ return /******/ (function(modules) { // webpackBootstrap
loger.warn('Doc Table Update Decode包异常');
}*/
}
},
{
key
:
'onJoinChannelHandlerSuccess'
,
value
:
function
onJoinChannelHandlerSuccess
()
{
var
_this2
=
this
;
loger
.
log
(
this
.
_session_name
+
' onJoinChannelHandlerSuccess==========================='
);
if
(
this
.
_apeDelayed
)
{
// this._apeDelayedMsgs.push(regBuffer);
// this._apeDelayedStart();
setTimeout
(
function
()
{
_this2
.
_emit
(
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
);
},
_GlobalConfig2
.
default
.
mcuDelay
+
_GlobalConfig2
.
default
.
docDelay
||
12000
+
_GlobalConfig2
.
default
.
docDelay
);
}
else
{
this
.
_emit
(
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
);
}
}
//检查文档是否已经存在,如果存在 返回true,否则返回false
},
{
key
:
'checkDocId'
,
value
:
function
checkDocId
(
_docId
)
{
if
(
_docId
==
null
)
{
loger
.
warn
(
'checkDocId _docId参数为null'
);
return
true
;
}
//遍历查找
for
(
var
key
in
this
.
docList
)
{
var
item
=
this
.
docList
[
key
];
loger
.
log
(
'item.docId==============_docId'
,
item
.
docId
,
_docId
);
if
(
item
&&
item
.
docId
==
_docId
)
{
return
true
;
}
}
//储存的数据中没有查找到
return
false
;
}
}]);
return
DocApe
;
}(
_Ape3
.
default
);
DocApe
.
prototype
.
DOC_JOIN_CHANNEL_SUCCESS
=
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
=
'doc.join.channel.success'
;
var
_default
=
DocApe
;
exports
.
default
=
_default
;
;
...
...
@@ -16396,7 +16791,7 @@ return /******/ (function(modules) { // webpackBootstrap
return
;
}
itemIdx
=
_EngineUtils2
.
default
.
generateNodeID
();
itemIdx
=
_EngineUtils2
.
default
.
creatTimestamp
();
var
whiteBoardModelPdu
=
this
.
packPdu
(
_param
,
itemIdx
);
if
(
whiteBoardModelPdu
==
null
)
{
loger
.
log
(
'sendInsetAnnotaion失败,参数错误'
);
...
...
src/EngineEntrance.js
查看文件 @
c0fa496
...
...
@@ -82,6 +82,7 @@ export default class MessageEntrance extends Emiter {
_doc_ape
.
on
(
'*'
,
(
type
,
data
)
=>
this
.
_emit
(
type
,
data
));
_doc_ape
.
on
(
MessageTypes
.
DOC_UPDATE
,
this
.
docUpdateHandler
.
bind
(
this
));
_doc_ape
.
on
(
MessageTypes
.
DOC_DELETE
,
this
.
docDeleteHandler
.
bind
(
this
));
_doc_ape
.
on
(
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
,
this
.
docJoinChannelSuccess
.
bind
(
this
));
_whiteboard_ape
=
new
WhiteBoardApe
();
...
...
@@ -126,10 +127,11 @@ export default class MessageEntrance extends Emiter {
//mcu异常监听
_mcuErrorHandler
(
_data
){
_mcuErrorHandler
(
_data
,
_option
){
if
(
_mcuErrorCallBackFun
){
let
errorMessage
=
{
"code"
:
_data
,
"reson"
:
""
};
loger
.
log
(
"MCU_ERROR"
,
errorMessage
);
let
option
=
_option
||
""
;
let
errorMessage
=
{
"code"
:
_data
,
"reson"
:
MessageTypes
.
ErrorReson
[
_data
]
+
" "
+
option
};
loger
.
error
(
"MCU_ERROR"
,
errorMessage
);
_mcuErrorCallBackFun
(
errorMessage
);
}
}
...
...
@@ -146,18 +148,17 @@ export default class MessageEntrance extends Emiter {
//初始化
_init
(
_param
,
_onSuccess
,
_mcuErrorCallBack
){
_initSuccessCallBackFun
=
_onSuccess
;
// _initFailureCallBackFun=_onFailure;
_mcuErrorCallBackFun
=
_mcuErrorCallBack
;
//{"meetingNumber":"1653304953","portal":"112.126.80.182:80","userRole":"normal","userId":0}
//判断传入的参数是否存在
if
(
_param
==
null
||
EngineUtils
.
isEmptyObject
(
_param
)
||
_onSuccess
==
null
||
_mcuErrorCallBack
==
null
){
loger
.
log
(
'init初始化失败,参数错误'
);
loger
.
error
(
'init初始化失败,参数错误'
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_PAEAM
);
return
;
}
//判断必要的参数字段值
if
(
_param
.
meetingNumber
==
null
||
isNaN
(
_param
.
meetingNumber
)
||
_param
.
portal
==
null
||
_param
.
portal
==
""
){
loger
.
log
(
'init初始化失败'
,
_param
);
loger
.
error
(
'init初始化失败'
,
_param
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_PAEAM
);
return
;
}
...
...
@@ -165,7 +166,7 @@ export default class MessageEntrance extends Emiter {
//保存参数
GlobalConfig
.
confId
=
_param
.
meetingNumber
;
GlobalConfig
.
portal
=
_param
.
portal
;
GlobalConfig
.
userRole
=
_param
.
userRole
||
"normal"
;
GlobalConfig
.
userRole
=
_param
.
userRole
||
ApeConsts
.
normal
;
GlobalConfig
.
userId
=
_param
.
userId
||
"0"
;
//获取课堂校验信息
...
...
@@ -217,7 +218,7 @@ export default class MessageEntrance extends Emiter {
GlobalConfig
.
md5
=
_data
.
md5
||
""
;
//这个暂时用假数据,后台接口写完就有数据了
GlobalConfig
.
msType
=
_data
.
msType
||
1
;
GlobalConfig
.
siteId
=
_data
.
siteId
||
""
;
GlobalConfig
.
classType
=
_data
.
classType
||
ApeConsts
.
CLASS_TYPE_INTERACT
;
GlobalConfig
.
classType
=
_data
.
meetingType
||
0
;
//host默认需要密码,Sass服务器只判断学生是否需要密码,没有判断老师的
if
(
GlobalConfig
.
userRole
==
"host"
){
...
...
@@ -322,11 +323,23 @@ export default class MessageEntrance extends Emiter {
GlobalConfig
.
setClassDetail
=
_data
;
}
//获取会议所有参数 api/meeting/detail.do?
//获取会议所有参数 api/meeting/detail.do?
flash中的接口文件是 getMeetingParam.do
_h5SassGetMeetingParaSuccessHandler
(
_data
){
loger
.
log
(
'获取api/meeting/detail.do完成.'
);
//包含整个会议最全的信息
GlobalConfig
.
meetingParam
=
_data
;
console
.
log
(
_data
.
docListPrepare
);
console
.
log
(
_data
.
mcuList
);
//包含整个会议最全的信息,储存数据
if
(
_data
){
GlobalConfig
.
setDocListPrepare
(
_data
.
docListPrepare
);
//提前上传的文档列表
GlobalConfig
.
setDocRecordList
(
_data
.
docRecordList
);
//
GlobalConfig
.
setDocList
(
_data
.
docList
);
//
GlobalConfig
.
setMsList
(
_data
.
msList
);
//
GlobalConfig
.
setMcuList
(
_data
.
mcuList
);
//
GlobalConfig
.
setMusicList
(
_data
.
musicList
);
//
GlobalConfig
.
setMusicListPrepare
(
_data
.
musicListPrepare
);
//
GlobalConfig
.
setRsList
(
_data
.
rsList
);
//
}
}
// MCU 会议成功
...
...
@@ -345,7 +358,7 @@ export default class MessageEntrance extends Emiter {
//GlobalConfig.classRole=_data.classRole;
GlobalConfig
.
confId
=
_data
.
confId
;
GlobalConfig
.
h5Module
=
_data
.
h5Module
;
GlobalConfig
.
isHost
=
_data
.
isHost
;
//
GlobalConfig.isHost=_data.isHost;
GlobalConfig
.
maxAudioChannels
=
_data
.
maxAudioChannels
;
GlobalConfig
.
maxVideoChannels
=
_data
.
maxVideoChannels
;
GlobalConfig
.
maxMediaChannels
=
_data
.
maxMediaChannels
;
...
...
@@ -403,7 +416,7 @@ export default class MessageEntrance extends Emiter {
initSuccessCallBackData
.
userRole
=
GlobalConfig
.
userRole
;
initSuccessCallBackData
.
userId
=
GlobalConfig
.
userId
;
initSuccessCallBackData
.
passwordRequired
=
GlobalConfig
.
passwordRequired
;
initSuccessCallBackData
.
classType
=
GlobalConfig
.
classType
;
initSuccessCallBackData
.
classType
=
GlobalConfig
.
classType
||
ApeConsts
.
CLASS_TYPE_INTERACT
;
loger
.
log
(
'加入会议成功'
,
initSuccessCallBackData
);
_joinClassSuccessCallBackFun
(
initSuccessCallBackData
);
}
...
...
@@ -567,4 +580,55 @@ export default class MessageEntrance extends Emiter {
this
.
_emit
(
MessageTypes
.
DOC_DELETE
,
docItem
);
}
}
//文档加入频道成功,同步到MCU服务器上的数据
docJoinChannelSuccess
(){
loger
.
log
(
"docJoinChannelSuccess isHost="
,
GlobalConfig
.
isHost
);
console
.
log
(
GlobalConfig
.
docListPrepare
);
loger
.
log
(
"docJoinChannelSuccess docListPrepare="
);
//如果是主持人,那么需要判断一下文档模块同步的数据和从sass获取的文档数据是否相同,如果mcu服务器不存在的,需要上传
if
(
GlobalConfig
.
isHost
){
for
(
let
value
of
GlobalConfig
.
docListPrepare
){
if
(
value
){
//{
// "MD5": "f3feb3fac8cd3a953bded00e07a0c66b",
// "absoluteLocation": "http://101.200.150.192/DocSharing/data/526661904/20170203-115400026/f3feb3fac8cd3a953bded00e07a0c66b.swf",
// "createUserID": "972",
// "createUserIP": "114.241.81.175",
// "createUserName": "base",
// "dynamicPPT": 0,
// "dynamicTransferStatic": "",
// "id": "8ab3b0ed5a00f2fa015a0219a3df016c",
// "meetingNumber": "",
// "name": "McuClient_v.1.0.1_API.pdf",
// "orderStr": "",
// "pdfSize": 5,
// "processEndTime": "2017-02-03 11:54:31",
// "processRate": 0,
// "processStartTime": "2017-02-03 11:54:27",
// "relativeLocation": "/DocSharing/data/526661904/20170203-115400026/f3feb3fac8cd3a953bded00e07a0c66b.swf",
// "siteID": "h5test",
// "size": 360920,
// "status": 3,
// "type": "pdf",
// "uploadEndTime": "2017-02-03 11:54:27",
// "uploadStartTime": "2017-02-03 11:54:27"
//}
loger
.
log
(
"上传文档到mcu"
,
value
);
let
paramInfo
=
{
"pageNum"
:
value
.
pdfSize
,
"fileName"
:
value
.
name
,
"fileType"
:
value
.
type
,
"relativeUrl"
:
value
.
relativeLocation
,
"url"
:
value
.
absoluteLocation
,
"creatUserId"
:
value
.
createUserID
,
"docId"
:
value
.
id
,
"md5"
:
value
.
MD5
,
"visible"
:
false
};
this
.
_sendDocumentUpload
(
paramInfo
);
}
}
}
}
}
...
...
src/EngineUtils.js
查看文件 @
c0fa496
...
...
@@ -26,11 +26,11 @@ class EngineUtils{
return
null
;
}
//生成nodeId的随机数
static
generateNodeID
(){
//生成时间戳随 保证唯一
static
creatTimestamp
(){
let
time
=
new
Date
().
getTime
();
let
nodeID
:
int
=
time
%
1000000000
;
//time后9位
return
nodeID
;
let
timestamp
:
int
=
time
%
1000000000
;
//time后9位
return
timestamp
;
}
}
export
default
EngineUtils
;
\ No newline at end of file
...
...
src/GlobalConfig.js
查看文件 @
c0fa496
...
...
@@ -69,6 +69,117 @@ class GlobalConfig {
}
}
}
// 判断自己是否主持人角色
static
get
isHost
(){
if
(
this
.
userRole
==
ApeConsts
.
host
){
return
true
;
}
return
false
;
}
// 判断自己是否助教角色
static
get
isAssistant
()
{
if
(
this
.
userRole
==
ApeConsts
.
assistant
){
return
true
;
}
return
false
;
}
// 判断自己是否主讲人角色
static
get
isPresenter
()
{
if
(
this
.
userRole
==
ApeConsts
.
presenter
){
return
true
;
}
return
false
;
}
// 判断自己是否普通角色
static
get
isNormal
()
{
if
(
this
.
userRole
==
ApeConsts
.
normal
)
{
return
true
;
}
return
false
;
}
// 判断自己是否是隐身用户
static
get
isInvisible
(){
if
(
this
.
userRole
==
ApeConsts
.
invisible
){
return
true
;
}
return
false
;
}
//储存已经提前上传的文档列表
static
setDocListPrepare
(
_data
){
if
(
_data
==
null
)
return
;
this
.
docListPrepare
=
_data
;
}
static
getDocListPrepare
(){
return
this
.
docListPrepare
;
}
//储存文档录制列表
static
setDocRecordList
(
_data
){
if
(
_data
==
null
)
return
;
this
.
docRecordList
=
_data
;
}
static
getDocRecordList
(){
return
this
.
docRecordList
;
}
//文档服务器列表
static
setDocList
(
_data
){
if
(
_data
==
null
)
return
;
this
.
docList
=
_data
;
}
static
getDocList
(){
return
this
.
docList
;
}
//ms列表
static
setMsList
(
_data
){
if
(
_data
==
null
)
return
;
this
.
msList
=
_data
;
}
static
getMsList
(){
return
this
.
msList
;
}
//mcu列表
static
setMcuList
(
_data
){
if
(
_data
==
null
)
return
;
this
.
mcuList
=
_data
;
}
static
getMcuList
(){
return
this
.
mcuList
;
}
//声音列表
static
setMusicList
(
_data
){
if
(
_data
==
null
)
return
;
this
.
musicList
=
_data
;
}
static
getMusicList
(){
return
this
.
musicList
;
}
//已经上传的声音列表
static
setMusicListPrepare
(
_data
){
if
(
_data
==
null
)
return
;
this
.
musicListPrepare
=
_data
;
}
static
getMusicListPrepare
(){
return
this
.
musicListPrepare
;
}
//rs列表
static
setRsList
(
_data
){
if
(
_data
==
null
)
return
;
this
.
rsList
=
_data
;
}
static
getRsList
(){
return
this
.
rsList
;
}
}
GlobalConfig
.
statusCode_0
=
{
"code"
:
0
,
message
:
"SDK 未初始化"
};
...
...
@@ -81,9 +192,9 @@ GlobalConfig.siteId="gust";
GlobalConfig
.
confId
=
0
;
//课堂号=classId=meetingNumber 之后统一修改为classId
GlobalConfig
.
nodeId
=
0
;
//随机生成
GlobalConfig
.
topNodeID
=
101
;
//现在固定值,还不知道是做什么用
GlobalConfig
.
userRole
=
"normal"
;
GlobalConfig
.
userRole
=
ApeConsts
.
normal
;
GlobalConfig
.
role
=
1
;
GlobalConfig
.
isHost
=
false
;
//
GlobalConfig.isHost=false;
//GlobalConfig.classRole=0;//废弃
GlobalConfig
.
userId
=
0
;
...
...
@@ -94,7 +205,8 @@ GlobalConfig.h5Module=0;
GlobalConfig
.
passwordRequired
=
false
;
GlobalConfig
.
md5
=
""
;
GlobalConfig
.
msType
=
1
;
GlobalConfig
.
mcuDelay
=
3000
;
GlobalConfig
.
mcuDelay
=
3000
;
//默认的延迟时间
GlobalConfig
.
docDelay
=
1600
;
//文档模块加入成功之后延迟发送送成功的消息给主模块
GlobalConfig
.
portal
=
"112.126.80.182:80"
;
GlobalConfig
.
ip
=
"112.126.80.182"
;
GlobalConfig
.
port
=
"80"
;
...
...
@@ -106,8 +218,8 @@ GlobalConfig.maxAudioChannels=1;
GlobalConfig
.
maxMediaChannels
=
2
;
GlobalConfig
.
isDebug
=
false
;
GlobalConfig
.
deBugData
=
{};
GlobalConfig
.
deviceType
=-
1
;
//设备类型 0:电脑 1:安卓 2:ios -1未知
GlobalConfig
.
userIP
=
""
;
//用户当前IP
GlobalConfig
.
className
=
""
;
// 课程名称
GlobalConfig
.
classId
=
""
;
// 课程号
...
...
@@ -118,16 +230,21 @@ GlobalConfig.recordTimestamp= "";
GlobalConfig
.
recordEndTime
=
""
;
GlobalConfig
.
recordPlayURL
=
""
;
GlobalConfig
.
recordConfigFile
=
""
;
// 录制脚本文件
GlobalConfig
.
tickValues
=
{};
// 滚动条关键点,用于快进快退 pzm+ 20150909
GlobalConfig
.
tickValues
=
{};
// 滚动条关键点,用于快进快退
GlobalConfig
.
classType
=
ApeConsts
.
CLASS_TYPE_INTERACT
;
//1:互动课堂,2:直播课堂
GlobalConfig
.
meetingParam
=
{};
GlobalConfig
.
classDetail
=
{};
GlobalConfig
.
meetingParam
=
{};
//Sass直接返回的所有会议信息(最全)
GlobalConfig
.
classDetail
=
{};
//Sass直接返回的当前课堂基本信息
GlobalConfig
.
docListPrepare
=
[];
// 已经提前上传的文档,进入课堂后需要自动加载
GlobalConfig
.
docRecordList
=
[];
//录制服务器地址集合
GlobalConfig
.
docList
=
[];
//文档服务器地址集合
GlobalConfig
.
mcuList
=
[];
//录制服务器地址集合
GlobalConfig
.
msList
=
[];
//ms服务器地址集合
GlobalConfig
.
musicList
=
[];
//music服务器地址集合
GlobalConfig
.
musicListPrepare
=
[];
//提提前上传的music集合
GlobalConfig
.
rsList
=
[];
// client type
//点对点会议版本
...
...
src/MessageTypes.js
查看文件 @
c0fa496
...
...
@@ -63,18 +63,17 @@ MessageTypes.AUDIO_RECEIVE='audio.receive';
MessageTypes
.
MCU_ERROR
=
"mcuError"
;
//MCU错误
//---------------错误消息 code 定义-------------------------------------------------
MessageTypes
.
ERR_NETWORK
=
10000
;
//网络错误
MessageTypes
.
ERR_UNKNOWN
=
10001
;
//未知错误
MessageTypes
.
ERR_SOCKET_DISCONNECT
=
20000
;
//MCU断开连接,已经离开会议
//---------------错误消息 ErrorCode 定义-------------------------------------------------
//会议初始化失败的几种情况
MessageTypes
.
ERR_CLASS_INIT_PAEAM
=
100
;
//初始化参数错误
MessageTypes
.
ERR_CLASS_INIT_NETWORK
=
101
;
//初始化网络错误
MessageTypes
.
ERR_CLASS_INIT_PROTOCOL
=
102
;
//初始化协议错误
MessageTypes
.
ERR_CLASS_INIT_FAILED
=
103
;
//初始化验证失败
MessageTypes
.
ERR_CLASS_INIT_FAILED_1
=
104
;
//初始化验证失败,课堂号必填
MessageTypes
.
ERR_CLASS_INIT_FAILED_2
=
105
;
//初始化验证失败,无效的课堂号
MessageTypes
.
ERR_CLASS_INIT_FAILED_3
=
106
;
//初始化验证失败,没有对应的站点
MessageTypes
.
ERR_CLASS_INIT_FAILED_4
=
107
;
//初始化验证失败,站点已过期
//加入会议失败的几种情况
MessageTypes
.
ERR_CLASS_JOIN_NETWORK
=
200
;
//加入会议网络错误
...
...
@@ -90,10 +89,52 @@ MessageTypes.ERR_CLASS_JOIN_CONFILICT=207;//已经在其它地方登陆
MessageTypes
.
ERR_GET_CLASS_DETAIL
=
300
;
//获取classDetail失败
MessageTypes
.
ERR_GET_MEETING_PARAML
=
301
;
//获取MeetingParam失败
//APE
MessageTypes
.
ERR_APE_SEND_FAILED_NO_JOIN
=
500
;
//APE在sdk为初始化或未加入会议之前调用发送数据接口
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
=
501
;
//APE在接口调用时参数错误
MessageTypes
.
ERR_NETWORK
=
10000
;
//网络错误
MessageTypes
.
ERR_UNKNOWN
=
10001
;
//未知错误
MessageTypes
.
ERR_SOCKET_DISCONNECT
=
20000
;
//MCU断开连接,已经离开会议
//---------------错误消息 Error Reson 定义-------------------------------------------------
MessageTypes
.
ErrorReson
=
{};
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_PAEAM
]
=
"初始化参数错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_NETWORK
]
=
"初始化网络错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_PROTOCOL
]
=
"初始化协议错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED
]
=
"初始化验证失败"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_1
]
=
"初始化验证失败,课堂号必填"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_2
]
=
"初始化验证失败,无效的课堂号"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_3
]
=
"初始化验证失败,没有对应的站点"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_INIT_FAILED_4
]
=
"初始化验证失败,站点已过期"
;
//加入会议失败的几种情况
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_NETWORK
]
=
"加入会议网络错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_PROTOCOL
]
=
"加入会议化协议错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_FAILED
]
=
"加入会议化异常错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_PARAM
]
=
"加入会议参数错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_FULL
]
=
"人数已满"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_MD5_WRONG
]
=
"MD5验证失败"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_PASSWORD_WRONG
]
=
"密码错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_CLASS_JOIN_CONFILICT
]
=
"已经在其它地方登陆"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_GET_CLASS_DETAIL
=
300
]
=
"获取classDetail失败"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_GET_MEETING_PARAML
]
=
"获取MeetingParam失败"
;
//APE
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_APE_SEND_FAILED_NO_JOIN
]
=
"APE在sdk为初始化或未加入会议之前调用发送数据接口"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
]
=
"APE在接口调用时参数错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_NETWORK
]
=
"网络错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_UNKNOWN
]
=
"未知错误"
;
MessageTypes
.
ErrorReson
[
MessageTypes
.
ERR_SOCKET_DISCONNECT
]
=
"MCU断开连接,已经离开会议"
;
export
default
MessageTypes
;
...
...
src/Sass.js
查看文件 @
c0fa496
...
...
@@ -62,17 +62,33 @@ class Sass extends Emiter {
}
})
.
then
(
ret
=>
{
// code int 0 正常
// 1 课堂号必填
//2 无效的课堂号
//3 没有对应的站点
//4 站点已过期
if
(
ret
.
code
===
0
)
{
loger
.
log
(
'Sass获取课堂校验信息完成'
);
this
.
_emit
(
Sass
.
CLASS_INIT_SUCCESS
,
ret
);
}
else
{
loger
.
warn
(
'Sass获取课堂校验信息失败.'
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_FAILED
);
}
else
if
(
ret
.
code
===
1
)
{
//loger.warn('Sass获取课堂校验信息失败.');
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_FAILED_1
);
}
else
if
(
ret
.
code
===
2
)
{
//loger.warn('Sass获取课堂校验信息失败.');
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_FAILED_2
);
}
else
if
(
ret
.
code
===
3
)
{
//loger.warn('Sass获取课堂校验信息失败.');
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_FAILED_3
);
}
else
if
(
ret
.
code
===
4
)
{
//loger.warn('Sass获取课堂校验信息失败.');
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_FAILED_4
);
}
else
{
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_FAILED
,
ret
);
}
})
.
catch
(
err
=>
{
loger
.
error
(
`
Sass
获取课堂校验信息异常
.
状态码
:
$
{
err
}
`
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_PROTOCOL
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_CLASS_INIT_PROTOCOL
,
err
);
});
}
...
...
@@ -257,7 +273,7 @@ class Sass extends Emiter {
})
.
then
(
ret
=>
{
if
(
ret
.
code
===
0
)
{
loger
.
log
(
'
H5
Sass获取getMeetingParam完成'
);
loger
.
log
(
'Sass获取getMeetingParam完成'
);
this
.
_emit
(
Sass
.
CLASS_GET_MEETING_PARAM
,
ret
);
}
else
{
loger
.
warn
(
'H5Sass获取getMeetingParam失败.'
);
...
...
src/apes/Ape.js
查看文件 @
c0fa496
...
...
@@ -50,6 +50,8 @@ export default class Ape extends Emiter {
this
.
on
(
pdu
.
RCPDU_CHANNEL_JOIN_RESPONSE
,
this
.
_joinChannelHandler
.
bind
(
this
));
this
.
on
(
pdu
.
RCPDU_REG_ADAPTER
,
this
.
_pduMessageHandler
.
bind
(
this
));
//先收到onJoinSessionHandlerSuccess 后收到 onJoinChannelHandlerSuccess
// 监听底层MCU会议
this
.
mcu
=
mcu
;
this
.
mcu
.
on
(
MessageTypes
.
CLASS_JOIN_SUCCESS
,
this
.
_mcuConferenceJoinSuccessHandler
.
bind
(
this
));
...
...
@@ -68,7 +70,7 @@ export default class Ape extends Emiter {
// this._apeDelayedStart();
setTimeout
(()
=>
{
this
.
_pduRegAdapterHandler
(
regBuffer
);
},
this
.
_confInfo
[
'mcuDelay'
]
||
12000
);
},
GlobalConfig
.
mcuDelay
||
12000
);
return
;
}
this
.
_pduRegAdapterHandler
(
regBuffer
);
...
...
@@ -213,9 +215,16 @@ export default class Ape extends Emiter {
loger
.
warn
(
this
.
_session_name
+
' tableDelHandler 应有子类具体覆盖处理.'
);
}
onJoinChannelHandlerSuccess
(){
loger
.
warn
(
this
.
_session_name
+
' onJoinChannelHandlerSuccess 应有子类具体覆盖处理.'
);
}
onJoinSessionHandlerSuccess
(){
loger
.
warn
(
this
.
_session_name
+
' onJoinSessionHandlerSuccess 应有子类具体覆盖处理.'
);
}
// 加入Session处理
_joinSessionHandler
(
data
)
{
loger
.
log
(
this
.
_session_name
,
' -> 加入Session'
);
this
.
onJoinSessionHandlerSuccess
();
}
// 加入Channel处理
...
...
@@ -224,6 +233,7 @@ export default class Ape extends Emiter {
if
(
joinedChannel
.
result
===
pdu
.
RET_SUCCESS
)
{
loger
.
log
(
this
.
_session_name
,
' -> 加入Channel成功. ChannelId'
,
joinedChannel
.
requestedChannelId
);
this
.
_session_channels
[
joinedChannel
.
requestedChannelId
]
=
ApeConsts
.
CJS_JOINNED
;
this
.
onJoinChannelHandlerSuccess
();
}
else
{
loger
.
log
(
this
.
_session_name
,
' -> 加入Channel失败.'
,
joinedChannel
);
}
...
...
src/apes/ApeConsts.js
查看文件 @
c0fa496
...
...
@@ -15,6 +15,15 @@ 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
;
...
...
@@ -163,11 +172,16 @@ ApeConsts.WBA_LASER_PEN = 5;
//class status
PZM+ 2015.12.4
//class status
ApeConsts
.
CLASS_WAIT_START_STATUS
=
0
;
//课堂还未开始
ApeConsts
.
CLASS_STARTING_STATUS
=
1
;
//直播中
ApeConsts
.
CLASS_PAUSING_STATUS
=
2
;
//课间休息
ApeConsts
.
CLASS_WAIT_START
=
"class.wait.start"
;
//课堂还未开始
ApeConsts
.
CLASS_STARTING
=
"class.starting"
;
//直播中
ApeConsts
.
CLASS_PAUSING
=
"class.pausing"
;
//课间休息
//class type
ApeConsts
.
CLASS_TYPE_INTERACT
=
1
;
// 互动课堂,通过MS转发音视频,不能进行H5观看
ApeConsts
.
CLASS_TYPE_LIVE
=
2
;
// 直播课堂,通过CDN转发音视频,不能进行音视频互动
\ No newline at end of file
...
...
src/apes/ConferApe.js
查看文件 @
c0fa496
...
...
@@ -158,13 +158,16 @@ class ConferApe extends Ape {
rosterInsertHandler
(
nodeId
,
nodeData
)
{
loger
.
log
(
"有人加入 rosterInsertHandler"
);
this
.
rosterUpdateHandler
(
nodeId
,
nodeData
);
if
(
GlobalConfig
.
nodeId
==
nodeId
){
loger
.
log
(
"自己加入 rosterInsertHandler"
);
}
else
{
loger
.
log
(
"有人加入 rosterInsertHandler"
);
this
.
rosterUpdateHandler
(
nodeId
,
nodeData
);
}
}
//更新人员列表数据
rosterUpdateHandler
(
nodeId
,
nodeData
)
{
//loger.log("更新人员列表数据 rosterUpdateHandler");
if
(
nodeData
.
role
===
ApeConsts
.
NR_MASTER
||
nodeData
.
role
===
ApeConsts
.
NR_SLAVE
)
{
this
.
hostNodeId
=
nodeData
.
nodeId
;
...
...
@@ -191,13 +194,15 @@ class ConferApe extends Ape {
//删除用户
rosterDelHandler
(
nodeId
)
{
loger
.
log
(
"有人离开 rosterDelHandler"
);
delete
this
.
rosters
[
nodeId
];
this
.
_emit
(
MessageTypes
.
CLASS_DELETE_ROSTER
,
{
"nodeId"
:
nodeId
});
this
.
emitRosterChange
();
// 自己退出
if
(
nodeId
==
this
.
_confInfo
.
nodeId
)
{
if
(
GlobalConfig
.
nodeId
==
nodeId
){
loger
.
log
(
"自己离开 rosterDelHandler"
);
// 自己退出
this
.
_emit
(
MessageTypes
.
CLASS_EXIT
);
}
else
{
loger
.
log
(
"有人离开 rosterDelHandler"
);
delete
this
.
rosters
[
nodeId
];
this
.
_emit
(
MessageTypes
.
CLASS_DELETE_ROSTER
,
{
"nodeId"
:
nodeId
});
this
.
emitRosterChange
();
}
}
...
...
src/apes/DocApe.js
查看文件 @
c0fa496
...
...
@@ -49,8 +49,14 @@ class DocApe extends Ape {
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
//判断文档是否已经存在,每个文档都有唯一的docId,如果已经同步的文档中存在相同的docId就不需要再同步
if
(
this
.
checkDocId
(
paramInfo
.
docId
)){
//文档已经存在相同的docId,不需要同步上传
loger
.
warn
(
'documentUpload 已经存在相同的docId,不需要上传'
);
return
;
}
itemIdx
=
parseInt
(
Date
.
now
()
/
1000
);
itemIdx
=
EngineUtils
.
creatTimestamp
(
);
let
docDataModelPdu
=
this
.
packPdu
(
paramInfo
,
itemIdx
);
if
(
docDataModelPdu
==
null
){
loger
.
log
(
'documentUpload失败,参数错误'
);
...
...
@@ -135,7 +141,7 @@ class DocApe extends Ape {
//获取已经存在的数据
let
docDataModel
=
this
.
docList
[
paramInfo
.
itemIdx
];
if
(
docDataModel
==
null
){
loger
.
log
(
'documentSwitch失败,文档不存在'
,
paramInfo
);
loger
.
warn
(
'documentSwitch失败,文档不存在'
,
paramInfo
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
...
...
@@ -163,7 +169,6 @@ class DocApe extends Ape {
//删除所有文档
documentDeleteAll
(
_param
){
let
len
=
0
;
for
(
let
key
in
this
.
docList
){
//console.log("key:"+key);
loger
.
log
(
"删除文档数据,itemIdx:"
+
key
);
...
...
@@ -214,7 +219,7 @@ class DocApe extends Ape {
optional uint32 cur_page_no=4;
optional uint32 page_num =5;
optional string file_type=6;
optional string
doc_type=7;
optional string
creat_user_id=7;//创建文档userid
optional string relative_url=8;//文档相对地址
optional string url =9;//文档地址
optional uint32 cur_V=10;
...
...
@@ -224,6 +229,8 @@ class DocApe extends Ape {
optional uint32 action=14;//0,无操作, 1翻页、2.显示/隐藏
optional string doc_id=15;//文档在服务器数据库中的唯一id
optional string file_name=16;//文档的名字
optional string dynamic_TS=17;//"dynamicTransferStatic": "0"
optional string md5=18;//md5
}*/
//判断type类型,根据type设置不同的参数
...
...
@@ -234,7 +241,7 @@ class DocApe extends Ape {
docModelPdu
.
curPageNo
=
_param
.
curPageNo
||
1
;
docModelPdu
.
pageNum
=
_param
.
pageNum
||
1
;
docModelPdu
.
fileType
=
_param
.
fileType
||
""
;
docModelPdu
.
docType
=
_param
.
docType
||
"pdf2swf
"
;
docModelPdu
.
creatUserId
=
_param
.
creatUserId
||
"0
"
;
docModelPdu
.
url
=
_param
.
url
||
""
;
//"http://101.200.150.192/DocSharing/data/h5test/20170206-171100025/7e9c4178cac1133e0dd9d5b583439122.jpg";
docModelPdu
.
relativeUrl
=
_param
.
relativeUrl
||
""
;
//"/DocSharing/data/h5test/20170206-171100025/7e9c4178cac1133e0dd9d5b583439122.jpg";
docModelPdu
.
curV
=
_param
.
curV
||
0
;
...
...
@@ -242,7 +249,8 @@ class DocApe extends Ape {
docModelPdu
.
scale
=
_param
.
scale
||
1
;
docModelPdu
.
visible
=
_param
.
visible
||
false
;
docModelPdu
.
action
=
_param
.
action
||
0
;
//0,无操作, 1翻页、2.显示/隐藏
docModelPdu
.
docId
=
_param
.
docId
||
""
;
//文档在服务器数据库中的唯一id
docModelPdu
.
docId
=
_param
.
docId
||
""
;
//文档在服务器数据库中的唯一id,必须有
docModelPdu
.
md5
=
_param
.
md5
||
""
;
//MD5
docModelPdu
.
fileName
=
_param
.
fileName
||
"doc_"
+
_itemIdx
;
//文档的名字
docModelPdu
.
dynamicTS
=
_param
.
dynamicTS
||
"0"
;
//文档上传后返回值中的字段dynamicTransferStatic
console
.
log
(
docModelPdu
);
...
...
@@ -296,32 +304,14 @@ class DocApe extends Ape {
tableUpdateHandler
(
owner
,
itemIdx
,
itemData
)
{
//let itemDataInfo = pdu['RCDocSendDataRequestPdu'].decode(itemData);
let
itemDataInfo
=
this
.
unPackPdu
(
owner
,
itemIdx
,
itemData
);
this
.
docList
[
itemIdx
]
=
itemDataInfo
;
if
(
itemDataInfo
==
null
){
try
{
let
recordInfo
=
pdu
[
'RCDocSendDataRequestPdu'
].
decode
(
itemData
);
recordInfo
.
type
=
ApeConsts
.
DOCUMENT_LOAD
;
recordInfo
.
ext
=
recordInfo
.
name
.
substr
(
recordInfo
.
name
.
indexOf
(
'.'
)
+
1
);
recordInfo
.
wbid
=
(
recordInfo
.
id
<<
10
)
+
recordInfo
.
curPageNo
;
recordInfo
.
isPicture
=
~
[
'bmp'
,
'png'
,
'gif'
,
'jpg'
,
'jpeg'
].
indexOf
(
recordInfo
.
ext
);
if
(
recordInfo
.
isPicture
)
{
recordInfo
.
namePath
=
recordInfo
.
uri
.
substring
(
0
,
recordInfo
.
uri
.
lastIndexOf
(
'.'
));
recordInfo
.
loadURL
=
recordInfo
.
namePath
+
'.'
+
recordInfo
.
ext
;
}
else
{
recordInfo
.
namePath
=
recordInfo
.
uri
.
substring
(
0
,
recordInfo
.
uri
.
lastIndexOf
(
'/'
));
recordInfo
.
loadURL
=
`
$
{
recordInfo
.
namePath
}
/${recordInfo.curPageNo}.jpg`
;
}
this
.
docList
[
itemIdx
]
=
recordInfo
;
// this.emit(MessageTypes.DOC_UPDATE, recordInfo);
loger
.
log
(
'Doc update ->'
+
itemIdx
,
recordInfo
);
}
catch
(
e
)
{
loger
.
warn
(
'Doc Table Update Decode包异常'
);
}
return
;
if
(
itemDataInfo
!=
null
){
this
.
docList
[
itemIdx
]
=
itemDataInfo
;
loger
.
log
(
'tableUpdateHandler'
,
itemDataInfo
);
}
else
{
loger
.
log
(
'tableUpdateHandler 数据无效--> itemIdx'
,
itemIdx
);
}
loger
.
log
(
'tableUpdateHandler'
,
itemDataInfo
);
/*try {
const recordInfo = pdu['RCDocSendDataRequestPdu'].decode(itemData);
recordInfo.type = ApeConsts.DOCUMENT_LOAD;
...
...
@@ -344,9 +334,38 @@ class DocApe extends Ape {
loger.warn('Doc Table Update Decode包异常');
}*/
}
onJoinChannelHandlerSuccess
(){
loger
.
log
(
this
.
_session_name
+
' onJoinChannelHandlerSuccess==========================='
);
if
(
this
.
_apeDelayed
)
{
// this._apeDelayedMsgs.push(regBuffer);
// this._apeDelayedStart();
setTimeout
(()
=>
{
this
.
_emit
(
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
);
},(
GlobalConfig
.
mcuDelay
+
GlobalConfig
.
docDelay
)
||
12000
+
GlobalConfig
.
docDelay
);
}
else
{
this
.
_emit
(
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
);
}
}
//检查文档是否已经存在,如果存在 返回true,否则返回false
checkDocId
(
_docId
){
if
(
_docId
==
null
){
loger
.
warn
(
'checkDocId _docId参数为null'
);
return
true
;
}
//遍历查找
for
(
let
key
in
this
.
docList
){
let
item
=
this
.
docList
[
key
];
loger
.
log
(
'item.docId==============_docId'
,
item
.
docId
,
_docId
);
if
(
item
&&
item
.
docId
==
_docId
){
return
true
;
}
}
//储存的数据中没有查找到
return
false
;
}
}
DocApe
.
prototype
.
DOC_JOIN_CHANNEL_SUCCESS
=
DocApe
.
DOC_JOIN_CHANNEL_SUCCESS
=
'doc.join.channel.success'
;
export
default
DocApe
;
...
...
src/apes/WhiteBoardApe.js
查看文件 @
c0fa496
...
...
@@ -85,7 +85,7 @@ class WhiteBoardApe extends Ape {
return
;
}
itemIdx
=
EngineUtils
.
generateNodeID
();
itemIdx
=
EngineUtils
.
creatTimestamp
();
let
whiteBoardModelPdu
=
this
.
packPdu
(
_param
,
itemIdx
);
if
(
whiteBoardModelPdu
==
null
){
loger
.
log
(
'sendInsetAnnotaion失败,参数错误'
);
...
...
src/mcu.js
查看文件 @
c0fa496
...
...
@@ -162,7 +162,7 @@ class MCU extends Emiter {
_confInfo
.
confId
=
parseInt
(
_confInfo
.
confId
);
// confId 必须整形
this
.
confInfo
=
_confInfo
;
// 创建刷新nodeId
this
.
confInfo
.
nodeId
=
EngineUtils
.
generateNodeID
();
this
.
confInfo
.
nodeId
=
EngineUtils
.
creatTimestamp
();
GlobalConfig
.
nodeId
=
this
.
confInfo
.
nodeId
;
//这是标识自己身份的id
let
nodeInfoRecordPdu
=
new
pdu
[
'RCNodeInfoRecordPdu'
];
...
...
src/pdus/pro.js
查看文件 @
c0fa496
...
...
@@ -720,7 +720,7 @@ message RCDocSendDataModelPdu {
optional
uint32
cur_page_no
=
4
;
optional
uint32
page_num
=
5
;
optional
string
file_type
=
6
;
optional
string
doc_type
=
7
;
optional
string
creat_user_id
=
7
;
//创建文档userid
optional
string
relative_url
=
8
;
//文档相对地址
optional
string
url
=
9
;
//文档地址
optional
uint32
cur_V
=
10
;
...
...
@@ -731,6 +731,8 @@ message RCDocSendDataModelPdu {
optional
string
doc_id
=
15
;
//文档在服务器数据库中的唯一id
optional
string
file_name
=
16
;
//文档的名字
optional
string
dynamic_TS
=
17
;
//"dynamicTransferStatic": "0"
optional
string
md5
=
18
;
//md5
}
message
RCGiftSendDataRequestPdu
{
optional
uint32
initiator
=
1
;
...
...
请
注册
或
登录
后发表评论