Skip to content

Commit d113fc2

Browse files
fix: remove logs
1 parent e601b46 commit d113fc2

File tree

2 files changed

+4
-46
lines changed

2 files changed

+4
-46
lines changed

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -210,25 +210,11 @@ const publishVideo = async (
210210
};
211211

212212
const sendMessageRtm = (message: any) => {
213-
rtmChannelResponse
214-
.sendMessage({ text: JSON.stringify(message) })
215-
.then(() => {
216-
console.log("message sent " + JSON.stringify(message));
217-
})
218-
.catch((e: any) => {
219-
console.log("error", e);
220-
});
213+
rtmChannelResponse.sendMessage({ text: JSON.stringify(message) });
221214
};
222215

223216
const sendPeerMessageRtm = (message: any, toId: string) => {
224-
rtmClient
225-
.sendMessageToPeer({ text: JSON.stringify(message) }, toId)
226-
.then(() => {
227-
console.log("message sent " + JSON.stringify(message));
228-
})
229-
.catch((e: any) => {
230-
console.log("error", e);
231-
});
217+
rtmClient.sendMessageToPeer({ text: JSON.stringify(message) }, toId);
232218
};
233219

234220
const rtmInit = async (appId: any, uid: any, channel: any) => {
@@ -238,26 +224,9 @@ const rtmInit = async (appId: any, uid: any, channel: any) => {
238224
};
239225
await rtmClient.login(options);
240226

241-
rtmClient.on("ConnectionStateChanged", function (state, reason) {
242-
console.log("State changed To: " + state + " Reason: " + reason);
243-
});
244-
245227
rtmChannelResponse = rtmClient.createChannel(channel);
246228

247-
await rtmChannelResponse.join().then(async () => {
248-
console.log(
249-
"You have successfully joined channel " + rtmChannelResponse.channelId
250-
);
251-
});
252-
253-
// Display channel member stats
254-
rtmChannelResponse.on("MemberJoined", function (memberId) {
255-
console.log(memberId + " joined the channel");
256-
});
257-
// Display channel member stats
258-
rtmChannelResponse.on("MemberLeft", function (memberId) {
259-
console.log(memberId + " left the channel");
260-
});
229+
await rtmChannelResponse.join();
261230
};
262231

263232
export const meetingControllerChildren = {
@@ -322,7 +291,6 @@ let MTComp = (function () {
322291

323292
useEffect(() => {
324293
if (updateVolume.userid) {
325-
console.log("userIds ", props.participants);
326294
let prevUsers: [] = props.participants as [];
327295

328296
const updatedItems = prevUsers.map((userInfo: any) => {
@@ -334,8 +302,6 @@ let MTComp = (function () {
334302
}
335303
return userInfo;
336304
});
337-
console.log("updatedItems", updatedItems);
338-
339305
dispatch(
340306
changeChildAction("participants", getData(updatedItems).data, false)
341307
);
@@ -365,7 +331,6 @@ let MTComp = (function () {
365331
if (newUsers.length == 0) return;
366332
newUsers = props.localUser.value;
367333
let updatedUsers = [...userIds, newUsers];
368-
console.log("updatedUsers", updatedUsers);
369334
dispatch(
370335
changeChildAction("participants", getData(updatedUsers).data, false)
371336
);
@@ -375,13 +340,9 @@ let MTComp = (function () {
375340
useEffect(() => {
376341
if (rtmChannelResponse) {
377342
rtmClient.on("MessageFromPeer", function (message, peerId) {
378-
console.log(
379-
"Message from: " + peerId + " Message: " + message.text
380-
);
381343
setRtmMessages(message.text);
382344
});
383345
rtmChannelResponse.on("ChannelMessage", function (message, memberId) {
384-
console.log("Message received from: " + memberId, message.text);
385346
setRtmMessages(message.text);
386347
dispatch(
387348
changeChildAction("messages", getData(rtmMessages).data, false)

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingStreamComp.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ let VideoCompBuilder = (function (props) {
195195
client.on(
196196
"user-published",
197197
async (user: IAgoraRTCRemoteUser, mediaType: "video" | "audio") => {
198-
if (mediaType === "video") {
199-
console.log("user-published",user.uid);
200-
198+
if (mediaType === "video") {
201199
const remoteTrack = await client.subscribe(user, mediaType);
202200
let userId = user.uid + "";
203201
if (
@@ -241,7 +239,6 @@ let VideoCompBuilder = (function (props) {
241239
}
242240
}
243241
if (mediaType === "video") {
244-
console.log("user-unpublished video", user.uid);
245242
if (videoRef.current && videoRef.current?.id == user.uid + "") {
246243
videoRef.current.srcObject = null;
247244
}

0 commit comments

Comments
 (0)