@@ -86,6 +86,9 @@ export class AvEngineKitProxy {
8686 let content = message . content ;
8787
8888 let msg = wfc . getMessageByUid ( messageUid ) ;
89+ if ( ! msg ) {
90+ return
91+ }
8992 let orgContent = msg . messageContent ;
9093 orgContent . connectTime = content . connectTime ? content . connectTime : orgContent . connectTime ;
9194 orgContent . endTime = content . endTime ? content . endTime : orgContent . endTime ;
@@ -169,6 +172,10 @@ export class AvEngineKitProxy {
169172 console . log ( 'not enable multi call ' ) ;
170173 return ;
171174 }
175+ if ( ! isElectron ( ) && msg . messageContent === MessageContentType . VOIP_REMOTE_CONTROL_REQUEST ) {
176+ console . log ( 'only pc support remote control' ) ;
177+ return ;
178+ }
172179 let now = ( new Date ( ) ) . valueOf ( ) ;
173180 let delta = wfc . getServerDeltaTime ( ) ;
174181 if ( now - ( numberValue ( msg . timestamp ) - delta ) >= 90 * 1000 ) {
@@ -193,7 +200,7 @@ export class AvEngineKitProxy {
193200 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 1 ) ;
194201 }
195202 }
196- if ( ! this . isSupportVoip || ! this . hasMicrophone || ! this . hasSpeaker ) {
203+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
197204 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
198205 return ;
199206 }
@@ -241,6 +248,9 @@ export class AvEngineKitProxy {
241248 }
242249 if ( ! this . callWin ) {
243250 if ( this . conversation ) {
251+ msg . participantUserInfos = participantUserInfos ;
252+ msg . selfUserInfo = selfUserInfo ;
253+ msg . timestamp = longValue ( numberValue ( msg . timestamp ) - delta )
244254 this . showCallUI ( msg . conversation , false , {
245255 event : 'message' ,
246256 args : msg
@@ -369,7 +379,7 @@ export class AvEngineKitProxy {
369379 return ;
370380 }
371381 console . log ( `startCall speaker、microphone、webcam检测结果分别为:${ this . hasSpeaker } , ${ this . hasMicrophone } , ${ this . hasWebcam } ,如果不全为true,请检查硬件设备是否正常,否则通话可能存在异常` )
372- if ( ! this . isSupportVoip || ! this . hasSpeaker || ! this . hasMicrophone ) {
382+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
373383 console . log ( 'not support voip' , this . isSupportVoip , this . hasSpeaker , this . hasMicrophone , this . hasWebcam ) ;
374384 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
375385 return ;
@@ -428,7 +438,7 @@ export class AvEngineKitProxy {
428438 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 1 ) ;
429439 return ;
430440 }
431- if ( ! this . isSupportVoip || ! this . hasSpeaker || ! this . hasMicrophone ) {
441+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
432442 console . log ( 'not support voip' , this . isSupportVoip , this . hasSpeaker ) ;
433443 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
434444 return ;
@@ -488,7 +498,7 @@ export class AvEngineKitProxy {
488498 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 1 ) ;
489499 return ;
490500 }
491- if ( ! this . isSupportVoip || ! this . hasSpeaker || ! this . hasMicrophone ) {
501+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
492502 console . log ( 'not support voip' , this . isSupportVoip , this . hasSpeaker , this . hasMicrophone ) ;
493503 this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
494504 return ;
0 commit comments