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-12 19:39:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fff222394b74096f7c994a9fe320f02535f72135
fff22239
1 parent
99c9d3c1
1.增加会议模块的信息,记录当前会议状态的字段
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
233 行增加
和
44 行删除
dist/McuClient.js
src/EngineEntrance.js
src/GlobalConfig.js
src/apes/ApeConsts.js
src/apes/ConferApe.js
dist/McuClient.js
查看文件 @
fff2223
...
...
@@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/
}
/******/
var
hotApplyOnUpdate
=
true
;
/******/
var
hotCurrentHash
=
"
a3d78cdd8a1339c5b14c
"
;
// eslint-disable-line no-unused-vars
/******/
var
hotCurrentHash
=
"
5e0ae84f169d08ac1a6d
"
;
// eslint-disable-line no-unused-vars
/******/
var
hotCurrentModuleData
=
{};
/******/
var
hotCurrentParents
=
[];
// eslint-disable-line no-unused-vars
...
...
@@ -809,7 +809,8 @@ return /******/ (function(modules) { // webpackBootstrap
_this
.
leaveClass
=
_this
.
_leaveClass
;
_this
.
getMcuClientStatus
=
_this
.
_getMcuClientStatus
;
_this
.
getClassDetail
=
_this
.
_getClassDetail
;
_this
.
sendUpdaterClass
=
_this
.
_sendUpdaterClass
;
_this
.
sendUpdaterClassInfo
=
_this
.
_sendUpdaterClassInfo
;
_this
.
sendUpdaterClassInfo1
=
_this
.
_sendUpdaterClassInfo1
;
//chatApe
_this
.
sendChatMsg
=
_this
.
_sendChatMsg
;
...
...
@@ -833,8 +834,6 @@ return /******/ (function(modules) { // webpackBootstrap
_this
.
sendDocumentDeleteAll
=
_this
.
_documentDeleteAll
;
//删除所有文档
_this
.
sendDocumentCommand
=
_this
.
_sendDocumentCommand
;
//操作文档(翻页、缩放、滚动...)
//debug
//this.setDebugData=this._setDebugData;
return
_this
;
}
...
...
@@ -1194,12 +1193,19 @@ return /******/ (function(modules) { // webpackBootstrap
//更新会议数据
},
{
key
:
'_sendUpdaterClass'
,
value
:
function
_sendUpdaterClass
(
_param
)
{
key
:
'_sendUpdaterClassInfo'
,
value
:
function
_sendUpdaterClassInfo
(
_param
)
{
if
(
_confer_ape
)
{
_confer_ape
.
sendUpdaterClassInfo
(
_param
);
}
}
},
{
key
:
'_sendUpdaterClassStatus'
,
value
:
function
_sendUpdaterClassStatus
(
_param
)
{
if
(
_confer_ape
)
{
_confer_ape
.
sendUpdaterClassStatus
(
_param
);
}
}
//ChatApe
// 发送聊天消息
...
...
@@ -2372,7 +2378,8 @@ return /******/ (function(modules) { // webpackBootstrap
};
}
}
// 判断自己是否主持人角色
//当前的课堂状态的信息
},
{
key
:
'setDocListPrepare'
,
...
...
@@ -2484,6 +2491,38 @@ return /******/ (function(modules) { // webpackBootstrap
return
this
.
rsList
;
}
},
{
key
:
'classStatusInfo'
,
get
:
function
get
()
{
return
{
"classStatusInfo"
:
{
"nodeId"
:
this
.
nodeId
,
//mcu中的唯一ID
"userId"
:
this
.
userId
,
//
"userName"
:
this
.
userName
,
"siteId"
:
this
.
siteId
,
//站点号
"classId"
:
this
.
classId
,
"className"
:
this
.
className
,
"classType"
:
this
.
classType
,
//课堂类型
"classStatus"
:
this
.
classStatus
,
//课堂的状态
"classStartTime"
:
this
.
classStartTime
,
//课堂点击开始时间
"classEndTime"
:
this
.
classEndTime
,
//最后一次的时间(点暂停或结束),每次发送数据都获取当前时间戳
"classTimestamp"
:
this
.
recordTimestamp
,
//相对于点开始课堂的时间戳
"recordStatus"
:
this
.
recordStatus
,
//当前录制状态
"recordTimestamp"
:
this
.
recordTimestamp
,
//相对于开始录制的时间戳
"recordStreamName"
:
this
.
recordStreamName
,
//录制的文件名
"recordDownloadUrl"
:
this
.
recordDownloadUrl
,
//下载地址
"systemTimestamp"
:
this
.
systemTimestamp
//当前的系统时间戳
}
};
},
set
:
function
set
(
_param
)
{}
// 判断自己是否主持人角色
},
{
key
:
'isHost'
,
get
:
function
get
()
{
if
(
this
.
userRole
==
_ApeConsts2
.
default
.
host
)
{
...
...
@@ -2557,6 +2596,7 @@ return /******/ (function(modules) { // webpackBootstrap
GlobalConfig
.
userId
=
0
;
GlobalConfig
.
userName
=
""
;
GlobalConfig
.
password
=
""
;
GlobalConfig
.
userType
=
8
;
GlobalConfig
.
h5Module
=
0
;
...
...
@@ -2581,16 +2621,20 @@ return /******/ (function(modules) { // webpackBootstrap
GlobalConfig
.
className
=
""
;
// 课程名称
GlobalConfig
.
classId
=
""
;
// 课程号
GlobalConfig
.
classType
=
_ApeConsts2
.
default
.
CLASS_TYPE_INTERACT
;
//1:互动课堂,2:直播课堂
GlobalConfig
.
classStatus
=
_ApeConsts2
.
default
.
CLASS_STATUS_WAIT
;
// 0;//课堂还未开始 1;//直播中 2 //课间休息 3已经停止
GlobalConfig
.
recordStartTime
=
""
;
GlobalConfig
.
recordStartTimestam
=
""
;
GlobalConfig
.
recordEndTimestamp
=
""
;
GlobalConfig
.
recordTimestamp
=
""
;
GlobalConfig
.
recordEndTime
=
""
;
GlobalConfig
.
recordPlayURL
=
""
;
GlobalConfig
.
recordConfigFile
=
""
;
// 录制脚本文件
GlobalConfig
.
tickValues
=
{};
// 滚动条关键点,用于快进快退
GlobalConfig
.
classType
=
_ApeConsts2
.
default
.
CLASS_TYPE_INTERACT
;
//1:互动课堂,2:直播课堂
GlobalConfig
.
meetingParam
=
{};
//Sass直接返回的所有会议信息(最全)
GlobalConfig
.
classDetail
=
{};
//Sass直接返回的当前课堂基本信息
...
...
@@ -2657,6 +2701,21 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
//课堂状态
ApeConsts
.
CLASS_STATUS_WAIT
=
0
;
//课堂还未开始
ApeConsts
.
CLASS_STATUS_STARTED
=
1
;
//直播中
ApeConsts
.
CLASS_STATUS_PAUSE
=
2
;
//暂停
ApeConsts
.
CLASS_STATUS_CLOSE
=
3
;
//结束
ApeConsts
.
CLASS_WAIT_START
=
"class.wait.start"
;
//课堂还未开始
ApeConsts
.
CLASS_STARTING
=
"class.started"
;
//直播中
ApeConsts
.
CLASS_PAUSING
=
"class.pause"
;
//暂停
ApeConsts
.
CLASS_PAUSING
=
"class.closed"
;
//关闭
//课堂类型
ApeConsts
.
CLASS_TYPE_INTERACT
=
1
;
// 互动课堂,通过MS转发音视频,不能进行H5观看
ApeConsts
.
CLASS_TYPE_LIVE
=
2
;
// 直播课堂,通过CDN转发音视频,不能进行音视频互动
//角色身份
ApeConsts
.
NR_GUEST
=
0
;
// 客人
ApeConsts
.
NR_NORMAL
=
1
;
// 普通与会者
...
...
@@ -2820,21 +2879,6 @@ return /******/ (function(modules) { // webpackBootstrap
ApeConsts
.
WBA_OPEN
=
3
;
ApeConsts
.
WBA_DOC_ANNOTATION
=
4
;
ApeConsts
.
WBA_LASER_PEN
=
5
;
//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转发音视频,不能进行音视频互动
;
var
_temp
=
function
()
{
...
...
@@ -14676,6 +14720,58 @@ return /******/ (function(modules) { // webpackBootstrap
this
.
sendUniform
(
adapterPdu
,
true
);
}
//更新会议状态
},
{
key
:
'sendUpdaterClassStatus'
,
value
:
function
sendUpdaterClassStatus
(
_param
)
{
loger
.
log
(
'sendUpdaterClassStatus----------'
);
if
(
_param
==
null
||
_EngineUtils2
.
default
.
isEmptyObject
(
_param
))
{
loger
.
log
(
'sendUpdaterClassInfo,参数错误'
);
this
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
itemIdx
=
_param
.
itemIdx
;
var
whiteBoardModelPdu
=
this
.
packPdu
(
_param
,
itemIdx
);
console
.
log
(
whiteBoardModelPdu
);
if
(
whiteBoardModelPdu
==
null
)
{
loger
.
log
(
'sendUpdaterClassInfo,参数错误'
);
this
.
_emit
(
_MessageTypes2
.
default
.
MCU_ERROR
,
_MessageTypes2
.
default
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
var
tableItemPdu
=
new
_pdus2
.
default
[
'RCRegistryTableItemPdu'
]();
tableItemPdu
.
itemIdx
=
itemIdx
;
tableItemPdu
.
owner
=
0
;
//收到flash的是这个值,不清楚先写固定
tableItemPdu
.
registerObjId
=
_ApeConsts2
.
default
.
CONFERENCE_OBJ_TABLE_ID
;
tableItemPdu
.
itemData
=
whiteBoardModelPdu
.
toArrayBuffer
();
//updater
var
whiteBoardUpdateItem
=
new
_pdus2
.
default
[
'RCRegistryTableUpdateItemPdu'
]();
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
//repeated RCRegistryTableItemPdu items = 2;
whiteBoardUpdateItem
.
type
=
_pdus2
.
default
.
RCPDU_REG_TABLE_UPDATE_PDU
;
//
whiteBoardUpdateItem
.
items
.
push
(
tableItemPdu
);
var
updateObjPdu
=
new
_pdus2
.
default
[
'RCRegistryUpdateObjPdu'
]();
updateObjPdu
.
objId
=
_ApeConsts2
.
default
.
CONFERENCE_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
whiteBoardUpdateItem
.
type
;
updateObjPdu
.
userData
=
whiteBoardUpdateItem
.
toArrayBuffer
();
//同步
var
adapterItemPdu
=
new
_pdus2
.
default
[
'RCAdapterItemPdu'
]();
adapterItemPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
updateObjPdu
.
toArrayBuffer
();
var
adapterPdu
=
new
_pdus2
.
default
[
'RCAdapterPdu'
]();
adapterPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"会议发送更新数据111============"
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
///////白板数据的封包和解包/////////////////////////////////////////
},
{
...
...
src/EngineEntrance.js
查看文件 @
fff2223
...
...
@@ -97,7 +97,7 @@ export default class MessageEntrance extends Emiter {
this
.
leaveClass
=
this
.
_leaveClass
;
this
.
getMcuClientStatus
=
this
.
_getMcuClientStatus
;
this
.
getClassDetail
=
this
.
_getClassDetail
;
this
.
sendUpdaterClass
=
this
.
_sendUpdaterClass
;
this
.
sendUpdaterClass
Info
=
this
.
_sendUpdaterClassInfo
;
//chatApe
this
.
sendChatMsg
=
this
.
_sendChatMsg
;
...
...
@@ -122,8 +122,6 @@ export default class MessageEntrance extends Emiter {
this
.
sendDocumentDeleteAll
=
this
.
_documentDeleteAll
;
//删除所有文档
this
.
sendDocumentCommand
=
this
.
_sendDocumentCommand
;
//操作文档(翻页、缩放、滚动...)
//debug
//this.setDebugData=this._setDebugData;
}
...
...
@@ -443,11 +441,18 @@ export default class MessageEntrance extends Emiter {
this
.
_emit
(
msg
.
type
,
msg
);
}
//更新会议数据
_sendUpdaterClass
(
_param
){
_sendUpdaterClass
Info
(
_param
){
if
(
_confer_ape
){
_confer_ape
.
sendUpdaterClassInfo
(
_param
);
}
}
_sendUpdaterClassStatus
(
_param
){
if
(
_confer_ape
){
_confer_ape
.
sendUpdaterClassStatus
(
_param
);
}
}
//ChatApe
...
...
src/GlobalConfig.js
查看文件 @
fff2223
...
...
@@ -11,6 +11,8 @@ class GlobalConfig {
}
_currentStatus
=
null
;
static
setDebugData
(
_deBugData
){
this
.
isDebug
=
true
;
this
.
deBugData
=
_deBugData
;
...
...
@@ -69,6 +71,38 @@ class GlobalConfig {
}
}
}
//当前的课堂状态的信息
static
get
classStatusInfo
(){
return
{
"classStatusInfo"
:{
"nodeId"
:
this
.
nodeId
,
//mcu中的唯一ID
"userId"
:
this
.
userId
,
//
"userName"
:
this
.
userName
,
"siteId"
:
this
.
siteId
,
//站点号
"classId"
:
this
.
classId
,
"className"
:
this
.
className
,
"classType"
:
this
.
classType
,
//课堂类型
"classStatus"
:
this
.
classStatus
,
//课堂的状态
"classStartTime"
:
this
.
classStartTime
,
//课堂点击开始时间
"classEndTime"
:
this
.
classEndTime
,
//最后一次的时间(点暂停或结束),每次发送数据都获取当前时间戳
"classTimestamp"
:
this
.
recordTimestamp
,
//相对于点开始课堂的时间戳
"recordStatus"
:
this
.
recordStatus
,
//当前录制状态
"recordTimestamp"
:
this
.
recordTimestamp
,
//相对于开始录制的时间戳
"recordStreamName"
:
this
.
recordStreamName
,
//录制的文件名
"recordDownloadUrl"
:
this
.
recordDownloadUrl
,
//下载地址
"systemTimestamp"
:
this
.
systemTimestamp
//当前的系统时间戳
}
}
}
static
set
classStatusInfo
(
_param
){
}
// 判断自己是否主持人角色
static
get
isHost
(){
if
(
this
.
userRole
==
ApeConsts
.
host
){
...
...
@@ -199,6 +233,7 @@ GlobalConfig.role=1;
GlobalConfig
.
userId
=
0
;
GlobalConfig
.
userName
=
""
;
GlobalConfig
.
password
=
""
;
GlobalConfig
.
userType
=
8
;
GlobalConfig
.
h5Module
=
0
;
...
...
@@ -223,16 +258,21 @@ GlobalConfig.userIP="";//用户当前IP
GlobalConfig
.
className
=
""
;
// 课程名称
GlobalConfig
.
classId
=
""
;
// 课程号
GlobalConfig
.
classType
=
ApeConsts
.
CLASS_TYPE_INTERACT
;
//1:互动课堂,2:直播课堂
GlobalConfig
.
classStatus
=
ApeConsts
.
CLASS_STATUS_WAIT
;
// 0;//课堂还未开始 1;//直播中 2 //课间休息 3已经停止
GlobalConfig
.
recordStartTime
=
""
;
GlobalConfig
.
recordStartTimestam
=
""
;
GlobalConfig
.
recordEndTimestamp
=
""
;
GlobalConfig
.
recordTimestamp
=
""
;
GlobalConfig
.
recordEndTime
=
""
;
GlobalConfig
.
recordPlayURL
=
""
;
GlobalConfig
.
recordConfigFile
=
""
;
// 录制脚本文件
GlobalConfig
.
tickValues
=
{};
// 滚动条关键点,用于快进快退
GlobalConfig
.
classType
=
ApeConsts
.
CLASS_TYPE_INTERACT
;
//1:互动课堂,2:直播课堂
GlobalConfig
.
meetingParam
=
{};
//Sass直接返回的所有会议信息(最全)
GlobalConfig
.
classDetail
=
{};
//Sass直接返回的当前课堂基本信息
...
...
src/apes/ApeConsts.js
查看文件 @
fff2223
...
...
@@ -6,6 +6,21 @@ export default function ApeConsts(id) {
}
}
//课堂状态
ApeConsts
.
CLASS_STATUS_WAIT
=
0
;
//课堂还未开始
ApeConsts
.
CLASS_STATUS_STARTED
=
1
;
//直播中
ApeConsts
.
CLASS_STATUS_PAUSE
=
2
;
//暂停
ApeConsts
.
CLASS_STATUS_CLOSE
=
3
;
//结束
ApeConsts
.
CLASS_WAIT_START
=
"class.wait.start"
;
//课堂还未开始
ApeConsts
.
CLASS_STARTING
=
"class.started"
;
//直播中
ApeConsts
.
CLASS_PAUSING
=
"class.pause"
;
//暂停
ApeConsts
.
CLASS_PAUSING
=
"class.closed"
;
//关闭
//课堂类型
ApeConsts
.
CLASS_TYPE_INTERACT
=
1
;
// 互动课堂,通过MS转发音视频,不能进行H5观看
ApeConsts
.
CLASS_TYPE_LIVE
=
2
;
// 直播课堂,通过CDN转发音视频,不能进行音视频互动
//角色身份
ApeConsts
.
NR_GUEST
=
0
;
// 客人
ApeConsts
.
NR_NORMAL
=
1
;
// 普通与会者
...
...
@@ -169,19 +184,3 @@ ApeConsts.WBA_CHANGE = 2;
ApeConsts
.
WBA_OPEN
=
3
;
ApeConsts
.
WBA_DOC_ANNOTATION
=
4
;
ApeConsts
.
WBA_LASER_PEN
=
5
;
//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
查看文件 @
fff2223
...
...
@@ -189,7 +189,56 @@ class ConferApe extends Ape {
this
.
sendUniform
(
adapterPdu
,
true
);
}
//更新会议状态
sendUpdaterClassStatus
(
_param
){
loger
.
log
(
'sendUpdaterClassStatus----------'
);
if
(
_param
==
null
||
EngineUtils
.
isEmptyObject
(
_param
)){
loger
.
log
(
'sendUpdaterClassInfo,参数错误'
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
itemIdx
=
_param
.
itemIdx
;
let
whiteBoardModelPdu
=
this
.
packPdu
(
_param
,
itemIdx
);
console
.
log
(
whiteBoardModelPdu
);
if
(
whiteBoardModelPdu
==
null
){
loger
.
log
(
'sendUpdaterClassInfo,参数错误'
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
let
tableItemPdu
=
new
pdu
[
'RCRegistryTableItemPdu'
];
tableItemPdu
.
itemIdx
=
itemIdx
;
tableItemPdu
.
owner
=
0
;
//收到flash的是这个值,不清楚先写固定
tableItemPdu
.
registerObjId
=
ApeConsts
.
CONFERENCE_OBJ_TABLE_ID
;
tableItemPdu
.
itemData
=
whiteBoardModelPdu
.
toArrayBuffer
();
//updater
let
whiteBoardUpdateItem
=
new
pdu
[
'RCRegistryTableUpdateItemPdu'
];
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
//repeated RCRegistryTableItemPdu items = 2;
whiteBoardUpdateItem
.
type
=
pdu
.
RCPDU_REG_TABLE_UPDATE_PDU
;
//
whiteBoardUpdateItem
.
items
.
push
(
tableItemPdu
);
let
updateObjPdu
=
new
pdu
[
'RCRegistryUpdateObjPdu'
];
updateObjPdu
.
objId
=
ApeConsts
.
CONFERENCE_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
whiteBoardUpdateItem
.
type
;
updateObjPdu
.
userData
=
whiteBoardUpdateItem
.
toArrayBuffer
();
//同步
let
adapterItemPdu
=
new
pdu
[
'RCAdapterItemPdu'
];
adapterItemPdu
.
type
=
pdu
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
updateObjPdu
.
toArrayBuffer
();
let
adapterPdu
=
new
pdu
[
'RCAdapterPdu'
];
adapterPdu
.
type
=
pdu
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"会议发送更新数据111============"
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
///////白板数据的封包和解包/////////////////////////////////////////
packPdu
(
_param
,
_itemIdx
){
...
...
请
注册
或
登录
后发表评论