@@ -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 ,
0 commit comments