msc-node
Version:
mediasoup client side Node.js library
21 lines (20 loc) • 555 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = void 0;
const ScalabilityModeRegex = new RegExp('^[LS]([1-9]\\d{0,1})T([1-9]\\d{0,1})');
function parse(scalabilityMode) {
const match = ScalabilityModeRegex.exec(scalabilityMode || '');
if (match) {
return {
spatialLayers: Number(match[1]),
temporalLayers: Number(match[2])
};
}
else {
return {
spatialLayers: 1,
temporalLayers: 1
};
}
}
exports.parse = parse;