@webex/web-client-media-engine 3.38.2 → 3.39.1
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 +18 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +19 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -7979,6 +7979,13 @@ class WebCapabilities {
|
|
|
7979
7979
|
? CapabilityState.CAPABLE
|
|
7980
7980
|
: CapabilityState.NOT_CAPABLE;
|
|
7981
7981
|
}
|
|
7982
|
+
static supportsEncodingCodec() {
|
|
7983
|
+
return ((BrowserInfo.isChrome() || BrowserInfo.isEdge()) &&
|
|
7984
|
+
BrowserInfo.isVersionGreaterThanOrEqualTo('140')) ||
|
|
7985
|
+
(BrowserInfo.isFirefox() && BrowserInfo.isVersionGreaterThanOrEqualTo('145'))
|
|
7986
|
+
? CapabilityState.CAPABLE
|
|
7987
|
+
: CapabilityState.NOT_CAPABLE;
|
|
7988
|
+
}
|
|
7982
7989
|
}
|
|
7983
7990
|
|
|
7984
7991
|
exports.WcmeErrorType = void 0;
|
|
@@ -8507,11 +8514,6 @@ function getFrameSizeForPicSize(maxPicSize) {
|
|
|
8507
8514
|
}
|
|
8508
8515
|
return Math.ceil(maxPicSize / macroBlockSize);
|
|
8509
8516
|
}
|
|
8510
|
-
function isEncodingCodecSupported() {
|
|
8511
|
-
return (((BrowserInfo.isChrome() || BrowserInfo.isEdge()) &&
|
|
8512
|
-
BrowserInfo.isVersionGreaterThanOrEqualTo('140')) ||
|
|
8513
|
-
(BrowserInfo.isFirefox() && BrowserInfo.isVersionGreaterThanOrEqualTo('145')));
|
|
8514
|
-
}
|
|
8515
8517
|
function getSupportedAudioCodecs() {
|
|
8516
8518
|
return [exports.MediaCodecMimeType.OPUS];
|
|
8517
8519
|
}
|
|
@@ -8520,12 +8522,18 @@ function getSupportedVideoCodecs(options = {
|
|
|
8520
8522
|
}) {
|
|
8521
8523
|
const supportedCodecs = [exports.MediaCodecMimeType.H264, exports.MediaCodecMimeType.RTX];
|
|
8522
8524
|
if (options.includeAV1) {
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8525
|
+
const supportsEncodingCodec = WebCapabilities.supportsEncodingCodec() === CapabilityState.CAPABLE;
|
|
8526
|
+
const supportsAV1 = WebCapabilities.isCapableOfReceivingVideoCodec(exports.MediaCodecMimeType.AV1) ===
|
|
8527
|
+
CapabilityState.CAPABLE;
|
|
8528
|
+
if (!supportsEncodingCodec) {
|
|
8527
8529
|
logger.warn('AV1 codec was requested but browser does not support encoding.codec');
|
|
8528
8530
|
}
|
|
8531
|
+
if (!supportsAV1) {
|
|
8532
|
+
logger.warn('AV1 codec was requested but browser does not support it');
|
|
8533
|
+
}
|
|
8534
|
+
if (supportsEncodingCodec && supportsAV1) {
|
|
8535
|
+
supportedCodecs.push(exports.MediaCodecMimeType.AV1);
|
|
8536
|
+
}
|
|
8529
8537
|
}
|
|
8530
8538
|
return supportedCodecs;
|
|
8531
8539
|
}
|
|
@@ -15519,15 +15527,7 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
15519
15527
|
const encodingParams = requestedIdEncodingParamsMap.get(index);
|
|
15520
15528
|
encoding.active = !!encodingParams;
|
|
15521
15529
|
if (shouldUpdateSelectedCodec) {
|
|
15522
|
-
|
|
15523
|
-
const isCodecCapable = selectedCodec &&
|
|
15524
|
-
WebCapabilities.isCapableOfReceivingVideoCodec(selectedCodec.mimeType) ===
|
|
15525
|
-
CapabilityState.CAPABLE;
|
|
15526
|
-
if (!isCodecCapable) {
|
|
15527
|
-
logErrorAndThrow(exports.WcmeErrorType.INVALID_CODEC_PARAMS, `Codec ${selectedCodec === null || selectedCodec === void 0 ? void 0 : selectedCodec.mimeType} is not supported by the browser.`);
|
|
15528
|
-
}
|
|
15529
|
-
encoding.codec = selectedCodec;
|
|
15530
|
-
}
|
|
15530
|
+
encoding.codec = selectedCodec;
|
|
15531
15531
|
}
|
|
15532
15532
|
if (encodingParams) {
|
|
15533
15533
|
const { maxPayloadBitsPerSecond } = encodingParams;
|
|
@@ -17014,7 +17014,6 @@ exports.getMediaType = getMediaType;
|
|
|
17014
17014
|
exports.getRecommendedMaxBitrateForFrameSize = getRecommendedMaxBitrateForFrameSize;
|
|
17015
17015
|
exports.getRecommendedMaxBitrateForPicSize = getRecommendedMaxBitrateForPicSize;
|
|
17016
17016
|
exports.getVideoInputDevices = getVideoInputDevices;
|
|
17017
|
-
exports.isEncodingCodecSupported = isEncodingCodecSupported;
|
|
17018
17017
|
exports.logErrorAndThrow = logErrorAndThrow;
|
|
17019
17018
|
exports.setLogHandler = setLogHandler;
|
|
17020
17019
|
exports.setLogLevel = setLogLevel;
|