This commit is contained in:
parent
a3095d2572
commit
960096812a
|
|
@ -124,7 +124,6 @@ const Meeting: React.FC = () => {
|
||||||
agora.init()
|
agora.init()
|
||||||
agora.registerEventHandler({
|
agora.registerEventHandler({
|
||||||
onJoinChannelSuccess: async (info: any, _elapsed: any) => {
|
onJoinChannelSuccess: async (info: any, _elapsed: any) => {
|
||||||
console.log(info.localUid, '加入');
|
|
||||||
await onInvoke('joinChannel', {
|
await onInvoke('joinChannel', {
|
||||||
roomNum: info.channelId,
|
roomNum: info.channelId,
|
||||||
enableMicr: true,
|
enableMicr: true,
|
||||||
|
|
@ -140,7 +139,6 @@ const Meeting: React.FC = () => {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
onUserJoined: async (info: any, remoteUid: any, _elapsed: any) => {
|
onUserJoined: async (info: any, remoteUid: any, _elapsed: any) => {
|
||||||
console.log(remoteUid, '远端');
|
|
||||||
await getRoomUser()
|
await getRoomUser()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
agora.setupRemoteVideoJoin({
|
agora.setupRemoteVideoJoin({
|
||||||
|
|
@ -151,7 +149,6 @@ const Meeting: React.FC = () => {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
onUserOffline: async (info: any, remoteUid: any, reason: any) => {
|
onUserOffline: async (info: any, remoteUid: any, reason: any) => {
|
||||||
console.log(remoteUid, "离开");
|
|
||||||
agora.setupRemoteVideo({
|
agora.setupRemoteVideo({
|
||||||
account: Number(remoteUid),
|
account: Number(remoteUid),
|
||||||
view: document.getElementById(`video-${remoteUid}`) as HTMLElement,
|
view: document.getElementById(`video-${remoteUid}`) as HTMLElement,
|
||||||
|
|
@ -159,7 +156,7 @@ const Meeting: React.FC = () => {
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getRoomUser()
|
getRoomUser()
|
||||||
}, 3000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
agora.setCameraCapture(VideoSourceType.VideoSourceCameraPrimary)
|
agora.setCameraCapture(VideoSourceType.VideoSourceCameraPrimary)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue