@@ -86,6 +86,9 @@ export class AvEngineKitProxy {
86
86
let content = message . content ;
87
87
88
88
let msg = wfc . getMessageByUid ( messageUid ) ;
89
+ if ( ! msg ) {
90
+ return
91
+ }
89
92
let orgContent = msg . messageContent ;
90
93
orgContent . connectTime = content . connectTime ? content . connectTime : orgContent . connectTime ;
91
94
orgContent . endTime = content . endTime ? content . endTime : orgContent . endTime ;
@@ -169,6 +172,10 @@ export class AvEngineKitProxy {
169
172
console . log ( 'not enable multi call ' ) ;
170
173
return ;
171
174
}
175
+ if ( ! isElectron ( ) && msg . messageContent === MessageContentType . VOIP_REMOTE_CONTROL_REQUEST ) {
176
+ console . log ( 'only pc support remote control' ) ;
177
+ return ;
178
+ }
172
179
let now = ( new Date ( ) ) . valueOf ( ) ;
173
180
let delta = wfc . getServerDeltaTime ( ) ;
174
181
if ( now - ( numberValue ( msg . timestamp ) - delta ) >= 90 * 1000 ) {
@@ -193,7 +200,7 @@ export class AvEngineKitProxy {
193
200
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 1 ) ;
194
201
}
195
202
}
196
- if ( ! this . isSupportVoip || ! this . hasMicrophone || ! this . hasSpeaker ) {
203
+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
197
204
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
198
205
return ;
199
206
}
@@ -241,6 +248,9 @@ export class AvEngineKitProxy {
241
248
}
242
249
if ( ! this . callWin ) {
243
250
if ( this . conversation ) {
251
+ msg . participantUserInfos = participantUserInfos ;
252
+ msg . selfUserInfo = selfUserInfo ;
253
+ msg . timestamp = longValue ( numberValue ( msg . timestamp ) - delta )
244
254
this . showCallUI ( msg . conversation , false , {
245
255
event : 'message' ,
246
256
args : msg
@@ -369,7 +379,7 @@ export class AvEngineKitProxy {
369
379
return ;
370
380
}
371
381
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 ) ) ) {
373
383
console . log ( 'not support voip' , this . isSupportVoip , this . hasSpeaker , this . hasMicrophone , this . hasWebcam ) ;
374
384
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
375
385
return ;
@@ -428,7 +438,7 @@ export class AvEngineKitProxy {
428
438
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 1 ) ;
429
439
return ;
430
440
}
431
- if ( ! this . isSupportVoip || ! this . hasSpeaker || ! this . hasMicrophone ) {
441
+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
432
442
console . log ( 'not support voip' , this . isSupportVoip , this . hasSpeaker ) ;
433
443
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
434
444
return ;
@@ -488,7 +498,7 @@ export class AvEngineKitProxy {
488
498
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 1 ) ;
489
499
return ;
490
500
}
491
- if ( ! this . isSupportVoip || ! this . hasSpeaker || ! this . hasMicrophone ) {
501
+ if ( ! this . isSupportVoip || ( ! WfcAVEngineKit . ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER && ( ! this . hasSpeaker || ! this . hasMicrophone ) ) ) {
492
502
console . log ( 'not support voip' , this . isSupportVoip , this . hasSpeaker , this . hasMicrophone ) ;
493
503
this . onVoipCallErrorCallback && this . onVoipCallErrorCallback ( - 2 ) ;
494
504
return ;
0 commit comments