@wazo/sdk 0.38.5 → 0.38.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/wazo-sdk.js +2 -2
- package/esm/__tests__/api-client.test.js +6 -0
- package/esm/__tests__/web-rtc-client.test.js +58 -2
- package/esm/api/calld.js +6 -0
- package/esm/api/ctid-ng.js +6 -0
- package/esm/api-client.js +6 -0
- package/esm/checker/Checker.js +8 -2
- package/esm/checker/checks/aor.js +6 -0
- package/esm/checker/checks/api.js +6 -0
- package/esm/checker/checks/index.js +8 -2
- package/esm/checker/checks/webrtc-transport.js +8 -2
- package/esm/checker/checks/webrtc.js +8 -2
- package/esm/domain/AdHocAPIConference.js +6 -0
- package/esm/domain/Call.js +6 -0
- package/esm/domain/CallSession.js +1 -1
- package/esm/domain/Features.js +6 -0
- package/esm/domain/Phone/CTIPhone.js +7 -1
- package/esm/domain/Phone/WebRTCPhone.js +3 -3
- package/esm/domain/__tests__/Call.test.js +6 -0
- package/esm/domain/__tests__/CallSession.test.js +1 -1
- package/esm/domain/__tests__/IndirectTransfer.test.js +1 -1
- package/esm/domain/__tests__/Room.test.js +1 -1
- package/esm/index.js +11 -5
- package/esm/service/CallApi.js +6 -0
- package/esm/service/getApiClient.js +6 -0
- package/esm/simple/Auth.js +11 -5
- package/esm/simple/Configuration.js +11 -5
- package/esm/simple/Directory.js +6 -0
- package/esm/simple/Phone.js +11 -5
- package/esm/simple/index.js +11 -5
- package/esm/simple/room/LocalParticipant.js +11 -5
- package/esm/simple/room/Participant.js +11 -5
- package/esm/simple/room/RemoteParticipant.js +11 -5
- package/esm/simple/room/Room.js +11 -5
- package/esm/simple/room/SipRoom.js +11 -5
- package/esm/simple/room/Stream.js +11 -5
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +11 -5
- package/esm/simple/utils.js +11 -5
- package/esm/web-rtc-client.js +8 -2
- package/lib/__tests__/api-client.test.js +6 -0
- package/lib/__tests__/web-rtc-client.test.js +58 -2
- package/lib/api/calld.js +6 -0
- package/lib/api/ctid-ng.js +6 -0
- package/lib/api-client.js +6 -0
- package/lib/checker/Checker.js +8 -2
- package/lib/checker/checks/aor.js +6 -0
- package/lib/checker/checks/api.js +6 -0
- package/lib/checker/checks/index.js +8 -2
- package/lib/checker/checks/webrtc-transport.js +8 -2
- package/lib/checker/checks/webrtc.js +8 -2
- package/lib/domain/AdHocAPIConference.js +6 -0
- package/lib/domain/Call.js +6 -0
- package/lib/domain/CallSession.js +1 -1
- package/lib/domain/Features.js +6 -0
- package/lib/domain/Phone/CTIPhone.js +7 -1
- package/lib/domain/Phone/WebRTCPhone.js +3 -3
- package/lib/domain/__tests__/Call.test.js +6 -0
- package/lib/domain/__tests__/CallSession.test.js +1 -1
- package/lib/domain/__tests__/IndirectTransfer.test.js +1 -1
- package/lib/domain/__tests__/Room.test.js +1 -1
- package/lib/index.js +11 -5
- package/lib/service/CallApi.js +6 -0
- package/lib/service/getApiClient.js +6 -0
- package/lib/simple/Auth.js +11 -5
- package/lib/simple/Configuration.js +11 -5
- package/lib/simple/Directory.js +6 -0
- package/lib/simple/Phone.js +11 -5
- package/lib/simple/index.js +11 -5
- package/lib/simple/room/LocalParticipant.js +11 -5
- package/lib/simple/room/Participant.js +11 -5
- package/lib/simple/room/RemoteParticipant.js +11 -5
- package/lib/simple/room/Room.js +11 -5
- package/lib/simple/room/SipRoom.js +11 -5
- package/lib/simple/room/Stream.js +11 -5
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +11 -5
- package/lib/simple/utils.js +11 -5
- package/lib/web-rtc-client.js +8 -2
- package/package.json +1 -1
- package/src/__tests__/web-rtc-client.test.js +50 -0
- package/src/domain/Call.js +6 -0
- package/src/domain/CallSession.js +1 -1
- package/src/domain/Phone/WebRTCPhone.js +2 -2
- package/src/web-rtc-client.js +2 -2
package/esm/simple/Phone.js
CHANGED
|
@@ -49,6 +49,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
|
|
52
53
|
|
|
53
54
|
|
|
54
55
|
|
|
@@ -59,6 +60,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
|
|
63
|
+
|
|
62
64
|
|
|
63
65
|
|
|
64
66
|
|
|
@@ -87,6 +89,7 @@ class Call {
|
|
|
87
89
|
|
|
88
90
|
|
|
89
91
|
|
|
92
|
+
|
|
90
93
|
|
|
91
94
|
|
|
92
95
|
|
|
@@ -111,6 +114,7 @@ class Call {
|
|
|
111
114
|
calleeNumber: plain.peer_caller_id_number,
|
|
112
115
|
dialedExtension: plain.dialed_extension,
|
|
113
116
|
isCaller: plain.is_caller,
|
|
117
|
+
isVideo: plain.is_video,
|
|
114
118
|
muted: plain.muted,
|
|
115
119
|
onHold: plain.on_hold,
|
|
116
120
|
status: plain.status,
|
|
@@ -134,6 +138,7 @@ class Call {
|
|
|
134
138
|
calleeNumber,
|
|
135
139
|
dialedExtension,
|
|
136
140
|
isCaller,
|
|
141
|
+
isVideo,
|
|
137
142
|
lineId,
|
|
138
143
|
muted,
|
|
139
144
|
onHold,
|
|
@@ -157,6 +162,7 @@ class Call {
|
|
|
157
162
|
this.startingTime = startingTime;
|
|
158
163
|
this.talkingToIds = talkingToIds || [];
|
|
159
164
|
this.recording = recording;
|
|
165
|
+
this.isVideo = !!isVideo;
|
|
160
166
|
|
|
161
167
|
// Useful to compare instead of instanceof with minified code
|
|
162
168
|
this.type = 'Call';
|
|
@@ -630,7 +636,7 @@ class CallSession {
|
|
|
630
636
|
ringing: call.isRinging(),
|
|
631
637
|
answered: call.isUp(),
|
|
632
638
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
633
|
-
cameraEnabled:
|
|
639
|
+
cameraEnabled: call.isVideo,
|
|
634
640
|
dialedExtension: call.dialedExtension,
|
|
635
641
|
call,
|
|
636
642
|
conference: false, // @FIXME?
|
|
@@ -7486,11 +7492,11 @@ class WebRTCClient extends Emitter {
|
|
|
7486
7492
|
});
|
|
7487
7493
|
}
|
|
7488
7494
|
|
|
7489
|
-
changeAudioInputDevice(id , session ) {
|
|
7495
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7490
7496
|
const currentId = this.getAudioDeviceId();
|
|
7491
7497
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7492
7498
|
|
|
7493
|
-
if (id === currentId) {
|
|
7499
|
+
if (!force && id === currentId) {
|
|
7494
7500
|
return null;
|
|
7495
7501
|
}
|
|
7496
7502
|
|
|
@@ -9286,10 +9292,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9286
9292
|
this.audioRingVolume = volume;
|
|
9287
9293
|
}
|
|
9288
9294
|
|
|
9289
|
-
changeAudioInputDevice(id ) {
|
|
9295
|
+
changeAudioInputDevice(id , force ) {
|
|
9290
9296
|
logger$8.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9291
9297
|
|
|
9292
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9298
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9293
9299
|
}
|
|
9294
9300
|
|
|
9295
9301
|
changeVideoInputDevice(id ) {
|
package/esm/simple/index.js
CHANGED
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|
|
@@ -3097,6 +3097,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3097
3097
|
|
|
3098
3098
|
|
|
3099
3099
|
|
|
3100
|
+
|
|
3100
3101
|
|
|
3101
3102
|
|
|
3102
3103
|
|
|
@@ -3107,6 +3108,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3107
3108
|
|
|
3108
3109
|
|
|
3109
3110
|
|
|
3111
|
+
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3112
3114
|
|
|
@@ -3135,6 +3137,7 @@ class Call {
|
|
|
3135
3137
|
|
|
3136
3138
|
|
|
3137
3139
|
|
|
3140
|
+
|
|
3138
3141
|
|
|
3139
3142
|
|
|
3140
3143
|
|
|
@@ -3159,6 +3162,7 @@ class Call {
|
|
|
3159
3162
|
calleeNumber: plain.peer_caller_id_number,
|
|
3160
3163
|
dialedExtension: plain.dialed_extension,
|
|
3161
3164
|
isCaller: plain.is_caller,
|
|
3165
|
+
isVideo: plain.is_video,
|
|
3162
3166
|
muted: plain.muted,
|
|
3163
3167
|
onHold: plain.on_hold,
|
|
3164
3168
|
status: plain.status,
|
|
@@ -3182,6 +3186,7 @@ class Call {
|
|
|
3182
3186
|
calleeNumber,
|
|
3183
3187
|
dialedExtension,
|
|
3184
3188
|
isCaller,
|
|
3189
|
+
isVideo,
|
|
3185
3190
|
lineId,
|
|
3186
3191
|
muted,
|
|
3187
3192
|
onHold,
|
|
@@ -3205,6 +3210,7 @@ class Call {
|
|
|
3205
3210
|
this.startingTime = startingTime;
|
|
3206
3211
|
this.talkingToIds = talkingToIds || [];
|
|
3207
3212
|
this.recording = recording;
|
|
3213
|
+
this.isVideo = !!isVideo;
|
|
3208
3214
|
|
|
3209
3215
|
// Useful to compare instead of instanceof with minified code
|
|
3210
3216
|
this.type = 'Call';
|
|
@@ -3678,7 +3684,7 @@ class CallSession {
|
|
|
3678
3684
|
ringing: call.isRinging(),
|
|
3679
3685
|
answered: call.isUp(),
|
|
3680
3686
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3681
|
-
cameraEnabled:
|
|
3687
|
+
cameraEnabled: call.isVideo,
|
|
3682
3688
|
dialedExtension: call.dialedExtension,
|
|
3683
3689
|
call,
|
|
3684
3690
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|
|
@@ -3097,6 +3097,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3097
3097
|
|
|
3098
3098
|
|
|
3099
3099
|
|
|
3100
|
+
|
|
3100
3101
|
|
|
3101
3102
|
|
|
3102
3103
|
|
|
@@ -3107,6 +3108,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3107
3108
|
|
|
3108
3109
|
|
|
3109
3110
|
|
|
3111
|
+
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3112
3114
|
|
|
@@ -3135,6 +3137,7 @@ class Call {
|
|
|
3135
3137
|
|
|
3136
3138
|
|
|
3137
3139
|
|
|
3140
|
+
|
|
3138
3141
|
|
|
3139
3142
|
|
|
3140
3143
|
|
|
@@ -3159,6 +3162,7 @@ class Call {
|
|
|
3159
3162
|
calleeNumber: plain.peer_caller_id_number,
|
|
3160
3163
|
dialedExtension: plain.dialed_extension,
|
|
3161
3164
|
isCaller: plain.is_caller,
|
|
3165
|
+
isVideo: plain.is_video,
|
|
3162
3166
|
muted: plain.muted,
|
|
3163
3167
|
onHold: plain.on_hold,
|
|
3164
3168
|
status: plain.status,
|
|
@@ -3182,6 +3186,7 @@ class Call {
|
|
|
3182
3186
|
calleeNumber,
|
|
3183
3187
|
dialedExtension,
|
|
3184
3188
|
isCaller,
|
|
3189
|
+
isVideo,
|
|
3185
3190
|
lineId,
|
|
3186
3191
|
muted,
|
|
3187
3192
|
onHold,
|
|
@@ -3205,6 +3210,7 @@ class Call {
|
|
|
3205
3210
|
this.startingTime = startingTime;
|
|
3206
3211
|
this.talkingToIds = talkingToIds || [];
|
|
3207
3212
|
this.recording = recording;
|
|
3213
|
+
this.isVideo = !!isVideo;
|
|
3208
3214
|
|
|
3209
3215
|
// Useful to compare instead of instanceof with minified code
|
|
3210
3216
|
this.type = 'Call';
|
|
@@ -3678,7 +3684,7 @@ class CallSession {
|
|
|
3678
3684
|
ringing: call.isRinging(),
|
|
3679
3685
|
answered: call.isUp(),
|
|
3680
3686
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3681
|
-
cameraEnabled:
|
|
3687
|
+
cameraEnabled: call.isVideo,
|
|
3682
3688
|
dialedExtension: call.dialedExtension,
|
|
3683
3689
|
call,
|
|
3684
3690
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|
package/esm/simple/room/Room.js
CHANGED
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7787,11 +7793,11 @@ class WebRTCClient extends Emitter {
|
|
|
7787
7793
|
});
|
|
7788
7794
|
}
|
|
7789
7795
|
|
|
7790
|
-
changeAudioInputDevice(id , session ) {
|
|
7796
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7791
7797
|
const currentId = this.getAudioDeviceId();
|
|
7792
7798
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7793
7799
|
|
|
7794
|
-
if (id === currentId) {
|
|
7800
|
+
if (!force && id === currentId) {
|
|
7795
7801
|
return null;
|
|
7796
7802
|
}
|
|
7797
7803
|
|
|
@@ -9587,10 +9593,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9587
9593
|
this.audioRingVolume = volume;
|
|
9588
9594
|
}
|
|
9589
9595
|
|
|
9590
|
-
changeAudioInputDevice(id ) {
|
|
9596
|
+
changeAudioInputDevice(id , force ) {
|
|
9591
9597
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9592
9598
|
|
|
9593
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9599
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9594
9600
|
}
|
|
9595
9601
|
|
|
9596
9602
|
changeVideoInputDevice(id ) {
|