UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

83 lines (82 loc) 3.5 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var BaseAPI_1 = require("../../../../../common/BaseAPI"); var Mapper_1 = require("../../../../../common/Mapper"); var PlayreadyApi_1 = require("./playready/PlayreadyApi"); var ClearkeyApi_1 = require("./clearkey/ClearkeyApi"); var WidevineApi_1 = require("./widevine/WidevineApi"); var MarlinApi_1 = require("./marlin/MarlinApi"); var CencApi_1 = require("./cenc/CencApi"); var SpekeApi_1 = require("./speke/SpekeApi"); var Drm_1 = require("../../../../../models/Drm"); var PaginationResponse_1 = require("../../../../../models/PaginationResponse"); /** * DrmApi - object-oriented interface * @export * @class DrmApi * @extends {BaseAPI} */ var DrmApi = /** @class */ (function (_super) { __extends(DrmApi, _super); function DrmApi(configuration) { var _this = _super.call(this, configuration) || this; _this.playready = new PlayreadyApi_1.default(configuration); _this.clearkey = new ClearkeyApi_1.default(configuration); _this.widevine = new WidevineApi_1.default(configuration); _this.marlin = new MarlinApi_1.default(configuration); _this.cenc = new CencApi_1.default(configuration); _this.speke = new SpekeApi_1.default(configuration); return _this; } /** * @summary DRM Details of an MP4 muxing * @param {string} encodingId Id of the encoding. * @param {string} muxingId Id of the an MP4 muxing * @param {string} drmId Id of the DRM. * @throws {BitmovinError} * @memberof DrmApi */ DrmApi.prototype.get = function (encodingId, muxingId, drmId) { var pathParamMap = { encoding_id: encodingId, muxing_id: muxingId, drm_id: drmId }; return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/mp4/{muxing_id}/drm/{drm_id}', pathParamMap).then(function (response) { return (0, Mapper_1.map)(response, Drm_1.default); }); }; /** * @summary List all DRM configurations of an MP4 muxing * @param {string} encodingId Id of the encoding. * @param {string} muxingId Id of the MP4 muxing * @throws {BitmovinError} * @memberof DrmApi */ DrmApi.prototype.list = function (encodingId, muxingId) { var pathParamMap = { encoding_id: encodingId, muxing_id: muxingId }; return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/mp4/{muxing_id}/drm', pathParamMap).then(function (response) { return new PaginationResponse_1.default(response, Drm_1.default); }); }; return DrmApi; }(BaseAPI_1.BaseAPI)); exports.default = DrmApi;