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-03-04 17:23:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0f34ceafe492fa880cba82a5fd1a714f5728dc9f
0f34ceaf
1 parent
3f6fa8a0
1。音视频模块增加获取当前频道占用情况的接口,获取当前所有频道的信息
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
48 行增加
和
6 行删除
src/EngineEntrance.js
src/apes/AudioApe.js
src/apes/MediaModule.js
src/apes/VideoApe.js
src/EngineEntrance.js
查看文件 @
0f34cea
...
...
@@ -116,16 +116,18 @@ export default class MessageEntrance extends Emiter {
this
.
sendChatMsg
=
this
.
_sendChatMsg
.
bind
(
this
);
//videoApe
this
.
getVideoPlayPath
=
this
.
_getVideoPlayPath
.
bind
(
this
);
//
this.getVideoPlayPath = this._getVideoPlayPath.bind(this);
this
.
getVideoPublishPath
=
this
.
_getVideoPublishPath
.
bind
(
this
);
this
.
getVideoAllChannelInfo
=
this
.
_getVideoAllChannelInfo
.
bind
(
this
);
this
.
publishVideo
=
this
.
_publishVideo
.
bind
(
this
);
this
.
stopPublishVideo
=
this
.
_stopPublishVideo
.
bind
(
this
);
this
.
sendVideoBroadcastMsg
=
this
.
_sendVideoBroadcastMsg
.
bind
(
this
);
//audioApe
this
.
getAudioPlayPath
=
this
.
_getPlayAudioPath
.
bind
(
this
);
//
this.getAudioPlayPath = this._getPlayAudioPath.bind(this);
this
.
getAudioPublishPath
=
this
.
_getPublishAudioPath
.
bind
(
this
);
this
.
getAudioAllChannelInfo
=
this
.
_getAudioAllChannelInfo
.
bind
(
this
);
this
.
publishAudio
=
this
.
_publishAudio
.
bind
(
this
);
this
.
stopPublishAudio
=
this
.
_stopPublishAudio
.
bind
(
this
);
this
.
sendAudioBroadcastMsg
=
this
.
sendAudioCommandMsg
.
bind
(
this
);
...
...
@@ -138,9 +140,9 @@ export default class MessageEntrance extends Emiter {
this
.
sendGotoPrev
=
this
.
_sendGotoPrev
.
bind
(
this
);
//DocApe
this
.
sendDocumentUpload
=
this
.
_sendDocumentUpload
.
bind
(
this
);;
//上传文档
this
.
sendDocumentSwitchDoc
=
this
.
_sendDocumentSwitchDoc
.
bind
(
this
);;
//切换文档
this
.
sendDocumentSwitchPage
=
this
.
_sendDocumentSwitchPage
.
bind
(
this
);;
//翻页
this
.
sendDocumentUpload
=
this
.
_sendDocumentUpload
.
bind
(
this
);
//上传文档
this
.
sendDocumentSwitchDoc
=
this
.
_sendDocumentSwitchDoc
.
bind
(
this
);
//切换文档
this
.
sendDocumentSwitchPage
=
this
.
_sendDocumentSwitchPage
.
bind
(
this
);
//翻页
this
.
sendDocumentDelete
=
this
.
_sassDeleteDocument
.
bind
(
this
);;
//删除文档,先通过Sass删除,sass删除成功之后再同步mcu
//this.sendDocumentDeleteAll= this._documentDeleteAll;//删除所有文档
this
.
sendDocumentCommand
=
this
.
_sendDocumentCommand
.
bind
(
this
);;
//操作文档(翻页、缩放、滚动...)
...
...
@@ -747,6 +749,11 @@ export default class MessageEntrance extends Emiter {
return
_video_ape
.
getPublishVideoPath
(
_param
);
}
}
_getVideoAllChannelInfo
(
_param
){
if
(
_video_ape
){
return
_video_ape
.
getAllChannelInfo
(
_param
);
}
}
_publishVideo
(
_param
){
if
(
!
_mcu
.
connected
){
...
...
@@ -797,7 +804,11 @@ export default class MessageEntrance extends Emiter {
return
_audio_ape
.
getAudioPublishPath
(
_param
);
}
}
_getAudioAllChannelInfo
(
_param
){
if
(
_audio_ape
){
return
_audio_ape
.
getAllChannelInfo
(
_param
);
}
}
_publishAudio
(
_param
){
if
(
!
_mcu
.
connected
){
loger
.
warn
(
GlobalConfig
.
getCurrentStatus
());
...
...
src/apes/AudioApe.js
查看文件 @
0f34cea
...
...
@@ -50,6 +50,12 @@ class AudioApe extends Ape {
return
this
.
mediaModule
.
getMediaPublishPath
(
_param
);
}
//获取当前所有频道信息
getAllChannelInfo
(
_param
){
loger
.
log
(
'getAllChannelInfo'
);
return
this
.
mediaModule
.
getAllMediaChannelInfo
();
}
//推流
publishAudio
(
_param
)
{
if
(
!
this
.
mcu
.
connected
){
...
...
@@ -296,6 +302,7 @@ class AudioApe extends Ape {
if
(
owner
==
0
){
loger
.
log
(
"释放占用的频道,channel"
,
itemIdx
);
unpackChannelInfo
.
status
=
ApeConsts
.
CHANNEL_STATUS_RELEASED
;
unpackChannelInfo
.
streamId
=
""
;
}
this
.
mediaModule
.
mediaChannels
[
itemIdx
]
=
unpackChannelInfo
;
...
...
src/apes/MediaModule.js
查看文件 @
0f34cea
...
...
@@ -138,6 +138,23 @@ class MediaModule {
return
true
;
}
//获取当前所有频道的信息
getAllMediaChannelInfo
(){
let
channels
=
[];
for
(
let
key
in
this
.
mediaChannels
){
let
channel
=
this
.
mediaChannels
[
key
];
if
(
channel
){
channels
.
push
({
"mediaId"
:
channel
.
channelId
,
"status"
:
channel
.
status
,
"fromNodeId"
:
channel
.
fromNodeId
});
}
}
if
(
channels
.
length
<
this
.
maxMediaChannel
){
for
(
let
i
=
channels
.
length
;
i
<
this
.
maxMediaChannel
;
i
++
){
let
channelId
=
this
.
MEDIA_OBJ_TABLE_ID
+
(
i
);
channels
.
push
({
"mediaId"
:
channelId
,
"status"
:
ApeConsts
.
CHANNEL_STATUS_RELEASED
,
"fromNodeId"
:
0
});
}
}
return
channels
;
}
//获取默认的频道信息
getDefaultChannelInfo
(){
let
channelInfo
=
{};
...
...
src/apes/VideoApe.js
查看文件 @
0f34cea
...
...
@@ -51,6 +51,12 @@ class VideoApe extends Ape {
return
this
.
mediaModule
.
getMediaPublishPath
(
_param
);
}
//获取当前所有频道信息
getAllChannelInfo
(
_param
){
loger
.
log
(
'getAllChannelInfo'
);
return
this
.
mediaModule
.
getAllMediaChannelInfo
();
}
//推流
publishVideo
(
_param
)
{
if
(
!
this
.
mcu
.
connected
){
...
...
@@ -300,6 +306,7 @@ class VideoApe extends Ape {
if
(
owner
==
0
){
loger
.
log
(
"释放占用的频道,channel"
,
itemIdx
);
unpackChannelInfo
.
status
=
ApeConsts
.
CHANNEL_STATUS_RELEASED
;
unpackChannelInfo
.
streamId
=
""
;
}
this
.
mediaModule
.
mediaChannels
[
itemIdx
]
=
unpackChannelInfo
;
...
...
请
注册
或
登录
后发表评论