@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/cjs/index.js
CHANGED
|
@@ -5712,6 +5712,10 @@ var PeerConnectionEvents;
|
|
|
5712
5712
|
(function (PeerConnectionEvents) {
|
|
5713
5713
|
PeerConnectionEvents["IceGatheringStateChange"] = "icegatheringstatechange";
|
|
5714
5714
|
PeerConnectionEvents["ConnectionStateChange"] = "connectionstatechange";
|
|
5715
|
+
PeerConnectionEvents["CreateOfferOnSuccess"] = "createofferonsuccess";
|
|
5716
|
+
PeerConnectionEvents["CreateAnswerOnSuccess"] = "createansweronsuccess";
|
|
5717
|
+
PeerConnectionEvents["SetLocalDescriptionOnSuccess"] = "setlocaldescriptiononsuccess";
|
|
5718
|
+
PeerConnectionEvents["SetRemoteDescriptionOnSuccess"] = "setremotedescriptiononsuccess";
|
|
5715
5719
|
})(PeerConnectionEvents || (PeerConnectionEvents = {}));
|
|
5716
5720
|
/**
|
|
5717
5721
|
* Manages a single RTCPeerConnection with the server.
|
|
@@ -5825,7 +5829,10 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5825
5829
|
*/
|
|
5826
5830
|
createAnswer(options) {
|
|
5827
5831
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
5828
|
-
return this.pc.createAnswer(options)
|
|
5832
|
+
return this.pc.createAnswer(options).then((answer) => {
|
|
5833
|
+
this.emit(PeerConnection.Events.CreateAnswerOnSuccess, answer);
|
|
5834
|
+
return answer;
|
|
5835
|
+
});
|
|
5829
5836
|
});
|
|
5830
5837
|
}
|
|
5831
5838
|
/**
|
|
@@ -5840,7 +5847,10 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5840
5847
|
*/
|
|
5841
5848
|
createOffer(options) {
|
|
5842
5849
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
5843
|
-
return this.pc.createOffer(options)
|
|
5850
|
+
return this.pc.createOffer(options).then((offer) => {
|
|
5851
|
+
this.emit(PeerConnection.Events.CreateOfferOnSuccess, offer);
|
|
5852
|
+
return offer;
|
|
5853
|
+
});
|
|
5844
5854
|
});
|
|
5845
5855
|
}
|
|
5846
5856
|
/**
|
|
@@ -5865,7 +5875,11 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5865
5875
|
}
|
|
5866
5876
|
});
|
|
5867
5877
|
}
|
|
5868
|
-
return this.pc.setLocalDescription(description)
|
|
5878
|
+
return this.pc.setLocalDescription(description).then(() => {
|
|
5879
|
+
if (description) {
|
|
5880
|
+
this.emit(PeerConnection.Events.SetLocalDescriptionOnSuccess, description);
|
|
5881
|
+
}
|
|
5882
|
+
});
|
|
5869
5883
|
});
|
|
5870
5884
|
}
|
|
5871
5885
|
/**
|
|
@@ -5879,7 +5893,9 @@ class PeerConnection extends EventEmitter$4 {
|
|
|
5879
5893
|
*/
|
|
5880
5894
|
setRemoteDescription(description) {
|
|
5881
5895
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
5882
|
-
return this.pc.setRemoteDescription(description)
|
|
5896
|
+
return this.pc.setRemoteDescription(description).then(() => {
|
|
5897
|
+
this.emit(PeerConnection.Events.SetRemoteDescriptionOnSuccess, description);
|
|
5898
|
+
});
|
|
5883
5899
|
});
|
|
5884
5900
|
}
|
|
5885
5901
|
/**
|
|
@@ -14393,6 +14409,10 @@ exports.MultistreamConnectionEventNames = void 0;
|
|
|
14393
14409
|
MultistreamConnectionEventNames["ActiveSpeakerNotification"] = "active-speaker-notification";
|
|
14394
14410
|
MultistreamConnectionEventNames["ConnectionStateUpdate"] = "connection-state-update";
|
|
14395
14411
|
MultistreamConnectionEventNames["NegotiationNeeded"] = "negotiation-needed";
|
|
14412
|
+
MultistreamConnectionEventNames["CreateOfferOnSuccess"] = "createofferonsuccess";
|
|
14413
|
+
MultistreamConnectionEventNames["CreateAnswerOnSuccess"] = "createansweronsuccess";
|
|
14414
|
+
MultistreamConnectionEventNames["SetLocalDescriptionOnSuccess"] = "setlocaldescriptiononsuccess";
|
|
14415
|
+
MultistreamConnectionEventNames["SetRemoteDescriptionOnSuccess"] = "setremotedescriptiononsuccess";
|
|
14396
14416
|
})(exports.MultistreamConnectionEventNames || (exports.MultistreamConnectionEventNames = {}));
|
|
14397
14417
|
const defaultMultistreamConnectionOptions = {
|
|
14398
14418
|
disableSimulcast: BrowserInfo.isFirefox(),
|
|
@@ -14435,10 +14455,27 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14435
14455
|
iceServers: this.options.iceServers,
|
|
14436
14456
|
bundlePolicy: this.options.bundlePolicy,
|
|
14437
14457
|
});
|
|
14438
|
-
this.
|
|
14458
|
+
this.propagatePeerConnectionEvents();
|
|
14439
14459
|
this.attachMetricsObserver();
|
|
14440
14460
|
this.createDataChannel();
|
|
14441
14461
|
}
|
|
14462
|
+
propagatePeerConnectionEvents() {
|
|
14463
|
+
this.pc.on(PeerConnection.Events.ConnectionStateChange, (state) => {
|
|
14464
|
+
this.emit(exports.MultistreamConnectionEventNames.ConnectionStateUpdate, state);
|
|
14465
|
+
});
|
|
14466
|
+
this.pc.on(PeerConnection.Events.CreateOfferOnSuccess, (description) => {
|
|
14467
|
+
this.emit(exports.MultistreamConnectionEventNames.CreateOfferOnSuccess, description);
|
|
14468
|
+
});
|
|
14469
|
+
this.pc.on(PeerConnection.Events.CreateAnswerOnSuccess, (description) => {
|
|
14470
|
+
this.emit(exports.MultistreamConnectionEventNames.CreateAnswerOnSuccess, description);
|
|
14471
|
+
});
|
|
14472
|
+
this.pc.on(PeerConnection.Events.SetLocalDescriptionOnSuccess, (description) => {
|
|
14473
|
+
this.emit(exports.MultistreamConnectionEventNames.SetLocalDescriptionOnSuccess, description);
|
|
14474
|
+
});
|
|
14475
|
+
this.pc.on(PeerConnection.Events.SetRemoteDescriptionOnSuccess, (description) => {
|
|
14476
|
+
this.emit(exports.MultistreamConnectionEventNames.SetRemoteDescriptionOnSuccess, description);
|
|
14477
|
+
});
|
|
14478
|
+
}
|
|
14442
14479
|
getConnectionState() {
|
|
14443
14480
|
return this.pc.getConnectionState();
|
|
14444
14481
|
}
|