@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/cjs/index.js
CHANGED
|
@@ -4755,10 +4755,11 @@ adapterFactory({window: typeof window === 'undefined' ? undefined : window});
|
|
|
4755
4755
|
/**
|
|
4756
4756
|
* Creates an RTCPeerConnection.
|
|
4757
4757
|
*
|
|
4758
|
+
* @param configuration - Config to the RTCPeerConnection constructor.
|
|
4758
4759
|
* @returns An RTCPeerConnection instance.
|
|
4759
4760
|
*/
|
|
4760
|
-
function createRTCPeerConnection() {
|
|
4761
|
-
return new RTCPeerConnection();
|
|
4761
|
+
function createRTCPeerConnection(configuration) {
|
|
4762
|
+
return new RTCPeerConnection(configuration);
|
|
4762
4763
|
}
|
|
4763
4764
|
|
|
4764
4765
|
/**
|
|
@@ -4780,11 +4781,13 @@ var PeerConnectionEvents;
|
|
|
4780
4781
|
class PeerConnection extends EventEmitter$2 {
|
|
4781
4782
|
/**
|
|
4782
4783
|
* Creates an instance of the RTCPeerConnection.
|
|
4784
|
+
*
|
|
4785
|
+
* @param configuration - Config to the RTCPeerConnection constructor.
|
|
4783
4786
|
*/
|
|
4784
|
-
constructor() {
|
|
4787
|
+
constructor(configuration) {
|
|
4785
4788
|
super();
|
|
4786
4789
|
logger$3.log('PeerConnection init');
|
|
4787
|
-
this.pc = createRTCPeerConnection();
|
|
4790
|
+
this.pc = createRTCPeerConnection(configuration);
|
|
4788
4791
|
this.connectionStateHandler = new ConnectionStateHandler(() => {
|
|
4789
4792
|
return {
|
|
4790
4793
|
connectionState: this.pc.connectionState,
|
|
@@ -9520,6 +9523,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
9520
9523
|
disableSimulcast: false,
|
|
9521
9524
|
streamSignalingMode: 'SSRC',
|
|
9522
9525
|
bundlePolicy: 'compat',
|
|
9526
|
+
iceServers: undefined,
|
|
9523
9527
|
};
|
|
9524
9528
|
class MultistreamConnection extends EventEmitter {
|
|
9525
9529
|
constructor(userOptions = {}) {
|
|
@@ -9551,7 +9555,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
9551
9555
|
initializePeerConnection() {
|
|
9552
9556
|
var _a;
|
|
9553
9557
|
(_a = this.pc) === null || _a === void 0 ? void 0 : _a.close();
|
|
9554
|
-
this.pc = new PeerConnection();
|
|
9558
|
+
this.pc = new PeerConnection({ iceServers: this.options.iceServers });
|
|
9555
9559
|
this.pc.on(PeerConnection.Events.ConnectionStateChange, (state) => this.emit(exports.MultistreamConnectionEventNames.ConnectionStateUpdate, state));
|
|
9556
9560
|
this.attachMetricsObserver();
|
|
9557
9561
|
this.createDataChannel();
|