This commit is contained in:
parent
8ccf1a02d8
commit
49a01c1af8
|
|
@ -124,6 +124,7 @@ const Meeting: React.FC = () => {
|
|||
agora.init()
|
||||
agora.registerEventHandler({
|
||||
onJoinChannelSuccess: async (info: any, _elapsed: any) => {
|
||||
console.log(info.localUid, '加入');
|
||||
await onInvoke('joinChannel', {
|
||||
roomNum: info.channelId,
|
||||
enableMicr: true,
|
||||
|
|
@ -139,6 +140,7 @@ const Meeting: React.FC = () => {
|
|||
}, 1000);
|
||||
},
|
||||
onUserJoined: async (info: any, remoteUid: any, _elapsed: any) => {
|
||||
console.log(remoteUid, '远端');
|
||||
await getRoomUser()
|
||||
setTimeout(() => {
|
||||
agora.setupRemoteVideoJoin({
|
||||
|
|
@ -149,6 +151,7 @@ const Meeting: React.FC = () => {
|
|||
}, 1000);
|
||||
},
|
||||
onUserOffline: async (info: any, remoteUid: any, reason: any) => {
|
||||
console.log(remoteUid, "离开");
|
||||
await onInvoke('levelChannel', {
|
||||
roomNum: info.channelId
|
||||
})
|
||||
|
|
@ -159,7 +162,7 @@ const Meeting: React.FC = () => {
|
|||
})
|
||||
setTimeout(() => {
|
||||
getRoomUser()
|
||||
}, 2000);
|
||||
}, 3000);
|
||||
}
|
||||
})
|
||||
agora.setCameraCapture(VideoSourceType.VideoSourceCameraPrimary)
|
||||
|
|
|
|||
Loading…
Reference in New Issue