Skip to content

Commit 0e982fa

Browse files
fixed meeting bug
1 parent 019cc17 commit 0e982fa

File tree

4 files changed

+14
-339
lines changed

4 files changed

+14
-339
lines changed

client/packages/lowcoder-comps/src/comps/agoraMeetingComp/controlButton.tsx

Lines changed: 0 additions & 332 deletions
This file was deleted.

client/packages/lowcoder-comps/src/comps/agoraMeetingComp/meetingControllerComp.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,9 @@ const publishVideo = async (
178178
rtmToken: string,
179179
rtcToken: string
180180
) => {
181-
// initializing the Agora Meeting Client
182181
await turnOnCamera(true);
183182
await client.join(appId, channel, rtcToken, userId);
184183
await client.publish(videoTrack);
185-
// initializing the Agora RTM Client
186184
await rtmInit(appId, userId, rtmToken, channel);
187185
};
188186

@@ -276,13 +274,22 @@ let MTComp = (function () {
276274

277275
useEffect(() => {
278276
if (userJoined) {
277+
console.log("userJoined ", userJoined);
278+
279279
let prevUsers: any[] = props.participants as [];
280+
console.log("prevUsers ", prevUsers);
280281
let userData = {
281282
user: userJoined.uid,
282283
audiostatus: userJoined.hasAudio,
283284
streamingVideo: true,
284285
};
286+
console.log("userData ", userData);
285287
setUserIds((userIds: any) => [...userIds, userData]);
288+
console.log("userIds ", userIds);
289+
console.log(
290+
"removeDuplicates ",
291+
removeDuplicates(getData([...prevUsers, userData]).data, "user")
292+
);
286293
dispatch(
287294
changeChildAction(
288295
"participants",
@@ -371,6 +378,8 @@ let MTComp = (function () {
371378
props.localUser.onChange(localObject);
372379
}, [props.sharing.value]);
373380

381+
console.log("participants ", props.participants);
382+
374383
useEffect(() => {
375384
let prevUsers: [] = props.participants as [];
376385
const updatedItems = prevUsers.map((userInfo: any) => {
@@ -705,7 +714,7 @@ MTComp = withMethodExposing(MTComp, [
705714
},
706715
execute: async (comp: any, values: any) => {
707716
console.log("startMeeting ", {
708-
user: userId + "",
717+
// user: userId + "",
709718
audiostatus: false,
710719
speaking: false,
711720
streamingVideo: true,

client/packages/lowcoder-comps/src/comps/agoraMeetingComp/videoMeetingStreamComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
RefControl,
1414
stringExposingStateControl,
1515
StringStateControl,
16-
UICompBuilder,
16+
UICompBuilder,
1717
CommonNameConfig,
1818
} from "lowcoder-sdk";
1919
import { ButtonStyleControl } from "./videobuttonCompConstants";

0 commit comments

Comments
 (0)