@webex/web-client-media-engine 3.11.9 → 3.12.0
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/cjs/index.js +42 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +42 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +10 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -5708,6 +5708,10 @@ var PeerConnectionEvents;
|
|
|
5708
5708
|
(function (PeerConnectionEvents) {
|
|
5709
5709
|
PeerConnectionEvents["IceGatheringStateChange"] = "icegatheringstatechange";
|
|
5710
5710
|
PeerConnectionEvents["ConnectionStateChange"] = "connectionstatechange";
|
|
5711
|
+
PeerConnectionEvents["CreateOfferOnSuccess"] = "createofferonsuccess";
|
|
5712
|
+
PeerConnectionEvents["CreateAnswerOnSuccess"] = "createansweronsuccess";
|
|
5713
|
+
PeerConnectionEvents["SetLocalDescriptionOnSuccess"] = "setlocaldescriptiononsuccess";
|
|
5714
|
+
PeerConnectionEvents["SetRemoteDescriptionOnSuccess"] = "setremotedescriptiononsuccess";
|
|
5711
5715
|
})(PeerConnectionEvents || (PeerConnectionEvents = {}));
|
|
5712
5716
|
/**
|
|
5713
5717
|
* Manages a single RTCPeerConnection with the server.
|
|
@@ -5821,7 +5825,10 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5821
5825
|
*/
|
|
5822
5826
|
createAnswer(options) {
|
|
5823
5827
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
5824
|
-
return this.pc.createAnswer(options)
|
|
5828
|
+
return this.pc.createAnswer(options).then((answer) => {
|
|
5829
|
+
this.emit(PeerConnection.Events.CreateAnswerOnSuccess, answer);
|
|
5830
|
+
return answer;
|
|
5831
|
+
});
|
|
5825
5832
|
});
|
|
5826
5833
|
}
|
|
5827
5834
|
/**
|
|
@@ -5836,7 +5843,10 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5836
5843
|
*/
|
|
5837
5844
|
createOffer(options) {
|
|
5838
5845
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
5839
|
-
return this.pc.createOffer(options)
|
|
5846
|
+
return this.pc.createOffer(options).then((offer) => {
|
|
5847
|
+
this.emit(PeerConnection.Events.CreateOfferOnSuccess, offer);
|
|
5848
|
+
return offer;
|
|
5849
|
+
});
|
|
5840
5850
|
});
|
|
5841
5851
|
}
|
|
5842
5852
|
/**
|
|
@@ -5861,7 +5871,11 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5861
5871
|
}
|
|
5862
5872
|
});
|
|
5863
5873
|
}
|
|
5864
|
-
return this.pc.setLocalDescription(description)
|
|
5874
|
+
return this.pc.setLocalDescription(description).then(() => {
|
|
5875
|
+
if (description) {
|
|
5876
|
+
this.emit(PeerConnection.Events.SetLocalDescriptionOnSuccess, description);
|
|
5877
|
+
}
|
|
5878
|
+
});
|
|
5865
5879
|
});
|
|
5866
5880
|
}
|
|
5867
5881
|
/**
|
|
@@ -5875,7 +5889,9 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5875
5889
|
*/
|
|
5876
5890
|
setRemoteDescription(description) {
|
|
5877
5891
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
5878
|
-
return this.pc.setRemoteDescription(description)
|
|
5892
|
+
return this.pc.setRemoteDescription(description).then(() => {
|
|
5893
|
+
this.emit(PeerConnection.Events.SetRemoteDescriptionOnSuccess, description);
|
|
5894
|
+
});
|
|
5879
5895
|
});
|
|
5880
5896
|
}
|
|
5881
5897
|
/**
|
|
@@ -14389,6 +14405,10 @@ var MultistreamConnectionEventNames;
|
|
|
14389
14405
|
MultistreamConnectionEventNames["ActiveSpeakerNotification"] = "active-speaker-notification";
|
|
14390
14406
|
MultistreamConnectionEventNames["ConnectionStateUpdate"] = "connection-state-update";
|
|
14391
14407
|
MultistreamConnectionEventNames["NegotiationNeeded"] = "negotiation-needed";
|
|
14408
|
+
MultistreamConnectionEventNames["CreateOfferOnSuccess"] = "createofferonsuccess";
|
|
14409
|
+
MultistreamConnectionEventNames["CreateAnswerOnSuccess"] = "createansweronsuccess";
|
|
14410
|
+
MultistreamConnectionEventNames["SetLocalDescriptionOnSuccess"] = "setlocaldescriptiononsuccess";
|
|
14411
|
+
MultistreamConnectionEventNames["SetRemoteDescriptionOnSuccess"] = "setremotedescriptiononsuccess";
|
|
14392
14412
|
})(MultistreamConnectionEventNames || (MultistreamConnectionEventNames = {}));
|
|
14393
14413
|
const defaultMultistreamConnectionOptions = {
|
|
14394
14414
|
disableSimulcast: BrowserInfo.isFirefox(),
|
|
@@ -14431,10 +14451,27 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14431
14451
|
iceServers: this.options.iceServers,
|
|
14432
14452
|
bundlePolicy: this.options.bundlePolicy,
|
|
14433
14453
|
});
|
|
14434
|
-
this.
|
|
14454
|
+
this.propagatePeerConnectionEvents();
|
|
14435
14455
|
this.attachMetricsObserver();
|
|
14436
14456
|
this.createDataChannel();
|
|
14437
14457
|
}
|
|
14458
|
+
propagatePeerConnectionEvents() {
|
|
14459
|
+
this.pc.on(PeerConnection.Events.ConnectionStateChange, (state) => {
|
|
14460
|
+
this.emit(MultistreamConnectionEventNames.ConnectionStateUpdate, state);
|
|
14461
|
+
});
|
|
14462
|
+
this.pc.on(PeerConnection.Events.CreateOfferOnSuccess, (description) => {
|
|
14463
|
+
this.emit(MultistreamConnectionEventNames.CreateOfferOnSuccess, description);
|
|
14464
|
+
});
|
|
14465
|
+
this.pc.on(PeerConnection.Events.CreateAnswerOnSuccess, (description) => {
|
|
14466
|
+
this.emit(MultistreamConnectionEventNames.CreateAnswerOnSuccess, description);
|
|
14467
|
+
});
|
|
14468
|
+
this.pc.on(PeerConnection.Events.SetLocalDescriptionOnSuccess, (description) => {
|
|
14469
|
+
this.emit(MultistreamConnectionEventNames.SetLocalDescriptionOnSuccess, description);
|
|
14470
|
+
});
|
|
14471
|
+
this.pc.on(PeerConnection.Events.SetRemoteDescriptionOnSuccess, (description) => {
|
|
14472
|
+
this.emit(MultistreamConnectionEventNames.SetRemoteDescriptionOnSuccess, description);
|
|
14473
|
+
});
|
|
14474
|
+
}
|
|
14438
14475
|
getConnectionState() {
|
|
14439
14476
|
return this.pc.getConnectionState();
|
|
14440
14477
|
}
|