@bitmovin/api-sdk 1.168.0 → 1.169.0
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/README.md +1 -1
- package/dist/bitmovin-api-sdk.browser.js +87 -41
- package/dist/bitmovin-api-sdk.browser.min.js +1 -1
- package/dist/common/RestClient.js +1 -1
- package/dist/encoding/encodings/live/hd/HdApi.d.ts +9 -0
- package/dist/encoding/encodings/live/hd/HdApi.js +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5987,7 +5987,7 @@ var HeaderHandler = /** @class */ (function (_super) {
|
|
|
5987
5987
|
var headers = {
|
|
5988
5988
|
'X-Api-Key': apiKey,
|
|
5989
5989
|
'X-Api-Client': 'bitmovin-api-sdk-javascript',
|
|
5990
|
-
'X-Api-Client-Version': '1.
|
|
5990
|
+
'X-Api-Client-Version': '1.169.0',
|
|
5991
5991
|
'Content-Type': 'application/json'
|
|
5992
5992
|
};
|
|
5993
5993
|
if (tenantOrgId) {
|
|
@@ -15792,6 +15792,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15792
15792
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15793
15793
|
var BaseAPI_1 = __webpack_require__(/*! ../../../../common/BaseAPI */ "./common/BaseAPI.ts");
|
|
15794
15794
|
var Mapper_1 = __webpack_require__(/*! ../../../../common/Mapper */ "./common/Mapper.ts");
|
|
15795
|
+
var BitmovinResponse_1 = __webpack_require__(/*! ../../../../models/BitmovinResponse */ "./models/BitmovinResponse.ts");
|
|
15795
15796
|
var StartLiveChannelEncodingRequest_1 = __webpack_require__(/*! ../../../../models/StartLiveChannelEncodingRequest */ "./models/StartLiveChannelEncodingRequest.ts");
|
|
15796
15797
|
/**
|
|
15797
15798
|
* HdApi - object-oriented interface
|
|
@@ -15818,6 +15819,21 @@ var HdApi = /** @class */ (function (_super) {
|
|
|
15818
15819
|
return (0, Mapper_1.map)(response, StartLiveChannelEncodingRequest_1.default);
|
|
15819
15820
|
});
|
|
15820
15821
|
};
|
|
15822
|
+
/**
|
|
15823
|
+
* @summary Start Live Encoding
|
|
15824
|
+
* @param {string} encodingId Id of the encoding
|
|
15825
|
+
* @param {StartLiveChannelEncodingRequest} startLiveChannelEncodingRequest Live Encoding startup options
|
|
15826
|
+
* @throws {BitmovinError}
|
|
15827
|
+
* @memberof HdApi
|
|
15828
|
+
*/
|
|
15829
|
+
HdApi.prototype.start = function (encodingId, startLiveChannelEncodingRequest) {
|
|
15830
|
+
var pathParamMap = {
|
|
15831
|
+
encoding_id: encodingId
|
|
15832
|
+
};
|
|
15833
|
+
return this.restClient.post('/encoding/encodings/{encoding_id}/live/hd/start', pathParamMap, startLiveChannelEncodingRequest).then(function (response) {
|
|
15834
|
+
return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
|
|
15835
|
+
});
|
|
15836
|
+
};
|
|
15821
15837
|
return HdApi;
|
|
15822
15838
|
}(BaseAPI_1.BaseAPI));
|
|
15823
15839
|
exports["default"] = HdApi;
|
|
@@ -91000,17 +91016,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
91000
91016
|
/* harmony export */ Response: () => (/* binding */ Response),
|
|
91001
91017
|
/* harmony export */ fetch: () => (/* binding */ fetch)
|
|
91002
91018
|
/* harmony export */ });
|
|
91003
|
-
|
|
91019
|
+
/* eslint-disable no-prototype-builtins */
|
|
91020
|
+
var g =
|
|
91004
91021
|
(typeof globalThis !== 'undefined' && globalThis) ||
|
|
91005
91022
|
(typeof self !== 'undefined' && self) ||
|
|
91006
|
-
|
|
91023
|
+
// eslint-disable-next-line no-undef
|
|
91024
|
+
(typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g) ||
|
|
91025
|
+
{}
|
|
91007
91026
|
|
|
91008
91027
|
var support = {
|
|
91009
|
-
searchParams: 'URLSearchParams' in
|
|
91010
|
-
iterable: 'Symbol' in
|
|
91028
|
+
searchParams: 'URLSearchParams' in g,
|
|
91029
|
+
iterable: 'Symbol' in g && 'iterator' in Symbol,
|
|
91011
91030
|
blob:
|
|
91012
|
-
'FileReader' in
|
|
91013
|
-
'Blob' in
|
|
91031
|
+
'FileReader' in g &&
|
|
91032
|
+
'Blob' in g &&
|
|
91014
91033
|
(function() {
|
|
91015
91034
|
try {
|
|
91016
91035
|
new Blob()
|
|
@@ -91019,8 +91038,8 @@ var support = {
|
|
|
91019
91038
|
return false
|
|
91020
91039
|
}
|
|
91021
91040
|
})(),
|
|
91022
|
-
formData: 'FormData' in
|
|
91023
|
-
arrayBuffer: 'ArrayBuffer' in
|
|
91041
|
+
formData: 'FormData' in g,
|
|
91042
|
+
arrayBuffer: 'ArrayBuffer' in g
|
|
91024
91043
|
}
|
|
91025
91044
|
|
|
91026
91045
|
function isDataView(obj) {
|
|
@@ -91091,6 +91110,9 @@ function Headers(headers) {
|
|
|
91091
91110
|
}, this)
|
|
91092
91111
|
} else if (Array.isArray(headers)) {
|
|
91093
91112
|
headers.forEach(function(header) {
|
|
91113
|
+
if (header.length != 2) {
|
|
91114
|
+
throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
|
|
91115
|
+
}
|
|
91094
91116
|
this.append(header[0], header[1])
|
|
91095
91117
|
}, this)
|
|
91096
91118
|
} else if (headers) {
|
|
@@ -91161,6 +91183,7 @@ if (support.iterable) {
|
|
|
91161
91183
|
}
|
|
91162
91184
|
|
|
91163
91185
|
function consumed(body) {
|
|
91186
|
+
if (body._noBody) return
|
|
91164
91187
|
if (body.bodyUsed) {
|
|
91165
91188
|
return Promise.reject(new TypeError('Already read'))
|
|
91166
91189
|
}
|
|
@@ -91188,7 +91211,9 @@ function readBlobAsArrayBuffer(blob) {
|
|
|
91188
91211
|
function readBlobAsText(blob) {
|
|
91189
91212
|
var reader = new FileReader()
|
|
91190
91213
|
var promise = fileReaderReady(reader)
|
|
91191
|
-
|
|
91214
|
+
var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)
|
|
91215
|
+
var encoding = match ? match[1] : 'utf-8'
|
|
91216
|
+
reader.readAsText(blob, encoding)
|
|
91192
91217
|
return promise
|
|
91193
91218
|
}
|
|
91194
91219
|
|
|
@@ -91226,9 +91251,11 @@ function Body() {
|
|
|
91226
91251
|
semantic of setting Request.bodyUsed in the constructor before
|
|
91227
91252
|
_initBody is called.
|
|
91228
91253
|
*/
|
|
91254
|
+
// eslint-disable-next-line no-self-assign
|
|
91229
91255
|
this.bodyUsed = this.bodyUsed
|
|
91230
91256
|
this._bodyInit = body
|
|
91231
91257
|
if (!body) {
|
|
91258
|
+
this._noBody = true;
|
|
91232
91259
|
this._bodyText = ''
|
|
91233
91260
|
} else if (typeof body === 'string') {
|
|
91234
91261
|
this._bodyText = body
|
|
@@ -91276,26 +91303,27 @@ function Body() {
|
|
|
91276
91303
|
return Promise.resolve(new Blob([this._bodyText]))
|
|
91277
91304
|
}
|
|
91278
91305
|
}
|
|
91306
|
+
}
|
|
91279
91307
|
|
|
91280
|
-
|
|
91281
|
-
|
|
91282
|
-
|
|
91283
|
-
|
|
91284
|
-
|
|
91285
|
-
|
|
91286
|
-
|
|
91287
|
-
|
|
91288
|
-
this._bodyArrayBuffer.
|
|
91289
|
-
|
|
91290
|
-
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
|
91291
|
-
)
|
|
91308
|
+
this.arrayBuffer = function() {
|
|
91309
|
+
if (this._bodyArrayBuffer) {
|
|
91310
|
+
var isConsumed = consumed(this)
|
|
91311
|
+
if (isConsumed) {
|
|
91312
|
+
return isConsumed
|
|
91313
|
+
} else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
|
|
91314
|
+
return Promise.resolve(
|
|
91315
|
+
this._bodyArrayBuffer.buffer.slice(
|
|
91316
|
+
this._bodyArrayBuffer.byteOffset,
|
|
91317
|
+
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
|
91292
91318
|
)
|
|
91293
|
-
|
|
91294
|
-
return Promise.resolve(this._bodyArrayBuffer)
|
|
91295
|
-
}
|
|
91319
|
+
)
|
|
91296
91320
|
} else {
|
|
91297
|
-
return
|
|
91321
|
+
return Promise.resolve(this._bodyArrayBuffer)
|
|
91298
91322
|
}
|
|
91323
|
+
} else if (support.blob) {
|
|
91324
|
+
return this.blob().then(readBlobAsArrayBuffer)
|
|
91325
|
+
} else {
|
|
91326
|
+
throw new Error('could not read as ArrayBuffer')
|
|
91299
91327
|
}
|
|
91300
91328
|
}
|
|
91301
91329
|
|
|
@@ -91330,7 +91358,7 @@ function Body() {
|
|
|
91330
91358
|
}
|
|
91331
91359
|
|
|
91332
91360
|
// HTTP methods whose capitalization should be normalized
|
|
91333
|
-
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
|
|
91361
|
+
var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']
|
|
91334
91362
|
|
|
91335
91363
|
function normalizeMethod(method) {
|
|
91336
91364
|
var upcased = method.toUpperCase()
|
|
@@ -91371,7 +91399,12 @@ function Request(input, options) {
|
|
|
91371
91399
|
}
|
|
91372
91400
|
this.method = normalizeMethod(options.method || this.method || 'GET')
|
|
91373
91401
|
this.mode = options.mode || this.mode || null
|
|
91374
|
-
this.signal = options.signal || this.signal
|
|
91402
|
+
this.signal = options.signal || this.signal || (function () {
|
|
91403
|
+
if ('AbortController' in g) {
|
|
91404
|
+
var ctrl = new AbortController();
|
|
91405
|
+
return ctrl.signal;
|
|
91406
|
+
}
|
|
91407
|
+
}());
|
|
91375
91408
|
this.referrer = null
|
|
91376
91409
|
|
|
91377
91410
|
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
@@ -91433,7 +91466,11 @@ function parseHeaders(rawHeaders) {
|
|
|
91433
91466
|
var key = parts.shift().trim()
|
|
91434
91467
|
if (key) {
|
|
91435
91468
|
var value = parts.join(':').trim()
|
|
91436
|
-
|
|
91469
|
+
try {
|
|
91470
|
+
headers.append(key, value)
|
|
91471
|
+
} catch (error) {
|
|
91472
|
+
console.warn('Response ' + error.message)
|
|
91473
|
+
}
|
|
91437
91474
|
}
|
|
91438
91475
|
})
|
|
91439
91476
|
return headers
|
|
@@ -91451,6 +91488,9 @@ function Response(bodyInit, options) {
|
|
|
91451
91488
|
|
|
91452
91489
|
this.type = 'default'
|
|
91453
91490
|
this.status = options.status === undefined ? 200 : options.status
|
|
91491
|
+
if (this.status < 200 || this.status > 599) {
|
|
91492
|
+
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
|
|
91493
|
+
}
|
|
91454
91494
|
this.ok = this.status >= 200 && this.status < 300
|
|
91455
91495
|
this.statusText = options.statusText === undefined ? '' : '' + options.statusText
|
|
91456
91496
|
this.headers = new Headers(options.headers)
|
|
@@ -91470,7 +91510,8 @@ Response.prototype.clone = function() {
|
|
|
91470
91510
|
}
|
|
91471
91511
|
|
|
91472
91512
|
Response.error = function() {
|
|
91473
|
-
var response = new Response(null, {status:
|
|
91513
|
+
var response = new Response(null, {status: 200, statusText: ''})
|
|
91514
|
+
response.status = 0
|
|
91474
91515
|
response.type = 'error'
|
|
91475
91516
|
return response
|
|
91476
91517
|
}
|
|
@@ -91485,7 +91526,7 @@ Response.redirect = function(url, status) {
|
|
|
91485
91526
|
return new Response(null, {status: status, headers: {location: url}})
|
|
91486
91527
|
}
|
|
91487
91528
|
|
|
91488
|
-
var DOMException =
|
|
91529
|
+
var DOMException = g.DOMException
|
|
91489
91530
|
try {
|
|
91490
91531
|
new DOMException()
|
|
91491
91532
|
} catch (err) {
|
|
@@ -91546,7 +91587,7 @@ function fetch(input, init) {
|
|
|
91546
91587
|
|
|
91547
91588
|
function fixUrl(url) {
|
|
91548
91589
|
try {
|
|
91549
|
-
return url === '' &&
|
|
91590
|
+
return url === '' && g.location.href ? g.location.href : url
|
|
91550
91591
|
} catch (e) {
|
|
91551
91592
|
return url
|
|
91552
91593
|
}
|
|
@@ -91564,18 +91605,23 @@ function fetch(input, init) {
|
|
|
91564
91605
|
if (support.blob) {
|
|
91565
91606
|
xhr.responseType = 'blob'
|
|
91566
91607
|
} else if (
|
|
91567
|
-
support.arrayBuffer
|
|
91568
|
-
request.headers.get('Content-Type') &&
|
|
91569
|
-
request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1
|
|
91608
|
+
support.arrayBuffer
|
|
91570
91609
|
) {
|
|
91571
91610
|
xhr.responseType = 'arraybuffer'
|
|
91572
91611
|
}
|
|
91573
91612
|
}
|
|
91574
91613
|
|
|
91575
|
-
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
|
|
91614
|
+
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
|
|
91615
|
+
var names = [];
|
|
91576
91616
|
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
|
|
91617
|
+
names.push(normalizeName(name))
|
|
91577
91618
|
xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
|
|
91578
91619
|
})
|
|
91620
|
+
request.headers.forEach(function(value, name) {
|
|
91621
|
+
if (names.indexOf(name) === -1) {
|
|
91622
|
+
xhr.setRequestHeader(name, value)
|
|
91623
|
+
}
|
|
91624
|
+
})
|
|
91579
91625
|
} else {
|
|
91580
91626
|
request.headers.forEach(function(value, name) {
|
|
91581
91627
|
xhr.setRequestHeader(name, value)
|
|
@@ -91599,11 +91645,11 @@ function fetch(input, init) {
|
|
|
91599
91645
|
|
|
91600
91646
|
fetch.polyfill = true
|
|
91601
91647
|
|
|
91602
|
-
if (!
|
|
91603
|
-
|
|
91604
|
-
|
|
91605
|
-
|
|
91606
|
-
|
|
91648
|
+
if (!g.fetch) {
|
|
91649
|
+
g.fetch = fetch
|
|
91650
|
+
g.Headers = Headers
|
|
91651
|
+
g.Request = Request
|
|
91652
|
+
g.Response = Response
|
|
91607
91653
|
}
|
|
91608
91654
|
|
|
91609
91655
|
|