@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/lib/simple/Auth.js
CHANGED
|
@@ -3083,6 +3083,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3083
3083
|
|
|
3084
3084
|
|
|
3085
3085
|
|
|
3086
|
+
|
|
3086
3087
|
|
|
3087
3088
|
|
|
3088
3089
|
|
|
@@ -3093,6 +3094,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3093
3094
|
|
|
3094
3095
|
|
|
3095
3096
|
|
|
3097
|
+
|
|
3096
3098
|
|
|
3097
3099
|
|
|
3098
3100
|
|
|
@@ -3121,6 +3123,7 @@ class Call {
|
|
|
3121
3123
|
|
|
3122
3124
|
|
|
3123
3125
|
|
|
3126
|
+
|
|
3124
3127
|
|
|
3125
3128
|
|
|
3126
3129
|
|
|
@@ -3145,6 +3148,7 @@ class Call {
|
|
|
3145
3148
|
calleeNumber: plain.peer_caller_id_number,
|
|
3146
3149
|
dialedExtension: plain.dialed_extension,
|
|
3147
3150
|
isCaller: plain.is_caller,
|
|
3151
|
+
isVideo: plain.is_video,
|
|
3148
3152
|
muted: plain.muted,
|
|
3149
3153
|
onHold: plain.on_hold,
|
|
3150
3154
|
status: plain.status,
|
|
@@ -3168,6 +3172,7 @@ class Call {
|
|
|
3168
3172
|
calleeNumber,
|
|
3169
3173
|
dialedExtension,
|
|
3170
3174
|
isCaller,
|
|
3175
|
+
isVideo,
|
|
3171
3176
|
lineId,
|
|
3172
3177
|
muted,
|
|
3173
3178
|
onHold,
|
|
@@ -3191,6 +3196,7 @@ class Call {
|
|
|
3191
3196
|
this.startingTime = startingTime;
|
|
3192
3197
|
this.talkingToIds = talkingToIds || [];
|
|
3193
3198
|
this.recording = recording;
|
|
3199
|
+
this.isVideo = !!isVideo;
|
|
3194
3200
|
|
|
3195
3201
|
// Useful to compare instead of instanceof with minified code
|
|
3196
3202
|
this.type = 'Call';
|
|
@@ -3664,7 +3670,7 @@ class CallSession {
|
|
|
3664
3670
|
ringing: call.isRinging(),
|
|
3665
3671
|
answered: call.isUp(),
|
|
3666
3672
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3667
|
-
cameraEnabled:
|
|
3673
|
+
cameraEnabled: call.isVideo,
|
|
3668
3674
|
dialedExtension: call.dialedExtension,
|
|
3669
3675
|
call,
|
|
3670
3676
|
conference: false, // @FIXME?
|
|
@@ -7498,11 +7504,11 @@ class WebRTCClient extends Emitter {
|
|
|
7498
7504
|
});
|
|
7499
7505
|
}
|
|
7500
7506
|
|
|
7501
|
-
changeAudioInputDevice(id , session ) {
|
|
7507
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7502
7508
|
const currentId = this.getAudioDeviceId();
|
|
7503
7509
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7504
7510
|
|
|
7505
|
-
if (id === currentId) {
|
|
7511
|
+
if (!force && id === currentId) {
|
|
7506
7512
|
return null;
|
|
7507
7513
|
}
|
|
7508
7514
|
|
|
@@ -9298,10 +9304,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9298
9304
|
this.audioRingVolume = volume;
|
|
9299
9305
|
}
|
|
9300
9306
|
|
|
9301
|
-
changeAudioInputDevice(id ) {
|
|
9307
|
+
changeAudioInputDevice(id , force ) {
|
|
9302
9308
|
logger$8.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9303
9309
|
|
|
9304
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9310
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9305
9311
|
}
|
|
9306
9312
|
|
|
9307
9313
|
changeVideoInputDevice(id ) {
|
|
@@ -3081,6 +3081,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3081
|
|
|
3082
3082
|
|
|
3083
3083
|
|
|
3084
|
+
|
|
3084
3085
|
|
|
3085
3086
|
|
|
3086
3087
|
|
|
@@ -3091,6 +3092,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3091
3092
|
|
|
3092
3093
|
|
|
3093
3094
|
|
|
3095
|
+
|
|
3094
3096
|
|
|
3095
3097
|
|
|
3096
3098
|
|
|
@@ -3119,6 +3121,7 @@ class Call {
|
|
|
3119
3121
|
|
|
3120
3122
|
|
|
3121
3123
|
|
|
3124
|
+
|
|
3122
3125
|
|
|
3123
3126
|
|
|
3124
3127
|
|
|
@@ -3143,6 +3146,7 @@ class Call {
|
|
|
3143
3146
|
calleeNumber: plain.peer_caller_id_number,
|
|
3144
3147
|
dialedExtension: plain.dialed_extension,
|
|
3145
3148
|
isCaller: plain.is_caller,
|
|
3149
|
+
isVideo: plain.is_video,
|
|
3146
3150
|
muted: plain.muted,
|
|
3147
3151
|
onHold: plain.on_hold,
|
|
3148
3152
|
status: plain.status,
|
|
@@ -3166,6 +3170,7 @@ class Call {
|
|
|
3166
3170
|
calleeNumber,
|
|
3167
3171
|
dialedExtension,
|
|
3168
3172
|
isCaller,
|
|
3173
|
+
isVideo,
|
|
3169
3174
|
lineId,
|
|
3170
3175
|
muted,
|
|
3171
3176
|
onHold,
|
|
@@ -3189,6 +3194,7 @@ class Call {
|
|
|
3189
3194
|
this.startingTime = startingTime;
|
|
3190
3195
|
this.talkingToIds = talkingToIds || [];
|
|
3191
3196
|
this.recording = recording;
|
|
3197
|
+
this.isVideo = !!isVideo;
|
|
3192
3198
|
|
|
3193
3199
|
// Useful to compare instead of instanceof with minified code
|
|
3194
3200
|
this.type = 'Call';
|
|
@@ -3662,7 +3668,7 @@ class CallSession {
|
|
|
3662
3668
|
ringing: call.isRinging(),
|
|
3663
3669
|
answered: call.isUp(),
|
|
3664
3670
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3665
|
-
cameraEnabled:
|
|
3671
|
+
cameraEnabled: call.isVideo,
|
|
3666
3672
|
dialedExtension: call.dialedExtension,
|
|
3667
3673
|
call,
|
|
3668
3674
|
conference: false, // @FIXME?
|
|
@@ -7496,11 +7502,11 @@ class WebRTCClient extends Emitter {
|
|
|
7496
7502
|
});
|
|
7497
7503
|
}
|
|
7498
7504
|
|
|
7499
|
-
changeAudioInputDevice(id , session ) {
|
|
7505
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7500
7506
|
const currentId = this.getAudioDeviceId();
|
|
7501
7507
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7502
7508
|
|
|
7503
|
-
if (id === currentId) {
|
|
7509
|
+
if (!force && id === currentId) {
|
|
7504
7510
|
return null;
|
|
7505
7511
|
}
|
|
7506
7512
|
|
|
@@ -9296,10 +9302,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9296
9302
|
this.audioRingVolume = volume;
|
|
9297
9303
|
}
|
|
9298
9304
|
|
|
9299
|
-
changeAudioInputDevice(id ) {
|
|
9305
|
+
changeAudioInputDevice(id , force ) {
|
|
9300
9306
|
logger$8.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9301
9307
|
|
|
9302
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9308
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9303
9309
|
}
|
|
9304
9310
|
|
|
9305
9311
|
changeVideoInputDevice(id ) {
|
package/lib/simple/Directory.js
CHANGED
|
@@ -3057,6 +3057,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3057
3057
|
|
|
3058
3058
|
|
|
3059
3059
|
|
|
3060
|
+
|
|
3060
3061
|
|
|
3061
3062
|
|
|
3062
3063
|
|
|
@@ -3067,6 +3068,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3067
3068
|
|
|
3068
3069
|
|
|
3069
3070
|
|
|
3071
|
+
|
|
3070
3072
|
|
|
3071
3073
|
|
|
3072
3074
|
|
|
@@ -3095,6 +3097,7 @@ class Call {
|
|
|
3095
3097
|
|
|
3096
3098
|
|
|
3097
3099
|
|
|
3100
|
+
|
|
3098
3101
|
|
|
3099
3102
|
|
|
3100
3103
|
|
|
@@ -3119,6 +3122,7 @@ class Call {
|
|
|
3119
3122
|
calleeNumber: plain.peer_caller_id_number,
|
|
3120
3123
|
dialedExtension: plain.dialed_extension,
|
|
3121
3124
|
isCaller: plain.is_caller,
|
|
3125
|
+
isVideo: plain.is_video,
|
|
3122
3126
|
muted: plain.muted,
|
|
3123
3127
|
onHold: plain.on_hold,
|
|
3124
3128
|
status: plain.status,
|
|
@@ -3142,6 +3146,7 @@ class Call {
|
|
|
3142
3146
|
calleeNumber,
|
|
3143
3147
|
dialedExtension,
|
|
3144
3148
|
isCaller,
|
|
3149
|
+
isVideo,
|
|
3145
3150
|
lineId,
|
|
3146
3151
|
muted,
|
|
3147
3152
|
onHold,
|
|
@@ -3165,6 +3170,7 @@ class Call {
|
|
|
3165
3170
|
this.startingTime = startingTime;
|
|
3166
3171
|
this.talkingToIds = talkingToIds || [];
|
|
3167
3172
|
this.recording = recording;
|
|
3173
|
+
this.isVideo = !!isVideo;
|
|
3168
3174
|
|
|
3169
3175
|
// Useful to compare instead of instanceof with minified code
|
|
3170
3176
|
this.type = 'Call';
|
package/lib/simple/Phone.js
CHANGED
|
@@ -59,6 +59,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
|
|
@@ -69,6 +70,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
69
70
|
|
|
70
71
|
|
|
71
72
|
|
|
73
|
+
|
|
72
74
|
|
|
73
75
|
|
|
74
76
|
|
|
@@ -97,6 +99,7 @@ class Call {
|
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
|
|
102
|
+
|
|
100
103
|
|
|
101
104
|
|
|
102
105
|
|
|
@@ -121,6 +124,7 @@ class Call {
|
|
|
121
124
|
calleeNumber: plain.peer_caller_id_number,
|
|
122
125
|
dialedExtension: plain.dialed_extension,
|
|
123
126
|
isCaller: plain.is_caller,
|
|
127
|
+
isVideo: plain.is_video,
|
|
124
128
|
muted: plain.muted,
|
|
125
129
|
onHold: plain.on_hold,
|
|
126
130
|
status: plain.status,
|
|
@@ -144,6 +148,7 @@ class Call {
|
|
|
144
148
|
calleeNumber,
|
|
145
149
|
dialedExtension,
|
|
146
150
|
isCaller,
|
|
151
|
+
isVideo,
|
|
147
152
|
lineId,
|
|
148
153
|
muted,
|
|
149
154
|
onHold,
|
|
@@ -167,6 +172,7 @@ class Call {
|
|
|
167
172
|
this.startingTime = startingTime;
|
|
168
173
|
this.talkingToIds = talkingToIds || [];
|
|
169
174
|
this.recording = recording;
|
|
175
|
+
this.isVideo = !!isVideo;
|
|
170
176
|
|
|
171
177
|
// Useful to compare instead of instanceof with minified code
|
|
172
178
|
this.type = 'Call';
|
|
@@ -640,7 +646,7 @@ class CallSession {
|
|
|
640
646
|
ringing: call.isRinging(),
|
|
641
647
|
answered: call.isUp(),
|
|
642
648
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
643
|
-
cameraEnabled:
|
|
649
|
+
cameraEnabled: call.isVideo,
|
|
644
650
|
dialedExtension: call.dialedExtension,
|
|
645
651
|
call,
|
|
646
652
|
conference: false, // @FIXME?
|
|
@@ -7496,11 +7502,11 @@ class WebRTCClient extends Emitter {
|
|
|
7496
7502
|
});
|
|
7497
7503
|
}
|
|
7498
7504
|
|
|
7499
|
-
changeAudioInputDevice(id , session ) {
|
|
7505
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7500
7506
|
const currentId = this.getAudioDeviceId();
|
|
7501
7507
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7502
7508
|
|
|
7503
|
-
if (id === currentId) {
|
|
7509
|
+
if (!force && id === currentId) {
|
|
7504
7510
|
return null;
|
|
7505
7511
|
}
|
|
7506
7512
|
|
|
@@ -9296,10 +9302,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9296
9302
|
this.audioRingVolume = volume;
|
|
9297
9303
|
}
|
|
9298
9304
|
|
|
9299
|
-
changeAudioInputDevice(id ) {
|
|
9305
|
+
changeAudioInputDevice(id , force ) {
|
|
9300
9306
|
logger$8.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9301
9307
|
|
|
9302
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9308
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9303
9309
|
}
|
|
9304
9310
|
|
|
9305
9311
|
changeVideoInputDevice(id ) {
|
package/lib/simple/index.js
CHANGED
|
@@ -3081,6 +3081,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3081
|
|
|
3082
3082
|
|
|
3083
3083
|
|
|
3084
|
+
|
|
3084
3085
|
|
|
3085
3086
|
|
|
3086
3087
|
|
|
@@ -3091,6 +3092,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3091
3092
|
|
|
3092
3093
|
|
|
3093
3094
|
|
|
3095
|
+
|
|
3094
3096
|
|
|
3095
3097
|
|
|
3096
3098
|
|
|
@@ -3119,6 +3121,7 @@ class Call {
|
|
|
3119
3121
|
|
|
3120
3122
|
|
|
3121
3123
|
|
|
3124
|
+
|
|
3122
3125
|
|
|
3123
3126
|
|
|
3124
3127
|
|
|
@@ -3143,6 +3146,7 @@ class Call {
|
|
|
3143
3146
|
calleeNumber: plain.peer_caller_id_number,
|
|
3144
3147
|
dialedExtension: plain.dialed_extension,
|
|
3145
3148
|
isCaller: plain.is_caller,
|
|
3149
|
+
isVideo: plain.is_video,
|
|
3146
3150
|
muted: plain.muted,
|
|
3147
3151
|
onHold: plain.on_hold,
|
|
3148
3152
|
status: plain.status,
|
|
@@ -3166,6 +3170,7 @@ class Call {
|
|
|
3166
3170
|
calleeNumber,
|
|
3167
3171
|
dialedExtension,
|
|
3168
3172
|
isCaller,
|
|
3173
|
+
isVideo,
|
|
3169
3174
|
lineId,
|
|
3170
3175
|
muted,
|
|
3171
3176
|
onHold,
|
|
@@ -3189,6 +3194,7 @@ class Call {
|
|
|
3189
3194
|
this.startingTime = startingTime;
|
|
3190
3195
|
this.talkingToIds = talkingToIds || [];
|
|
3191
3196
|
this.recording = recording;
|
|
3197
|
+
this.isVideo = !!isVideo;
|
|
3192
3198
|
|
|
3193
3199
|
// Useful to compare instead of instanceof with minified code
|
|
3194
3200
|
this.type = 'Call';
|
|
@@ -3662,7 +3668,7 @@ class CallSession {
|
|
|
3662
3668
|
ringing: call.isRinging(),
|
|
3663
3669
|
answered: call.isUp(),
|
|
3664
3670
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3665
|
-
cameraEnabled:
|
|
3671
|
+
cameraEnabled: call.isVideo,
|
|
3666
3672
|
dialedExtension: call.dialedExtension,
|
|
3667
3673
|
call,
|
|
3668
3674
|
conference: false, // @FIXME?
|
|
@@ -7797,11 +7803,11 @@ class WebRTCClient extends Emitter {
|
|
|
7797
7803
|
});
|
|
7798
7804
|
}
|
|
7799
7805
|
|
|
7800
|
-
changeAudioInputDevice(id , session ) {
|
|
7806
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7801
7807
|
const currentId = this.getAudioDeviceId();
|
|
7802
7808
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7803
7809
|
|
|
7804
|
-
if (id === currentId) {
|
|
7810
|
+
if (!force && id === currentId) {
|
|
7805
7811
|
return null;
|
|
7806
7812
|
}
|
|
7807
7813
|
|
|
@@ -9597,10 +9603,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9597
9603
|
this.audioRingVolume = volume;
|
|
9598
9604
|
}
|
|
9599
9605
|
|
|
9600
|
-
changeAudioInputDevice(id ) {
|
|
9606
|
+
changeAudioInputDevice(id , force ) {
|
|
9601
9607
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9602
9608
|
|
|
9603
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9609
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9604
9610
|
}
|
|
9605
9611
|
|
|
9606
9612
|
changeVideoInputDevice(id ) {
|
|
@@ -3107,6 +3107,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3107
3107
|
|
|
3108
3108
|
|
|
3109
3109
|
|
|
3110
|
+
|
|
3110
3111
|
|
|
3111
3112
|
|
|
3112
3113
|
|
|
@@ -3117,6 +3118,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3117
3118
|
|
|
3118
3119
|
|
|
3119
3120
|
|
|
3121
|
+
|
|
3120
3122
|
|
|
3121
3123
|
|
|
3122
3124
|
|
|
@@ -3145,6 +3147,7 @@ class Call {
|
|
|
3145
3147
|
|
|
3146
3148
|
|
|
3147
3149
|
|
|
3150
|
+
|
|
3148
3151
|
|
|
3149
3152
|
|
|
3150
3153
|
|
|
@@ -3169,6 +3172,7 @@ class Call {
|
|
|
3169
3172
|
calleeNumber: plain.peer_caller_id_number,
|
|
3170
3173
|
dialedExtension: plain.dialed_extension,
|
|
3171
3174
|
isCaller: plain.is_caller,
|
|
3175
|
+
isVideo: plain.is_video,
|
|
3172
3176
|
muted: plain.muted,
|
|
3173
3177
|
onHold: plain.on_hold,
|
|
3174
3178
|
status: plain.status,
|
|
@@ -3192,6 +3196,7 @@ class Call {
|
|
|
3192
3196
|
calleeNumber,
|
|
3193
3197
|
dialedExtension,
|
|
3194
3198
|
isCaller,
|
|
3199
|
+
isVideo,
|
|
3195
3200
|
lineId,
|
|
3196
3201
|
muted,
|
|
3197
3202
|
onHold,
|
|
@@ -3215,6 +3220,7 @@ class Call {
|
|
|
3215
3220
|
this.startingTime = startingTime;
|
|
3216
3221
|
this.talkingToIds = talkingToIds || [];
|
|
3217
3222
|
this.recording = recording;
|
|
3223
|
+
this.isVideo = !!isVideo;
|
|
3218
3224
|
|
|
3219
3225
|
// Useful to compare instead of instanceof with minified code
|
|
3220
3226
|
this.type = 'Call';
|
|
@@ -3688,7 +3694,7 @@ class CallSession {
|
|
|
3688
3694
|
ringing: call.isRinging(),
|
|
3689
3695
|
answered: call.isUp(),
|
|
3690
3696
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3691
|
-
cameraEnabled:
|
|
3697
|
+
cameraEnabled: call.isVideo,
|
|
3692
3698
|
dialedExtension: call.dialedExtension,
|
|
3693
3699
|
call,
|
|
3694
3700
|
conference: false, // @FIXME?
|
|
@@ -7797,11 +7803,11 @@ class WebRTCClient extends Emitter {
|
|
|
7797
7803
|
});
|
|
7798
7804
|
}
|
|
7799
7805
|
|
|
7800
|
-
changeAudioInputDevice(id , session ) {
|
|
7806
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7801
7807
|
const currentId = this.getAudioDeviceId();
|
|
7802
7808
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7803
7809
|
|
|
7804
|
-
if (id === currentId) {
|
|
7810
|
+
if (!force && id === currentId) {
|
|
7805
7811
|
return null;
|
|
7806
7812
|
}
|
|
7807
7813
|
|
|
@@ -9597,10 +9603,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9597
9603
|
this.audioRingVolume = volume;
|
|
9598
9604
|
}
|
|
9599
9605
|
|
|
9600
|
-
changeAudioInputDevice(id ) {
|
|
9606
|
+
changeAudioInputDevice(id , force ) {
|
|
9601
9607
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9602
9608
|
|
|
9603
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9609
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9604
9610
|
}
|
|
9605
9611
|
|
|
9606
9612
|
changeVideoInputDevice(id ) {
|
|
@@ -3107,6 +3107,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3107
3107
|
|
|
3108
3108
|
|
|
3109
3109
|
|
|
3110
|
+
|
|
3110
3111
|
|
|
3111
3112
|
|
|
3112
3113
|
|
|
@@ -3117,6 +3118,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3117
3118
|
|
|
3118
3119
|
|
|
3119
3120
|
|
|
3121
|
+
|
|
3120
3122
|
|
|
3121
3123
|
|
|
3122
3124
|
|
|
@@ -3145,6 +3147,7 @@ class Call {
|
|
|
3145
3147
|
|
|
3146
3148
|
|
|
3147
3149
|
|
|
3150
|
+
|
|
3148
3151
|
|
|
3149
3152
|
|
|
3150
3153
|
|
|
@@ -3169,6 +3172,7 @@ class Call {
|
|
|
3169
3172
|
calleeNumber: plain.peer_caller_id_number,
|
|
3170
3173
|
dialedExtension: plain.dialed_extension,
|
|
3171
3174
|
isCaller: plain.is_caller,
|
|
3175
|
+
isVideo: plain.is_video,
|
|
3172
3176
|
muted: plain.muted,
|
|
3173
3177
|
onHold: plain.on_hold,
|
|
3174
3178
|
status: plain.status,
|
|
@@ -3192,6 +3196,7 @@ class Call {
|
|
|
3192
3196
|
calleeNumber,
|
|
3193
3197
|
dialedExtension,
|
|
3194
3198
|
isCaller,
|
|
3199
|
+
isVideo,
|
|
3195
3200
|
lineId,
|
|
3196
3201
|
muted,
|
|
3197
3202
|
onHold,
|
|
@@ -3215,6 +3220,7 @@ class Call {
|
|
|
3215
3220
|
this.startingTime = startingTime;
|
|
3216
3221
|
this.talkingToIds = talkingToIds || [];
|
|
3217
3222
|
this.recording = recording;
|
|
3223
|
+
this.isVideo = !!isVideo;
|
|
3218
3224
|
|
|
3219
3225
|
// Useful to compare instead of instanceof with minified code
|
|
3220
3226
|
this.type = 'Call';
|
|
@@ -3688,7 +3694,7 @@ class CallSession {
|
|
|
3688
3694
|
ringing: call.isRinging(),
|
|
3689
3695
|
answered: call.isUp(),
|
|
3690
3696
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3691
|
-
cameraEnabled:
|
|
3697
|
+
cameraEnabled: call.isVideo,
|
|
3692
3698
|
dialedExtension: call.dialedExtension,
|
|
3693
3699
|
call,
|
|
3694
3700
|
conference: false, // @FIXME?
|
|
@@ -7797,11 +7803,11 @@ class WebRTCClient extends Emitter {
|
|
|
7797
7803
|
});
|
|
7798
7804
|
}
|
|
7799
7805
|
|
|
7800
|
-
changeAudioInputDevice(id , session ) {
|
|
7806
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7801
7807
|
const currentId = this.getAudioDeviceId();
|
|
7802
7808
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7803
7809
|
|
|
7804
|
-
if (id === currentId) {
|
|
7810
|
+
if (!force && id === currentId) {
|
|
7805
7811
|
return null;
|
|
7806
7812
|
}
|
|
7807
7813
|
|
|
@@ -9597,10 +9603,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9597
9603
|
this.audioRingVolume = volume;
|
|
9598
9604
|
}
|
|
9599
9605
|
|
|
9600
|
-
changeAudioInputDevice(id ) {
|
|
9606
|
+
changeAudioInputDevice(id , force ) {
|
|
9601
9607
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9602
9608
|
|
|
9603
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9609
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9604
9610
|
}
|
|
9605
9611
|
|
|
9606
9612
|
changeVideoInputDevice(id ) {
|
|
@@ -3081,6 +3081,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3081
|
|
|
3082
3082
|
|
|
3083
3083
|
|
|
3084
|
+
|
|
3084
3085
|
|
|
3085
3086
|
|
|
3086
3087
|
|
|
@@ -3091,6 +3092,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3091
3092
|
|
|
3092
3093
|
|
|
3093
3094
|
|
|
3095
|
+
|
|
3094
3096
|
|
|
3095
3097
|
|
|
3096
3098
|
|
|
@@ -3119,6 +3121,7 @@ class Call {
|
|
|
3119
3121
|
|
|
3120
3122
|
|
|
3121
3123
|
|
|
3124
|
+
|
|
3122
3125
|
|
|
3123
3126
|
|
|
3124
3127
|
|
|
@@ -3143,6 +3146,7 @@ class Call {
|
|
|
3143
3146
|
calleeNumber: plain.peer_caller_id_number,
|
|
3144
3147
|
dialedExtension: plain.dialed_extension,
|
|
3145
3148
|
isCaller: plain.is_caller,
|
|
3149
|
+
isVideo: plain.is_video,
|
|
3146
3150
|
muted: plain.muted,
|
|
3147
3151
|
onHold: plain.on_hold,
|
|
3148
3152
|
status: plain.status,
|
|
@@ -3166,6 +3170,7 @@ class Call {
|
|
|
3166
3170
|
calleeNumber,
|
|
3167
3171
|
dialedExtension,
|
|
3168
3172
|
isCaller,
|
|
3173
|
+
isVideo,
|
|
3169
3174
|
lineId,
|
|
3170
3175
|
muted,
|
|
3171
3176
|
onHold,
|
|
@@ -3189,6 +3194,7 @@ class Call {
|
|
|
3189
3194
|
this.startingTime = startingTime;
|
|
3190
3195
|
this.talkingToIds = talkingToIds || [];
|
|
3191
3196
|
this.recording = recording;
|
|
3197
|
+
this.isVideo = !!isVideo;
|
|
3192
3198
|
|
|
3193
3199
|
// Useful to compare instead of instanceof with minified code
|
|
3194
3200
|
this.type = 'Call';
|
|
@@ -3662,7 +3668,7 @@ class CallSession {
|
|
|
3662
3668
|
ringing: call.isRinging(),
|
|
3663
3669
|
answered: call.isUp(),
|
|
3664
3670
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3665
|
-
cameraEnabled:
|
|
3671
|
+
cameraEnabled: call.isVideo,
|
|
3666
3672
|
dialedExtension: call.dialedExtension,
|
|
3667
3673
|
call,
|
|
3668
3674
|
conference: false, // @FIXME?
|
|
@@ -7797,11 +7803,11 @@ class WebRTCClient extends Emitter {
|
|
|
7797
7803
|
});
|
|
7798
7804
|
}
|
|
7799
7805
|
|
|
7800
|
-
changeAudioInputDevice(id , session ) {
|
|
7806
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7801
7807
|
const currentId = this.getAudioDeviceId();
|
|
7802
7808
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7803
7809
|
|
|
7804
|
-
if (id === currentId) {
|
|
7810
|
+
if (!force && id === currentId) {
|
|
7805
7811
|
return null;
|
|
7806
7812
|
}
|
|
7807
7813
|
|
|
@@ -9597,10 +9603,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9597
9603
|
this.audioRingVolume = volume;
|
|
9598
9604
|
}
|
|
9599
9605
|
|
|
9600
|
-
changeAudioInputDevice(id ) {
|
|
9606
|
+
changeAudioInputDevice(id , force ) {
|
|
9601
9607
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9602
9608
|
|
|
9603
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9609
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9604
9610
|
}
|
|
9605
9611
|
|
|
9606
9612
|
changeVideoInputDevice(id ) {
|
package/lib/simple/room/Room.js
CHANGED
|
@@ -3083,6 +3083,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3083
3083
|
|
|
3084
3084
|
|
|
3085
3085
|
|
|
3086
|
+
|
|
3086
3087
|
|
|
3087
3088
|
|
|
3088
3089
|
|
|
@@ -3093,6 +3094,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3093
3094
|
|
|
3094
3095
|
|
|
3095
3096
|
|
|
3097
|
+
|
|
3096
3098
|
|
|
3097
3099
|
|
|
3098
3100
|
|
|
@@ -3121,6 +3123,7 @@ class Call {
|
|
|
3121
3123
|
|
|
3122
3124
|
|
|
3123
3125
|
|
|
3126
|
+
|
|
3124
3127
|
|
|
3125
3128
|
|
|
3126
3129
|
|
|
@@ -3145,6 +3148,7 @@ class Call {
|
|
|
3145
3148
|
calleeNumber: plain.peer_caller_id_number,
|
|
3146
3149
|
dialedExtension: plain.dialed_extension,
|
|
3147
3150
|
isCaller: plain.is_caller,
|
|
3151
|
+
isVideo: plain.is_video,
|
|
3148
3152
|
muted: plain.muted,
|
|
3149
3153
|
onHold: plain.on_hold,
|
|
3150
3154
|
status: plain.status,
|
|
@@ -3168,6 +3172,7 @@ class Call {
|
|
|
3168
3172
|
calleeNumber,
|
|
3169
3173
|
dialedExtension,
|
|
3170
3174
|
isCaller,
|
|
3175
|
+
isVideo,
|
|
3171
3176
|
lineId,
|
|
3172
3177
|
muted,
|
|
3173
3178
|
onHold,
|
|
@@ -3191,6 +3196,7 @@ class Call {
|
|
|
3191
3196
|
this.startingTime = startingTime;
|
|
3192
3197
|
this.talkingToIds = talkingToIds || [];
|
|
3193
3198
|
this.recording = recording;
|
|
3199
|
+
this.isVideo = !!isVideo;
|
|
3194
3200
|
|
|
3195
3201
|
// Useful to compare instead of instanceof with minified code
|
|
3196
3202
|
this.type = 'Call';
|
|
@@ -3664,7 +3670,7 @@ class CallSession {
|
|
|
3664
3670
|
ringing: call.isRinging(),
|
|
3665
3671
|
answered: call.isUp(),
|
|
3666
3672
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3667
|
-
cameraEnabled:
|
|
3673
|
+
cameraEnabled: call.isVideo,
|
|
3668
3674
|
dialedExtension: call.dialedExtension,
|
|
3669
3675
|
call,
|
|
3670
3676
|
conference: false, // @FIXME?
|
|
@@ -7799,11 +7805,11 @@ class WebRTCClient extends Emitter {
|
|
|
7799
7805
|
});
|
|
7800
7806
|
}
|
|
7801
7807
|
|
|
7802
|
-
changeAudioInputDevice(id , session ) {
|
|
7808
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7803
7809
|
const currentId = this.getAudioDeviceId();
|
|
7804
7810
|
logger$8.info('setting audio input device', { id, currentId, session: !!session });
|
|
7805
7811
|
|
|
7806
|
-
if (id === currentId) {
|
|
7812
|
+
if (!force && id === currentId) {
|
|
7807
7813
|
return null;
|
|
7808
7814
|
}
|
|
7809
7815
|
|
|
@@ -9599,10 +9605,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9599
9605
|
this.audioRingVolume = volume;
|
|
9600
9606
|
}
|
|
9601
9607
|
|
|
9602
|
-
changeAudioInputDevice(id ) {
|
|
9608
|
+
changeAudioInputDevice(id , force ) {
|
|
9603
9609
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9604
9610
|
|
|
9605
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9611
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9606
9612
|
}
|
|
9607
9613
|
|
|
9608
9614
|
changeVideoInputDevice(id ) {
|