@webex/web-client-media-engine 3.24.0 → 3.24.2
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 +29 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +29 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -609,8 +609,11 @@ function createDisplayStreamWithAudio(displayStreamConstructor, systemAudioStrea
|
|
|
609
609
|
function getDevices(deviceKind) {
|
|
610
610
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
611
611
|
let devices;
|
|
612
|
+
const deviceKinds = deviceKind
|
|
613
|
+
? [deviceKind]
|
|
614
|
+
: [DeviceKind$1.AudioInput, DeviceKind$1.VideoInput];
|
|
612
615
|
try {
|
|
613
|
-
devices = yield ensureDevicePermissions(
|
|
616
|
+
devices = yield ensureDevicePermissions(deviceKinds, enumerateDevices);
|
|
614
617
|
}
|
|
615
618
|
catch (error) {
|
|
616
619
|
throw new WebrtcCoreError(WebrtcCoreErrorType.DEVICE_PERMISSION_DENIED, 'Failed to ensure device permissions');
|
|
@@ -7794,6 +7797,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7794
7797
|
var trace = function (name, payload, timestamp) {
|
|
7795
7798
|
logger({ timestamp: timestamp ? Math.round(timestamp) : Date.now(), name: name, payload: payload });
|
|
7796
7799
|
};
|
|
7800
|
+
trace('rtcConfiguration', makeEvent(JSON.stringify(pc.getConfiguration())));
|
|
7797
7801
|
var origPeerConnection = window.RTCPeerConnection;
|
|
7798
7802
|
pc.addEventListener('icecandidate', function (e) {
|
|
7799
7803
|
if (e.candidate) {
|
|
@@ -7827,7 +7831,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7827
7831
|
pc.addEventListener('datachannel', function (event) {
|
|
7828
7832
|
trace('ondatachannel', makeEvent("".concat(event.channel.id, ": ").concat(event.channel.label)));
|
|
7829
7833
|
});
|
|
7830
|
-
['
|
|
7834
|
+
['close'].forEach(function (method) {
|
|
7831
7835
|
var nativeMethod = origPeerConnection.prototype[method];
|
|
7832
7836
|
if (nativeMethod) {
|
|
7833
7837
|
origPeerConnection.prototype[method] = function () {
|
|
@@ -7836,6 +7840,26 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7836
7840
|
};
|
|
7837
7841
|
}
|
|
7838
7842
|
});
|
|
7843
|
+
['createDataChannel'].forEach(function (method) {
|
|
7844
|
+
var nativeMethod = origPeerConnection.prototype[method];
|
|
7845
|
+
if (nativeMethod) {
|
|
7846
|
+
origPeerConnection.prototype[method] = function () {
|
|
7847
|
+
trace("on".concat(method), makeEvent(method));
|
|
7848
|
+
var dataChannel = nativeMethod.apply(this, arguments);
|
|
7849
|
+
dataChannel.addEventListener('open', function () {
|
|
7850
|
+
trace("ondataChannelOpen", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label)));
|
|
7851
|
+
});
|
|
7852
|
+
dataChannel.addEventListener('close', function () {
|
|
7853
|
+
trace("ondataChannelClose", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label)));
|
|
7854
|
+
});
|
|
7855
|
+
dataChannel.addEventListener('error', function (event) {
|
|
7856
|
+
var error = event.error;
|
|
7857
|
+
trace("ondataChannelError", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label, ": ").concat(error.errorDetail)));
|
|
7858
|
+
});
|
|
7859
|
+
return dataChannel;
|
|
7860
|
+
};
|
|
7861
|
+
}
|
|
7862
|
+
});
|
|
7839
7863
|
['addStream', 'removeStream'].forEach(function (method) {
|
|
7840
7864
|
var nativeMethod = origPeerConnection.prototype[method];
|
|
7841
7865
|
if (nativeMethod) {
|
|
@@ -7910,7 +7934,9 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7910
7934
|
origPeerConnection.prototype[method] = function () {
|
|
7911
7935
|
var _this = this;
|
|
7912
7936
|
var args = arguments;
|
|
7913
|
-
trace("on".concat(method), makeEvent(method === 'addIceCandidate'
|
|
7937
|
+
trace("on".concat(method), makeEvent(method === 'addIceCandidate'
|
|
7938
|
+
? arguments[0]
|
|
7939
|
+
: (arguments[0] ? arguments[0].sdp : 'undefined')));
|
|
7914
7940
|
return nativeMethod.apply(this, [arguments[0]]).then(function () {
|
|
7915
7941
|
var _a;
|
|
7916
7942
|
trace("on".concat(method, "OnSuccess"), makeEvent('success'));
|