@webex/web-client-media-engine 1.34.6 → 1.35.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 +9 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +9 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -4751,10 +4751,11 @@ adapterFactory({window: typeof window === 'undefined' ? undefined : window});
|
|
|
4751
4751
|
/**
|
|
4752
4752
|
* Creates an RTCPeerConnection.
|
|
4753
4753
|
*
|
|
4754
|
+
* @param configuration - Config to the RTCPeerConnection constructor.
|
|
4754
4755
|
* @returns An RTCPeerConnection instance.
|
|
4755
4756
|
*/
|
|
4756
|
-
function createRTCPeerConnection() {
|
|
4757
|
-
return new RTCPeerConnection();
|
|
4757
|
+
function createRTCPeerConnection(configuration) {
|
|
4758
|
+
return new RTCPeerConnection(configuration);
|
|
4758
4759
|
}
|
|
4759
4760
|
|
|
4760
4761
|
/**
|
|
@@ -4776,11 +4777,13 @@ var PeerConnectionEvents;
|
|
|
4776
4777
|
class PeerConnection extends EventEmitter$2 {
|
|
4777
4778
|
/**
|
|
4778
4779
|
* Creates an instance of the RTCPeerConnection.
|
|
4780
|
+
*
|
|
4781
|
+
* @param configuration - Config to the RTCPeerConnection constructor.
|
|
4779
4782
|
*/
|
|
4780
|
-
constructor() {
|
|
4783
|
+
constructor(configuration) {
|
|
4781
4784
|
super();
|
|
4782
4785
|
logger$3.log('PeerConnection init');
|
|
4783
|
-
this.pc = createRTCPeerConnection();
|
|
4786
|
+
this.pc = createRTCPeerConnection(configuration);
|
|
4784
4787
|
this.connectionStateHandler = new ConnectionStateHandler(() => {
|
|
4785
4788
|
return {
|
|
4786
4789
|
connectionState: this.pc.connectionState,
|
|
@@ -9516,6 +9519,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
9516
9519
|
disableSimulcast: false,
|
|
9517
9520
|
streamSignalingMode: 'SSRC',
|
|
9518
9521
|
bundlePolicy: 'compat',
|
|
9522
|
+
iceServers: undefined,
|
|
9519
9523
|
};
|
|
9520
9524
|
class MultistreamConnection extends EventEmitter {
|
|
9521
9525
|
constructor(userOptions = {}) {
|
|
@@ -9547,7 +9551,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
9547
9551
|
initializePeerConnection() {
|
|
9548
9552
|
var _a;
|
|
9549
9553
|
(_a = this.pc) === null || _a === void 0 ? void 0 : _a.close();
|
|
9550
|
-
this.pc = new PeerConnection();
|
|
9554
|
+
this.pc = new PeerConnection({ iceServers: this.options.iceServers });
|
|
9551
9555
|
this.pc.on(PeerConnection.Events.ConnectionStateChange, (state) => this.emit(MultistreamConnectionEventNames.ConnectionStateUpdate, state));
|
|
9552
9556
|
this.attachMetricsObserver();
|
|
9553
9557
|
this.createDataChannel();
|