@webex/web-client-media-engine 3.35.0 → 3.35.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 +51 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +51 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -7154,6 +7154,29 @@ function isValidActiveSpeakerNotificationMsg(msg) {
|
|
|
7154
7154
|
const maybeActiveSpeakerNotificationMsg = msg;
|
|
7155
7155
|
return Boolean(maybeActiveSpeakerNotificationMsg.seqNum && maybeActiveSpeakerNotificationMsg.csis);
|
|
7156
7156
|
}
|
|
7157
|
+
function isValidAV1Codec(msg) {
|
|
7158
|
+
if (typeof msg !== 'object' || msg === null) {
|
|
7159
|
+
return false;
|
|
7160
|
+
}
|
|
7161
|
+
const maybeAV1Codec = msg;
|
|
7162
|
+
return (maybeAV1Codec.levelIdx >= 0 &&
|
|
7163
|
+
maybeAV1Codec.tier >= 0 &&
|
|
7164
|
+
Boolean(maybeAV1Codec.maxWidth) &&
|
|
7165
|
+
Boolean(maybeAV1Codec.maxHeight) &&
|
|
7166
|
+
Boolean(maybeAV1Codec.maxPicSize) &&
|
|
7167
|
+
Boolean(maybeAV1Codec.maxDecodeRate));
|
|
7168
|
+
}
|
|
7169
|
+
function areAV1CodecsEqual(left, right) {
|
|
7170
|
+
if (left === undefined || right === undefined) {
|
|
7171
|
+
return left === right;
|
|
7172
|
+
}
|
|
7173
|
+
return (left.levelIdx === right.levelIdx &&
|
|
7174
|
+
left.tier === right.tier &&
|
|
7175
|
+
left.maxWidth === right.maxWidth &&
|
|
7176
|
+
left.maxHeight === right.maxHeight &&
|
|
7177
|
+
left.maxPicSize === right.maxPicSize &&
|
|
7178
|
+
left.maxDecodeRate === right.maxDecodeRate);
|
|
7179
|
+
}
|
|
7157
7180
|
|
|
7158
7181
|
class H264Codec {
|
|
7159
7182
|
constructor(maxFs, maxFps, maxMbps, maxWidth, maxHeight) {
|
|
@@ -7164,6 +7187,13 @@ class H264Codec {
|
|
|
7164
7187
|
this.maxHeight = maxHeight;
|
|
7165
7188
|
}
|
|
7166
7189
|
}
|
|
7190
|
+
function isValidH264Codec(msg) {
|
|
7191
|
+
if (typeof msg !== 'object' || msg === null) {
|
|
7192
|
+
return false;
|
|
7193
|
+
}
|
|
7194
|
+
const maybeH264Codec = msg;
|
|
7195
|
+
return Boolean(maybeH264Codec.maxFs && maybeH264Codec.maxFps && maybeH264Codec.maxMbps);
|
|
7196
|
+
}
|
|
7167
7197
|
function areH264CodecsEqual(left, right) {
|
|
7168
7198
|
if (left === undefined || right === undefined) {
|
|
7169
7199
|
return left === right;
|
|
@@ -7176,13 +7206,31 @@ function areH264CodecsEqual(left, right) {
|
|
|
7176
7206
|
}
|
|
7177
7207
|
|
|
7178
7208
|
class CodecInfo$1 {
|
|
7179
|
-
constructor(payloadType,
|
|
7209
|
+
constructor(payloadType, codec) {
|
|
7180
7210
|
this.payloadType = payloadType;
|
|
7181
|
-
|
|
7211
|
+
if (isValidAV1Codec(codec))
|
|
7212
|
+
this.av1 = codec;
|
|
7213
|
+
if (isValidH264Codec(codec))
|
|
7214
|
+
this.h264 = codec;
|
|
7215
|
+
}
|
|
7216
|
+
static fromH264(payloadType, h264) {
|
|
7217
|
+
return new CodecInfo$1(payloadType, h264);
|
|
7218
|
+
}
|
|
7219
|
+
static fromAv1(payloadType, av1) {
|
|
7220
|
+
return new CodecInfo$1(payloadType, av1);
|
|
7182
7221
|
}
|
|
7183
7222
|
}
|
|
7184
7223
|
function areCodecInfosEqual(left, right) {
|
|
7185
|
-
|
|
7224
|
+
if (left.payloadType !== right.payloadType) {
|
|
7225
|
+
return false;
|
|
7226
|
+
}
|
|
7227
|
+
if (isValidH264Codec(left.h264) && isValidH264Codec(right.h264)) {
|
|
7228
|
+
return areH264CodecsEqual(left.h264, right.h264);
|
|
7229
|
+
}
|
|
7230
|
+
if (isValidAV1Codec(left.av1) && isValidAV1Codec(right.av1)) {
|
|
7231
|
+
return areAV1CodecsEqual(left.av1, right.av1);
|
|
7232
|
+
}
|
|
7233
|
+
return false;
|
|
7186
7234
|
}
|
|
7187
7235
|
|
|
7188
7236
|
var JmpMsgType;
|