@wazo/sdk 0.37.40 → 0.37.41
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/dist/wazo-sdk.js +1 -1
- package/esm/domain/Phone/WebRTCPhone.js +4 -4
- package/esm/index.js +4 -4
- package/esm/simple/Auth.js +4 -4
- package/esm/simple/Configuration.js +4 -4
- package/esm/simple/Phone.js +4 -4
- package/esm/simple/index.js +4 -4
- package/esm/simple/room/LocalParticipant.js +4 -4
- package/esm/simple/room/Participant.js +4 -4
- package/esm/simple/room/RemoteParticipant.js +4 -4
- package/esm/simple/room/Room.js +4 -4
- package/esm/simple/room/SipRoom.js +4 -4
- package/esm/simple/room/Stream.js +4 -4
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +4 -4
- package/esm/simple/utils.js +4 -4
- package/lib/domain/Phone/WebRTCPhone.js +4 -4
- package/lib/index.js +4 -4
- package/lib/simple/Auth.js +4 -4
- package/lib/simple/Configuration.js +4 -4
- package/lib/simple/Phone.js +4 -4
- package/lib/simple/index.js +4 -4
- package/lib/simple/room/LocalParticipant.js +4 -4
- package/lib/simple/room/Participant.js +4 -4
- package/lib/simple/room/RemoteParticipant.js +4 -4
- package/lib/simple/room/Room.js +4 -4
- package/lib/simple/room/SipRoom.js +4 -4
- package/lib/simple/room/Stream.js +4 -4
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +4 -4
- package/lib/simple/utils.js +4 -4
- package/package.json +1 -1
- package/src/domain/Phone/WebRTCPhone.js +4 -4
|
@@ -1438,7 +1438,7 @@ class WebRTCPhone extends Emitter {
|
|
|
1438
1438
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
1439
1439
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
1440
1440
|
// We have to downgrade to audio.
|
|
1441
|
-
const screenshareStopped = this.currentScreenShare.
|
|
1441
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
1442
1442
|
const constraints = { audio: false, video: screenshareStopped };
|
|
1443
1443
|
|
|
1444
1444
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -1882,7 +1882,7 @@ class WebRTCPhone extends Emitter {
|
|
|
1882
1882
|
|
|
1883
1883
|
logger.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
1884
1884
|
|
|
1885
|
-
// Stop
|
|
1885
|
+
// Stop screenshare if needed
|
|
1886
1886
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
1887
1887
|
this.lastScreenShare = this.currentScreenShare;
|
|
1888
1888
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -2458,7 +2458,7 @@ class WebRTCPhone extends Emitter {
|
|
|
2458
2458
|
});
|
|
2459
2459
|
|
|
2460
2460
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
2461
|
-
logger.
|
|
2461
|
+
logger.info('WebRTC client disconnected');
|
|
2462
2462
|
|
|
2463
2463
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
2464
2464
|
|
|
@@ -2644,7 +2644,7 @@ class WebRTCPhone extends Emitter {
|
|
|
2644
2644
|
endTime: fromSession ? fromSession.endTime : null,
|
|
2645
2645
|
answered: state === SessionState.Established,
|
|
2646
2646
|
paused: this.client.isCallHeld(sipSession),
|
|
2647
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
2647
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
2648
2648
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
2649
2649
|
number,
|
|
2650
2650
|
ringing: false,
|
package/esm/index.js
CHANGED
|
@@ -9835,7 +9835,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9835
9835
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9836
9836
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9837
9837
|
// We have to downgrade to audio.
|
|
9838
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9838
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9839
9839
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9840
9840
|
|
|
9841
9841
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -10279,7 +10279,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10279
10279
|
|
|
10280
10280
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
10281
10281
|
|
|
10282
|
-
// Stop
|
|
10282
|
+
// Stop screenshare if needed
|
|
10283
10283
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
10284
10284
|
this.lastScreenShare = this.currentScreenShare;
|
|
10285
10285
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10855,7 +10855,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10855
10855
|
});
|
|
10856
10856
|
|
|
10857
10857
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10858
|
-
logger$7.
|
|
10858
|
+
logger$7.info('WebRTC client disconnected');
|
|
10859
10859
|
|
|
10860
10860
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10861
10861
|
|
|
@@ -11041,7 +11041,7 @@ class WebRTCPhone extends Emitter {
|
|
|
11041
11041
|
endTime: fromSession ? fromSession.endTime : null,
|
|
11042
11042
|
answered: state === SessionState.Established,
|
|
11043
11043
|
paused: this.client.isCallHeld(sipSession),
|
|
11044
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
11044
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
11045
11045
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
11046
11046
|
number,
|
|
11047
11047
|
ringing: false,
|
package/esm/simple/Auth.js
CHANGED
|
@@ -9112,7 +9112,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9112
9112
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9113
9113
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9114
9114
|
// We have to downgrade to audio.
|
|
9115
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9115
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9116
9116
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9117
9117
|
|
|
9118
9118
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9556,7 +9556,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9556
9556
|
|
|
9557
9557
|
logger$8.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9558
9558
|
|
|
9559
|
-
// Stop
|
|
9559
|
+
// Stop screenshare if needed
|
|
9560
9560
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9561
9561
|
this.lastScreenShare = this.currentScreenShare;
|
|
9562
9562
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10132,7 +10132,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10132
10132
|
});
|
|
10133
10133
|
|
|
10134
10134
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10135
|
-
logger$8.
|
|
10135
|
+
logger$8.info('WebRTC client disconnected');
|
|
10136
10136
|
|
|
10137
10137
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10138
10138
|
|
|
@@ -10318,7 +10318,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10318
10318
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10319
10319
|
answered: state === SessionState.Established,
|
|
10320
10320
|
paused: this.client.isCallHeld(sipSession),
|
|
10321
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10321
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10322
10322
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10323
10323
|
number,
|
|
10324
10324
|
ringing: false,
|
|
@@ -9112,7 +9112,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9112
9112
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9113
9113
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9114
9114
|
// We have to downgrade to audio.
|
|
9115
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9115
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9116
9116
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9117
9117
|
|
|
9118
9118
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9556,7 +9556,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9556
9556
|
|
|
9557
9557
|
logger$8.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9558
9558
|
|
|
9559
|
-
// Stop
|
|
9559
|
+
// Stop screenshare if needed
|
|
9560
9560
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9561
9561
|
this.lastScreenShare = this.currentScreenShare;
|
|
9562
9562
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10132,7 +10132,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10132
10132
|
});
|
|
10133
10133
|
|
|
10134
10134
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10135
|
-
logger$8.
|
|
10135
|
+
logger$8.info('WebRTC client disconnected');
|
|
10136
10136
|
|
|
10137
10137
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10138
10138
|
|
|
@@ -10318,7 +10318,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10318
10318
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10319
10319
|
answered: state === SessionState.Established,
|
|
10320
10320
|
paused: this.client.isCallHeld(sipSession),
|
|
10321
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10321
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10322
10322
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10323
10323
|
number,
|
|
10324
10324
|
ringing: false,
|
package/esm/simple/Phone.js
CHANGED
|
@@ -9112,7 +9112,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9112
9112
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9113
9113
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9114
9114
|
// We have to downgrade to audio.
|
|
9115
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9115
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9116
9116
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9117
9117
|
|
|
9118
9118
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9556,7 +9556,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9556
9556
|
|
|
9557
9557
|
logger$8.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9558
9558
|
|
|
9559
|
-
// Stop
|
|
9559
|
+
// Stop screenshare if needed
|
|
9560
9560
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9561
9561
|
this.lastScreenShare = this.currentScreenShare;
|
|
9562
9562
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10132,7 +10132,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10132
10132
|
});
|
|
10133
10133
|
|
|
10134
10134
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10135
|
-
logger$8.
|
|
10135
|
+
logger$8.info('WebRTC client disconnected');
|
|
10136
10136
|
|
|
10137
10137
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10138
10138
|
|
|
@@ -10318,7 +10318,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10318
10318
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10319
10319
|
answered: state === SessionState.Established,
|
|
10320
10320
|
paused: this.client.isCallHeld(sipSession),
|
|
10321
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10321
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10322
10322
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10323
10323
|
number,
|
|
10324
10324
|
ringing: false,
|
package/esm/simple/index.js
CHANGED
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
package/esm/simple/room/Room.js
CHANGED
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
package/esm/simple/utils.js
CHANGED
|
@@ -9394,7 +9394,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9394
9394
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9395
9395
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9396
9396
|
// We have to downgrade to audio.
|
|
9397
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9397
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9398
9398
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9399
9399
|
|
|
9400
9400
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9838,7 +9838,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9838
9838
|
|
|
9839
9839
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9840
9840
|
|
|
9841
|
-
// Stop
|
|
9841
|
+
// Stop screenshare if needed
|
|
9842
9842
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9843
9843
|
this.lastScreenShare = this.currentScreenShare;
|
|
9844
9844
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10414,7 +10414,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10414
10414
|
});
|
|
10415
10415
|
|
|
10416
10416
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10417
|
-
logger$7.
|
|
10417
|
+
logger$7.info('WebRTC client disconnected');
|
|
10418
10418
|
|
|
10419
10419
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10420
10420
|
|
|
@@ -10600,7 +10600,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10600
10600
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10601
10601
|
answered: state === SessionState.Established,
|
|
10602
10602
|
paused: this.client.isCallHeld(sipSession),
|
|
10603
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10603
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10604
10604
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10605
10605
|
number,
|
|
10606
10606
|
ringing: false,
|
|
@@ -1447,7 +1447,7 @@ class WebRTCPhone extends Emitter {
|
|
|
1447
1447
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
1448
1448
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
1449
1449
|
// We have to downgrade to audio.
|
|
1450
|
-
const screenshareStopped = this.currentScreenShare.
|
|
1450
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
1451
1451
|
const constraints = { audio: false, video: screenshareStopped };
|
|
1452
1452
|
|
|
1453
1453
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -1891,7 +1891,7 @@ class WebRTCPhone extends Emitter {
|
|
|
1891
1891
|
|
|
1892
1892
|
logger.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
1893
1893
|
|
|
1894
|
-
// Stop
|
|
1894
|
+
// Stop screenshare if needed
|
|
1895
1895
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
1896
1896
|
this.lastScreenShare = this.currentScreenShare;
|
|
1897
1897
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -2467,7 +2467,7 @@ class WebRTCPhone extends Emitter {
|
|
|
2467
2467
|
});
|
|
2468
2468
|
|
|
2469
2469
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
2470
|
-
logger.
|
|
2470
|
+
logger.info('WebRTC client disconnected');
|
|
2471
2471
|
|
|
2472
2472
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
2473
2473
|
|
|
@@ -2653,7 +2653,7 @@ class WebRTCPhone extends Emitter {
|
|
|
2653
2653
|
endTime: fromSession ? fromSession.endTime : null,
|
|
2654
2654
|
answered: state === sessionState.SessionState.Established,
|
|
2655
2655
|
paused: this.client.isCallHeld(sipSession),
|
|
2656
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
2656
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
2657
2657
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
2658
2658
|
number,
|
|
2659
2659
|
ringing: false,
|
package/lib/index.js
CHANGED
|
@@ -9846,7 +9846,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9846
9846
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9847
9847
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9848
9848
|
// We have to downgrade to audio.
|
|
9849
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9849
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9850
9850
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9851
9851
|
|
|
9852
9852
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -10290,7 +10290,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10290
10290
|
|
|
10291
10291
|
logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
10292
10292
|
|
|
10293
|
-
// Stop
|
|
10293
|
+
// Stop screenshare if needed
|
|
10294
10294
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
10295
10295
|
this.lastScreenShare = this.currentScreenShare;
|
|
10296
10296
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10866,7 +10866,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10866
10866
|
});
|
|
10867
10867
|
|
|
10868
10868
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10869
|
-
logger$7.
|
|
10869
|
+
logger$7.info('WebRTC client disconnected');
|
|
10870
10870
|
|
|
10871
10871
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10872
10872
|
|
|
@@ -11052,7 +11052,7 @@ class WebRTCPhone extends Emitter {
|
|
|
11052
11052
|
endTime: fromSession ? fromSession.endTime : null,
|
|
11053
11053
|
answered: state === sessionState.SessionState.Established,
|
|
11054
11054
|
paused: this.client.isCallHeld(sipSession),
|
|
11055
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
11055
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
11056
11056
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
11057
11057
|
number,
|
|
11058
11058
|
ringing: false,
|
package/lib/simple/Auth.js
CHANGED
|
@@ -9124,7 +9124,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9124
9124
|
// When stopping screenshare and we had video before that, we have to re-upgrade
|
|
9125
9125
|
// When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
|
|
9126
9126
|
// We have to downgrade to audio.
|
|
9127
|
-
const screenshareStopped = this.currentScreenShare.
|
|
9127
|
+
const screenshareStopped = this.currentScreenShare.hadVideo;
|
|
9128
9128
|
const constraints = { audio: false, video: screenshareStopped };
|
|
9129
9129
|
|
|
9130
9130
|
// We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
|
|
@@ -9568,7 +9568,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9568
9568
|
|
|
9569
9569
|
logger$8.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
|
|
9570
9570
|
|
|
9571
|
-
// Stop
|
|
9571
|
+
// Stop screenshare if needed
|
|
9572
9572
|
if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
|
|
9573
9573
|
this.lastScreenShare = this.currentScreenShare;
|
|
9574
9574
|
await this.stopScreenSharing(false, callSession);
|
|
@@ -10144,7 +10144,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10144
10144
|
});
|
|
10145
10145
|
|
|
10146
10146
|
this.client.on(this.client.DISCONNECTED, () => {
|
|
10147
|
-
logger$8.
|
|
10147
|
+
logger$8.info('WebRTC client disconnected');
|
|
10148
10148
|
|
|
10149
10149
|
this.eventEmitter.emit(ON_UNREGISTERED);
|
|
10150
10150
|
|
|
@@ -10330,7 +10330,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10330
10330
|
endTime: fromSession ? fromSession.endTime : null,
|
|
10331
10331
|
answered: state === sessionState.SessionState.Established,
|
|
10332
10332
|
paused: this.client.isCallHeld(sipSession),
|
|
10333
|
-
isCaller: 'incoming' in extra ? !extra.incoming : false,
|
|
10333
|
+
isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
|
|
10334
10334
|
cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
|
|
10335
10335
|
number,
|
|
10336
10336
|
ringing: false,
|