@wazo/sdk 0.38.11 → 0.38.14
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 +4 -4
- package/esm/__tests__/web-rtc-client.test.js +2 -1
- package/esm/checker/Checker.js +2 -1
- package/esm/checker/checks/index.js +2 -1
- package/esm/checker/checks/webrtc-transport.js +2 -1
- package/esm/checker/checks/webrtc.js +2 -1
- package/esm/domain/Features.js +5 -1
- package/esm/domain/Phone/CTIPhone.js +2 -0
- package/esm/index.js +17 -5
- package/esm/simple/Auth.js +17 -5
- package/esm/simple/Configuration.js +17 -5
- package/esm/simple/Phone.js +17 -5
- package/esm/simple/index.js +17 -5
- package/esm/simple/room/LocalParticipant.js +5521 -5509
- package/esm/simple/room/Participant.js +5519 -5507
- package/esm/simple/room/RemoteParticipant.js +17 -5
- package/esm/simple/room/Room.js +17 -5
- package/esm/simple/room/SipRoom.js +17 -5
- package/esm/simple/room/Stream.js +17 -5
- package/esm/simple/room/__tests__/Participant.test.js +17 -5
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +17 -5
- package/esm/simple/utils.js +17 -5
- package/esm/web-rtc-client.js +2 -1
- package/lib/__tests__/web-rtc-client.test.js +2 -1
- package/lib/checker/Checker.js +2 -1
- package/lib/checker/checks/index.js +2 -1
- package/lib/checker/checks/webrtc-transport.js +2 -1
- package/lib/checker/checks/webrtc.js +2 -1
- package/lib/domain/Features.js +5 -1
- package/lib/domain/Phone/CTIPhone.js +2 -0
- package/lib/index.js +17 -5
- package/lib/simple/Auth.js +17 -5
- package/lib/simple/Configuration.js +17 -5
- package/lib/simple/Phone.js +17 -5
- package/lib/simple/index.js +17 -5
- package/lib/simple/room/LocalParticipant.js +6446 -6434
- package/lib/simple/room/Participant.js +6546 -6534
- package/lib/simple/room/RemoteParticipant.js +17 -5
- package/lib/simple/room/Room.js +17 -5
- package/lib/simple/room/SipRoom.js +17 -5
- package/lib/simple/room/Stream.js +17 -5
- package/lib/simple/room/__tests__/Participant.test.js +17 -5
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +17 -5
- package/lib/simple/utils.js +17 -5
- package/lib/web-rtc-client.js +2 -1
- package/package.json +1 -1
- package/src/domain/Features.js +5 -1
- package/src/domain/Phone/CTIPhone.js +2 -0
- package/src/domain/Phone/Phone.js +2 -0
- package/src/simple/room/Participant.js +7 -1
- package/src/simple/room/Room.js +2 -2
- package/src/web-rtc-client.js +2 -1
package/lib/web-rtc-client.js
CHANGED
|
@@ -6018,6 +6018,7 @@ class WebRTCClient extends Emitter {
|
|
|
6018
6018
|
conference,
|
|
6019
6019
|
audioOnly,
|
|
6020
6020
|
},
|
|
6021
|
+
earlyMedia: true,
|
|
6021
6022
|
};
|
|
6022
6023
|
|
|
6023
6024
|
if (audioOnly) {
|
|
@@ -6382,7 +6383,7 @@ class WebRTCClient extends Emitter {
|
|
|
6382
6383
|
|
|
6383
6384
|
videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
|
|
6384
6385
|
} else {
|
|
6385
|
-
videoSender = pc.getSenders().find(sender => sender.track === null);
|
|
6386
|
+
videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
|
|
6386
6387
|
}
|
|
6387
6388
|
|
|
6388
6389
|
if (!videoSender) {
|
package/package.json
CHANGED
package/src/domain/Features.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import getApiClient from '../service/getApiClient';
|
|
4
4
|
|
|
5
|
-
export const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
5
|
+
export const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
6
6
|
|
|
7
7
|
export const getScopeName = (featureName: string) => `enterprise.app.${featureName}`;
|
|
8
8
|
|
|
@@ -16,6 +16,7 @@ class Features {
|
|
|
16
16
|
_hasFax: boolean;
|
|
17
17
|
_hasMobileDoubleCall: boolean;
|
|
18
18
|
_hasMobileGsm: boolean;
|
|
19
|
+
_hasMeeting: boolean;
|
|
19
20
|
|
|
20
21
|
constructor() {
|
|
21
22
|
this._hasChat = true;
|
|
@@ -24,6 +25,7 @@ class Features {
|
|
|
24
25
|
this._hasFax = true;
|
|
25
26
|
this._hasMobileDoubleCall = true;
|
|
26
27
|
this._hasMobileGsm = true;
|
|
28
|
+
this._hasMeeting = true;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
async fetchAccess() {
|
|
@@ -44,6 +46,7 @@ class Features {
|
|
|
44
46
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
45
47
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
46
48
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
49
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
hasChat() { return this._hasChat; }
|
|
@@ -52,6 +55,7 @@ class Features {
|
|
|
52
55
|
hasFax() { return this._hasFax; }
|
|
53
56
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
54
57
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
58
|
+
hasMeeting() { return this._hasMeeting; }
|
|
55
59
|
|
|
56
60
|
_hasFeatures(scopes: Object, featureName: string) {
|
|
57
61
|
const scopeName = getScopeName(featureName);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import Emitter from '../../utils/Emitter';
|
|
3
3
|
import IssueReporter from '../../service/IssueReporter';
|
|
4
4
|
|
|
5
|
+
import Phone from '../Phone';
|
|
5
6
|
import Room, { SIGNAL_TYPE_PARTICIPANT_UPDATE } from './Room';
|
|
6
7
|
import Contact from '../../domain/Contact';
|
|
7
8
|
import getApiClient from '../../service/getApiClient';
|
|
@@ -296,10 +297,15 @@ class Participant extends Emitter {
|
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
|
|
299
|
-
broadcastStatus(inboundStatus: Object = null) {
|
|
300
|
+
broadcastStatus(inboundStatus: Object = null, sendReinvite: ?boolean) {
|
|
300
301
|
const status = inboundStatus || this.getStatus();
|
|
301
302
|
logger.info('broadcasting participant status', { callId: this.callId, status });
|
|
302
303
|
|
|
304
|
+
if (sendReinvite && !this.streams.length && Phone.phone) {
|
|
305
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
306
|
+
Phone.phone._sendReinviteMessage(this.room.callSession, false);
|
|
307
|
+
}
|
|
308
|
+
|
|
303
309
|
this.room.sendSignal({
|
|
304
310
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
305
311
|
origin: this.callId,
|
package/src/simple/room/Room.js
CHANGED
|
@@ -602,7 +602,7 @@ class Room extends Emitter {
|
|
|
602
602
|
// callId is null, someone's requesting everyone's state;
|
|
603
603
|
// or callId is set and matches ours;
|
|
604
604
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
605
|
-
this.localParticipant.broadcastStatus();
|
|
605
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
// might as well update the requester's status
|
|
@@ -704,7 +704,7 @@ class Room extends Emitter {
|
|
|
704
704
|
|
|
705
705
|
this.connected = true;
|
|
706
706
|
|
|
707
|
-
localParticipant.broadcastStatus();
|
|
707
|
+
localParticipant.broadcastStatus(null, true);
|
|
708
708
|
|
|
709
709
|
// we're in the room, now let's request everyone's status
|
|
710
710
|
if (this.localParticipant) {
|
package/src/web-rtc-client.js
CHANGED
|
@@ -472,6 +472,7 @@ export default class WebRTCClient extends Emitter {
|
|
|
472
472
|
conference,
|
|
473
473
|
audioOnly,
|
|
474
474
|
},
|
|
475
|
+
earlyMedia: true,
|
|
475
476
|
};
|
|
476
477
|
|
|
477
478
|
if (audioOnly) {
|
|
@@ -836,7 +837,7 @@ export default class WebRTCClient extends Emitter {
|
|
|
836
837
|
|
|
837
838
|
videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
|
|
838
839
|
} else {
|
|
839
|
-
videoSender = pc.getSenders().find(sender => sender.track === null);
|
|
840
|
+
videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
|
|
840
841
|
}
|
|
841
842
|
|
|
842
843
|
if (!videoSender) {
|