This commit is contained in:
parent
07aa661dba
commit
edfaa9342b
|
|
@ -253,6 +253,7 @@ const Meeting: React.FC = () => {
|
||||||
agora.setJoinChannel({
|
agora.setJoinChannel({
|
||||||
channelId: state.channelId,
|
channelId: state.channelId,
|
||||||
uid: userInfo.uid,
|
uid: userInfo.uid,
|
||||||
|
screenShareId: userInfo.screenShareId,
|
||||||
token: state.token,
|
token: state.token,
|
||||||
tokenA: state.tokenA,
|
tokenA: state.tokenA,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const option: any = {
|
||||||
tokenA: '',
|
tokenA: '',
|
||||||
channelId: '',
|
channelId: '',
|
||||||
uid: '',
|
uid: '',
|
||||||
|
screenShareId: '',
|
||||||
}
|
}
|
||||||
let rtcEngine: any = '';
|
let rtcEngine: any = '';
|
||||||
|
|
||||||
|
|
@ -221,7 +222,7 @@ const agora = {
|
||||||
allJoinChannelEx: async () => {
|
allJoinChannelEx: async () => {
|
||||||
await rtcEngine.joinChannelEx(
|
await rtcEngine.joinChannelEx(
|
||||||
option.tokenA,
|
option.tokenA,
|
||||||
{ channelId: option.channelId + 'a', localUid: Number(option.uid) },
|
{ channelId: option.channelId + 'a', localUid: Number('1' + option.screenShareId) },
|
||||||
{
|
{
|
||||||
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
|
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
|
||||||
autoSubscribeVideo: false,//设置是否自动订阅所有视频流
|
autoSubscribeVideo: false,//设置是否自动订阅所有视频流
|
||||||
|
|
@ -269,6 +270,7 @@ const agora = {
|
||||||
option.tokenA = data.tokenA;
|
option.tokenA = data.tokenA;
|
||||||
option.channelId = data.channelId;
|
option.channelId = data.channelId;
|
||||||
option.uid = Number(data.uid);
|
option.uid = Number(data.uid);
|
||||||
|
option.screenShareId = data.screenShareId;
|
||||||
await agora.joinChannel()
|
await agora.joinChannel()
|
||||||
if (data.tokenA) {
|
if (data.tokenA) {
|
||||||
await agora.allJoinChannelEx()
|
await agora.allJoinChannelEx()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue