This commit is contained in:
parent
aa17766689
commit
9015bba961
|
|
@ -161,6 +161,14 @@ const Meeting: React.FC = () => {
|
|||
})
|
||||
view.setAttribute('load', 'true')
|
||||
}
|
||||
if (String(remoteUid).length === 9) {
|
||||
console.log(String(remoteUid));
|
||||
await agora.setupRemoteVideoJoin({
|
||||
uid: Number(remoteUid),
|
||||
view: document.getElementById(`look-video`) as HTMLElement,
|
||||
channelId: info.channelId,
|
||||
})
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
onUserOffline: async (info: any, remoteUid: any, _reason: any) => {
|
||||
|
|
@ -169,14 +177,6 @@ const Meeting: React.FC = () => {
|
|||
view: document.getElementById(`video-${remoteUid}`) as HTMLElement,
|
||||
channelId: info.channelId,
|
||||
})
|
||||
if (String(info.localUid).length === 9) {
|
||||
await agora.setupRemoteVideo({
|
||||
uid: Number(remoteUid),
|
||||
view: document.getElementById(`look-video`) as HTMLElement,
|
||||
channelId: info.channelId,
|
||||
sourceType: VideoSourceType.VideoSourceScreen,
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
getRoomUser()
|
||||
}, 1000);
|
||||
|
|
|
|||
|
|
@ -179,18 +179,6 @@ const agora = {
|
|||
// await rtcEngine.stopCameraCapture(option.sourceType)
|
||||
const user = JSON.parse(storage.getItem('user') as string)
|
||||
rtcEngine.destroyRendererByConfig(VideoSourceType.VideoSourceScreen, option.channelId, Number(user.screenShareId))
|
||||
rtcEngine.joinChannelEx(
|
||||
option.token,
|
||||
{ channelId: option.channelId, localUid: Number(user.screenShareId) },
|
||||
{
|
||||
autoSubscribeAudio: false,
|
||||
autoSubscribeVideo: false,
|
||||
publishMicrophoneTrack: false,
|
||||
publishCameraTrack: false,
|
||||
clientRoleType: ClientRoleType.ClientRoleBroadcaster,
|
||||
publishScreenTrack: true,
|
||||
}
|
||||
);
|
||||
agora.stopScreenCapture();
|
||||
if (
|
||||
targetSource.type ===
|
||||
|
|
@ -216,6 +204,18 @@ const agora = {
|
|||
}
|
||||
);
|
||||
}
|
||||
rtcEngine.joinChannelEx(
|
||||
option.token,
|
||||
{ channelId: option.channelId, localUid: Number(user.screenShareId) },
|
||||
{
|
||||
autoSubscribeAudio: false,
|
||||
autoSubscribeVideo: false,
|
||||
publishMicrophoneTrack: false,
|
||||
publishCameraTrack: false,
|
||||
clientRoleType: ClientRoleType.ClientRoleBroadcaster,
|
||||
publishScreenTrack: true,
|
||||
}
|
||||
);
|
||||
},
|
||||
// 停止录制音视频
|
||||
stopRecording: () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue