@eluvio/elv-client-js 4.2.22 → 4.2.24
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/ElvClient-min.js +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/ElvPermissionsClient-min.js +1 -1
- package/dist/ElvWalletClient-min.js +1 -1
- package/dist/ElvWalletClient-node-min.js +1 -1
- package/dist/src/Crypto.js +33 -5
- package/dist/src/ElvClient.js +4 -17
- package/dist/src/FrameClient.js +1 -1
- package/dist/src/client/ContentAccess.js +75 -101
- package/dist/src/client/ContentManagement.js +43 -69
- package/dist/src/client/Contracts.js +2 -2
- package/dist/src/client/LiveStream.js +938 -542
- package/package.json +1 -1
- package/src/Crypto.js +13 -1
- package/src/ElvClient.js +1 -3
- package/src/FrameClient.js +2 -0
- package/src/client/ContentAccess.js +2 -6
- package/src/client/ContentManagement.js +2 -6
- package/src/client/Contracts.js +1 -1
- package/src/client/LiveStream.js +337 -92
- package/utilities/LiveOutputs.js +9 -4
|
@@ -365,7 +365,7 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
365
365
|
_liveRecordingConfig2,
|
|
366
366
|
_liveRecordingConfig3,
|
|
367
367
|
_liveRecordingConfig5;
|
|
368
|
-
var libraryId, objectId, url, _ref12$finalize, finalize, liveRecordingConfig, _ref12$options, options, defaultName, existingObject, contentType, adminGroups, _tenantMeta$content_t, tenantId, tenantMeta, tenantContentAdminGroup, editResponse, _editResponse, writeToken, accessGroup, _options$name, name, displayTitle, description, _options$permission, permission, ingressNodeId, _options$initializeDr, initializeDrm, playoutFormats, invalid, metadata, oldProfile, returnResponse, _liveRecordingConfig4, formats, finalizeResponse, _liveRecordingConfig6, slug;
|
|
368
|
+
var libraryId, objectId, url, _ref12$finalize, finalize, liveRecordingConfig, _ref12$options, options, defaultName, existingObject, contentType, adminGroups, _tenantContentAdminGr, _tenantMeta$content_t, tenantId, tenantMeta, tenantContentAdminGroup, editResponse, _editResponse, writeToken, accessGroup, _options$name, name, displayTitle, description, _options$permission, permission, ingressNodeId, _options$initializeDr, initializeDrm, playoutFormats, invalid, metadata, oldProfile, returnResponse, _liveRecordingConfig4, formats, finalizeResponse, _liveRecordingConfig6, slug;
|
|
369
369
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
370
370
|
while (1) switch (_context8.prev = _context8.next) {
|
|
371
371
|
case 0:
|
|
@@ -387,65 +387,80 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
387
387
|
});
|
|
388
388
|
case 10:
|
|
389
389
|
tenantMeta = _context8.sent;
|
|
390
|
-
_context8.
|
|
390
|
+
_context8.prev = 11;
|
|
391
|
+
_context8.next = 14;
|
|
391
392
|
return this.ContentAdminGroup({
|
|
392
393
|
tenantContractId: tenantId
|
|
393
394
|
});
|
|
394
|
-
case
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
if (contentType) {
|
|
399
|
-
_context8.next = 18;
|
|
395
|
+
case 14:
|
|
396
|
+
_context8.t0 = _context8.sent;
|
|
397
|
+
if (_context8.t0) {
|
|
398
|
+
_context8.next = 17;
|
|
400
399
|
break;
|
|
401
400
|
}
|
|
402
|
-
|
|
403
|
-
case
|
|
401
|
+
_context8.t0 = [];
|
|
402
|
+
case 17:
|
|
403
|
+
tenantContentAdminGroup = _context8.t0;
|
|
404
404
|
_context8.next = 23;
|
|
405
405
|
break;
|
|
406
406
|
case 20:
|
|
407
407
|
_context8.prev = 20;
|
|
408
|
-
_context8.
|
|
409
|
-
console.error("Unable to load
|
|
408
|
+
_context8.t1 = _context8["catch"](11);
|
|
409
|
+
console.error("Unable to load content admin group", _context8.t1);
|
|
410
410
|
case 23:
|
|
411
|
+
adminGroups = adminGroups.concat((_tenantContentAdminGr = tenantContentAdminGroup) !== null && _tenantContentAdminGr !== void 0 ? _tenantContentAdminGr : []);
|
|
412
|
+
contentType = (_tenantMeta$content_t = tenantMeta.content_types) === null || _tenantMeta$content_t === void 0 ? void 0 : _tenantMeta$content_t.live_stream;
|
|
413
|
+
if (contentType) {
|
|
414
|
+
_context8.next = 27;
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
throw new Error("No content type configured for tenant ".concat(tenantId));
|
|
418
|
+
case 27:
|
|
419
|
+
_context8.next = 32;
|
|
420
|
+
break;
|
|
421
|
+
case 29:
|
|
422
|
+
_context8.prev = 29;
|
|
423
|
+
_context8.t2 = _context8["catch"](4);
|
|
424
|
+
console.error("Unable to load tenant data", _context8.t2);
|
|
425
|
+
case 32:
|
|
411
426
|
if (!objectId) {
|
|
412
|
-
_context8.next =
|
|
427
|
+
_context8.next = 42;
|
|
413
428
|
break;
|
|
414
429
|
}
|
|
415
|
-
_context8.next =
|
|
430
|
+
_context8.next = 35;
|
|
416
431
|
return this.EditContentObject({
|
|
417
432
|
libraryId: libraryId,
|
|
418
433
|
objectId: objectId
|
|
419
434
|
});
|
|
420
|
-
case
|
|
435
|
+
case 35:
|
|
421
436
|
editResponse = _context8.sent;
|
|
422
437
|
if (url) {
|
|
423
|
-
_context8.next =
|
|
438
|
+
_context8.next = 40;
|
|
424
439
|
break;
|
|
425
440
|
}
|
|
426
|
-
_context8.next =
|
|
441
|
+
_context8.next = 39;
|
|
427
442
|
return this.ContentObjectMetadata({
|
|
428
443
|
libraryId: libraryId,
|
|
429
444
|
objectId: objectId,
|
|
430
445
|
metadataSubtree: "live_recording_config/url"
|
|
431
446
|
});
|
|
432
|
-
case
|
|
447
|
+
case 39:
|
|
433
448
|
url = _context8.sent;
|
|
434
|
-
case
|
|
435
|
-
_context8.next =
|
|
449
|
+
case 40:
|
|
450
|
+
_context8.next = 46;
|
|
436
451
|
break;
|
|
437
|
-
case
|
|
438
|
-
_context8.next =
|
|
452
|
+
case 42:
|
|
453
|
+
_context8.next = 44;
|
|
439
454
|
return this.CreateContentObject({
|
|
440
455
|
libraryId: libraryId,
|
|
441
456
|
options: {
|
|
442
457
|
type: contentType
|
|
443
458
|
}
|
|
444
459
|
});
|
|
445
|
-
case
|
|
460
|
+
case 44:
|
|
446
461
|
editResponse = _context8.sent;
|
|
447
462
|
objectId = editResponse.objectId;
|
|
448
|
-
case
|
|
463
|
+
case 46:
|
|
449
464
|
_editResponse = editResponse, writeToken = _editResponse.writeToken;
|
|
450
465
|
accessGroup = options.accessGroup, _options$name = options.name, name = _options$name === void 0 ? defaultName : _options$name, displayTitle = options.displayTitle, description = options.description, _options$permission = options.permission, permission = _options$permission === void 0 ? "editable" : _options$permission, ingressNodeId = options.ingressNodeId, _options$initializeDr = options.initializeDrm, initializeDrm = _options$initializeDr === void 0 ? true : _options$initializeDr;
|
|
451
466
|
if (!liveRecordingConfig) {
|
|
@@ -453,23 +468,23 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
453
468
|
}
|
|
454
469
|
playoutFormats = (_liveRecordingConfig = liveRecordingConfig) === null || _liveRecordingConfig === void 0 || (_liveRecordingConfig = _liveRecordingConfig.playout_config) === null || _liveRecordingConfig === void 0 ? void 0 : _liveRecordingConfig.playout_formats;
|
|
455
470
|
if (!playoutFormats) {
|
|
456
|
-
_context8.next =
|
|
471
|
+
_context8.next = 54;
|
|
457
472
|
break;
|
|
458
473
|
}
|
|
459
474
|
invalid = playoutFormats.filter(function (f) {
|
|
460
475
|
return !VALID_PLAYOUT_FORMATS.includes(f);
|
|
461
476
|
});
|
|
462
477
|
if (!(invalid.length > 0)) {
|
|
463
|
-
_context8.next =
|
|
478
|
+
_context8.next = 54;
|
|
464
479
|
break;
|
|
465
480
|
}
|
|
466
481
|
throw new Error("Invalid playout_formats: ".concat(invalid.join(", "), ". Valid values: ").concat(VALID_PLAYOUT_FORMATS.join(", ")));
|
|
467
|
-
case
|
|
482
|
+
case 54:
|
|
468
483
|
liveRecordingConfig.url = url;
|
|
469
484
|
liveRecordingConfig.ingress_node_id = ingressNodeId;
|
|
470
485
|
|
|
471
486
|
// Add access group permissions
|
|
472
|
-
_context8.next =
|
|
487
|
+
_context8.next = 58;
|
|
473
488
|
return Promise.all(adminGroups.filter(function (el) {
|
|
474
489
|
return !!el;
|
|
475
490
|
}).map( /*#__PURE__*/function () {
|
|
@@ -499,7 +514,7 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
499
514
|
return _ref14.apply(this, arguments);
|
|
500
515
|
};
|
|
501
516
|
}()));
|
|
502
|
-
case
|
|
517
|
+
case 58:
|
|
503
518
|
metadata = {
|
|
504
519
|
"public": {
|
|
505
520
|
name: name,
|
|
@@ -514,27 +529,27 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
514
529
|
},
|
|
515
530
|
"live_recording_config": liveRecordingConfig
|
|
516
531
|
};
|
|
517
|
-
_context8.next =
|
|
532
|
+
_context8.next = 61;
|
|
518
533
|
return this.ContentObjectMetadata({
|
|
519
534
|
libraryId: libraryId,
|
|
520
535
|
objectId: objectId,
|
|
521
536
|
metadataSubtree: "live_recording_config/name"
|
|
522
537
|
});
|
|
523
|
-
case
|
|
538
|
+
case 61:
|
|
524
539
|
oldProfile = _context8.sent;
|
|
525
540
|
if ((_liveRecordingConfig2 = liveRecordingConfig) !== null && _liveRecordingConfig2 !== void 0 && _liveRecordingConfig2.name && liveRecordingConfig.name !== oldProfile) {
|
|
526
541
|
metadata["public"].asset_metadata.profile_last_updated = new Date().toISOString();
|
|
527
542
|
}
|
|
528
|
-
_context8.next =
|
|
543
|
+
_context8.next = 65;
|
|
529
544
|
return this.MergeMetadata({
|
|
530
545
|
libraryId: libraryId,
|
|
531
546
|
objectId: objectId,
|
|
532
547
|
writeToken: writeToken,
|
|
533
548
|
metadata: metadata
|
|
534
549
|
});
|
|
535
|
-
case
|
|
536
|
-
_context8.prev =
|
|
537
|
-
_context8.next =
|
|
550
|
+
case 65:
|
|
551
|
+
_context8.prev = 65;
|
|
552
|
+
_context8.next = 68;
|
|
538
553
|
return this.CreateLinks({
|
|
539
554
|
libraryId: libraryId,
|
|
540
555
|
objectId: objectId,
|
|
@@ -545,31 +560,31 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
545
560
|
target: "playout/default/options.json"
|
|
546
561
|
}]
|
|
547
562
|
});
|
|
548
|
-
case
|
|
549
|
-
_context8.next =
|
|
563
|
+
case 68:
|
|
564
|
+
_context8.next = 73;
|
|
550
565
|
break;
|
|
551
|
-
case
|
|
552
|
-
_context8.prev =
|
|
553
|
-
_context8.
|
|
554
|
-
console.log("Failed to create links", _context8.
|
|
555
|
-
case
|
|
556
|
-
_context8.next =
|
|
566
|
+
case 70:
|
|
567
|
+
_context8.prev = 70;
|
|
568
|
+
_context8.t3 = _context8["catch"](65);
|
|
569
|
+
console.log("Failed to create links", _context8.t3);
|
|
570
|
+
case 73:
|
|
571
|
+
_context8.next = 75;
|
|
557
572
|
return this.SetPermission({
|
|
558
573
|
objectId: objectId,
|
|
559
574
|
permission: permission,
|
|
560
575
|
writeToken: writeToken
|
|
561
576
|
});
|
|
562
|
-
case
|
|
577
|
+
case 75:
|
|
563
578
|
returnResponse = {
|
|
564
579
|
objectId: objectId,
|
|
565
580
|
libraryId: libraryId,
|
|
566
581
|
writeToken: writeToken
|
|
567
582
|
}; // If stream info is provided, continue to configure
|
|
568
583
|
if (!((_liveRecordingConfig3 = liveRecordingConfig) !== null && _liveRecordingConfig3 !== void 0 && _liveRecordingConfig3.input_stream_info)) {
|
|
569
|
-
_context8.next =
|
|
584
|
+
_context8.next = 79;
|
|
570
585
|
break;
|
|
571
586
|
}
|
|
572
|
-
_context8.next =
|
|
587
|
+
_context8.next = 79;
|
|
573
588
|
return this.StreamConfig({
|
|
574
589
|
name: objectId,
|
|
575
590
|
liveRecordingConfig: liveRecordingConfig,
|
|
@@ -577,13 +592,13 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
577
592
|
writeToken: writeToken,
|
|
578
593
|
finalize: false
|
|
579
594
|
});
|
|
580
|
-
case
|
|
595
|
+
case 79:
|
|
581
596
|
if (!initializeDrm) {
|
|
582
|
-
_context8.next =
|
|
597
|
+
_context8.next = 83;
|
|
583
598
|
break;
|
|
584
599
|
}
|
|
585
600
|
formats = (_liveRecordingConfig4 = liveRecordingConfig) === null || _liveRecordingConfig4 === void 0 || (_liveRecordingConfig4 = _liveRecordingConfig4.playout_config) === null || _liveRecordingConfig4 === void 0 ? void 0 : _liveRecordingConfig4.playout_formats;
|
|
586
|
-
_context8.next =
|
|
601
|
+
_context8.next = 83;
|
|
587
602
|
return this.StreamInitialize({
|
|
588
603
|
name: objectId,
|
|
589
604
|
drm: (formats || []).some(function (el) {
|
|
@@ -593,48 +608,48 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
593
608
|
writeToken: writeToken,
|
|
594
609
|
finalize: false
|
|
595
610
|
});
|
|
596
|
-
case
|
|
611
|
+
case 83:
|
|
597
612
|
if (!finalize) {
|
|
598
|
-
_context8.next =
|
|
613
|
+
_context8.next = 88;
|
|
599
614
|
break;
|
|
600
615
|
}
|
|
601
|
-
_context8.next =
|
|
616
|
+
_context8.next = 86;
|
|
602
617
|
return this.FinalizeContentObject({
|
|
603
618
|
libraryId: libraryId,
|
|
604
619
|
objectId: objectId,
|
|
605
620
|
writeToken: writeToken,
|
|
606
621
|
commitMessage: existingObject ? "Update live stream" : "Create live stream"
|
|
607
622
|
});
|
|
608
|
-
case
|
|
623
|
+
case 86:
|
|
609
624
|
finalizeResponse = _context8.sent;
|
|
610
625
|
returnResponse = _objectSpread(_objectSpread({}, returnResponse), finalizeResponse);
|
|
611
|
-
case
|
|
626
|
+
case 88:
|
|
612
627
|
if (!(finalize && (_liveRecordingConfig5 = liveRecordingConfig) !== null && _liveRecordingConfig5 !== void 0 && _liveRecordingConfig5.name)) {
|
|
613
|
-
_context8.next =
|
|
628
|
+
_context8.next = 92;
|
|
614
629
|
break;
|
|
615
630
|
}
|
|
616
631
|
slug = slugify((_liveRecordingConfig6 = liveRecordingConfig) === null || _liveRecordingConfig6 === void 0 ? void 0 : _liveRecordingConfig6.name);
|
|
617
|
-
_context8.next =
|
|
632
|
+
_context8.next = 92;
|
|
618
633
|
return this.StreamAssignProfile({
|
|
619
634
|
profileSlug: slug,
|
|
620
635
|
streamObjectId: objectId
|
|
621
636
|
});
|
|
622
|
-
case
|
|
637
|
+
case 92:
|
|
623
638
|
if (!options.linkToSite) {
|
|
624
|
-
_context8.next =
|
|
639
|
+
_context8.next = 95;
|
|
625
640
|
break;
|
|
626
641
|
}
|
|
627
|
-
_context8.next =
|
|
642
|
+
_context8.next = 95;
|
|
628
643
|
return this.StreamLinkToSite({
|
|
629
644
|
objectId: objectId
|
|
630
645
|
});
|
|
631
|
-
case
|
|
646
|
+
case 95:
|
|
632
647
|
return _context8.abrupt("return", returnResponse);
|
|
633
|
-
case
|
|
648
|
+
case 96:
|
|
634
649
|
case "end":
|
|
635
650
|
return _context8.stop();
|
|
636
651
|
}
|
|
637
|
-
}, _callee8, this, [[4, 20], [
|
|
652
|
+
}, _callee8, this, [[4, 29], [11, 20], [65, 70]]);
|
|
638
653
|
}));
|
|
639
654
|
return function (_x7) {
|
|
640
655
|
return _ref13.apply(this, arguments);
|
|
@@ -1270,7 +1285,7 @@ var StreamGenerateOffering = /*#__PURE__*/function () {
|
|
|
1270
1285
|
*/
|
|
1271
1286
|
exports.StreamStatus = /*#__PURE__*/function () {
|
|
1272
1287
|
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref23) {
|
|
1273
|
-
var name, _ref23$showParams, showParams, writeToken, objectId, status, _mainMeta$live_record, _mainMeta$live_record2, libraryId, mainMeta, fabURI, edgeWriteToken, edgeMeta, recordings, sequence, period, tlro, videoLastFinalizationTimeEpochSec, videoFinalizedParts, sinceLastFinalize, recordingPeriod, insertions, i, insertionTimeSinceEpoch, state, lroStatus, playoutUrls, playout_options, hls_clear_enabled, hls_aes128_enabled, hls_sample_aes_enabled, networkInfo, token, embed_net;
|
|
1288
|
+
var name, _ref23$showParams, showParams, writeToken, objectId, status, _mainMeta$live_record, _mainMeta$live_record2, libraryId, mainMeta, fabURI, edgeWriteToken, edgeMeta, recordings, sequence, period, tlro, videoLastFinalizationTimeEpochSec, videoFinalizedParts, sinceLastFinalize, recordingPeriod, insertions, i, insertionTimeSinceEpoch, state, lroStatus, retrievePlayoutOptions, playoutUrls, playout_options, hls_clear_enabled, hls_aes128_enabled, hls_sample_aes_enabled, networkInfo, token, embed_net;
|
|
1274
1289
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
1275
1290
|
while (1) switch (_context13.prev = _context13.next) {
|
|
1276
1291
|
case 0:
|
|
@@ -1457,79 +1472,78 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
1457
1472
|
return _context13.abrupt("return", status);
|
|
1458
1473
|
case 89:
|
|
1459
1474
|
// Convert LRO 'state' to desired 'state'
|
|
1460
|
-
if (state
|
|
1461
|
-
state = "starting"; // The LRO returns 'running' even if the source hasn't connected
|
|
1462
|
-
} else if (state == "terminated") {
|
|
1475
|
+
if (state == "terminated") {
|
|
1463
1476
|
state = "stopped"; // The LRO reports 'terminated' which for the recording means 'stopped'
|
|
1464
1477
|
}
|
|
1465
1478
|
|
|
1466
1479
|
status.state = state;
|
|
1467
|
-
|
|
1468
|
-
|
|
1480
|
+
retrievePlayoutOptions = false; // PENDING(SS) make this a function argument if useful for the API
|
|
1481
|
+
if (!(retrievePlayoutOptions && state === "running")) {
|
|
1482
|
+
_context13.next = 128;
|
|
1469
1483
|
break;
|
|
1470
1484
|
}
|
|
1471
1485
|
playoutUrls = {};
|
|
1472
|
-
_context13.prev =
|
|
1473
|
-
_context13.next =
|
|
1486
|
+
_context13.prev = 94;
|
|
1487
|
+
_context13.next = 97;
|
|
1474
1488
|
return this.PlayoutOptions({
|
|
1475
1489
|
objectId: objectId
|
|
1476
1490
|
});
|
|
1477
|
-
case
|
|
1491
|
+
case 97:
|
|
1478
1492
|
playout_options = _context13.sent;
|
|
1479
|
-
_context13.next =
|
|
1493
|
+
_context13.next = 103;
|
|
1480
1494
|
break;
|
|
1481
|
-
case
|
|
1482
|
-
_context13.prev =
|
|
1483
|
-
_context13.t4 = _context13["catch"](
|
|
1495
|
+
case 100:
|
|
1496
|
+
_context13.prev = 100;
|
|
1497
|
+
_context13.t4 = _context13["catch"](94);
|
|
1484
1498
|
console.log("Failed to generate playout options based on 'default' offering:", _context13.t4);
|
|
1485
|
-
case
|
|
1499
|
+
case 103:
|
|
1486
1500
|
hls_clear_enabled = playout_options && playout_options.hls && playout_options.hls.playoutMethods && playout_options.hls.playoutMethods.clear !== undefined;
|
|
1487
1501
|
if (!hls_clear_enabled) {
|
|
1488
|
-
_context13.next =
|
|
1502
|
+
_context13.next = 108;
|
|
1489
1503
|
break;
|
|
1490
1504
|
}
|
|
1491
|
-
_context13.next =
|
|
1505
|
+
_context13.next = 107;
|
|
1492
1506
|
return this.FabricUrl({
|
|
1493
1507
|
libraryId: libraryId,
|
|
1494
1508
|
objectId: objectId,
|
|
1495
1509
|
rep: "playout/default/hls-clear/playlist.m3u8"
|
|
1496
1510
|
});
|
|
1497
|
-
case 106:
|
|
1498
|
-
playoutUrls.hlsClear = _context13.sent;
|
|
1499
1511
|
case 107:
|
|
1512
|
+
playoutUrls.hlsClear = _context13.sent;
|
|
1513
|
+
case 108:
|
|
1500
1514
|
hls_aes128_enabled = playout_options && playout_options.hls && playout_options.hls.playoutMethods && playout_options.hls.playoutMethods["aes-128"] !== undefined;
|
|
1501
1515
|
if (!hls_aes128_enabled) {
|
|
1502
|
-
_context13.next =
|
|
1516
|
+
_context13.next = 113;
|
|
1503
1517
|
break;
|
|
1504
1518
|
}
|
|
1505
|
-
_context13.next =
|
|
1519
|
+
_context13.next = 112;
|
|
1506
1520
|
return this.FabricUrl({
|
|
1507
1521
|
libraryId: libraryId,
|
|
1508
1522
|
objectId: objectId,
|
|
1509
1523
|
rep: "playout/default/hls-aes128/playlist.m3u8"
|
|
1510
1524
|
});
|
|
1511
|
-
case 111:
|
|
1512
|
-
playoutUrls.hlsAes128 = _context13.sent;
|
|
1513
1525
|
case 112:
|
|
1526
|
+
playoutUrls.hlsAes128 = _context13.sent;
|
|
1527
|
+
case 113:
|
|
1514
1528
|
hls_sample_aes_enabled = playout_options && playout_options.hls && playout_options.hls.playoutMethods && playout_options.hls.playoutMethods["sample-aes"] !== undefined;
|
|
1515
1529
|
if (!hls_sample_aes_enabled) {
|
|
1516
|
-
_context13.next =
|
|
1530
|
+
_context13.next = 118;
|
|
1517
1531
|
break;
|
|
1518
1532
|
}
|
|
1519
|
-
_context13.next =
|
|
1533
|
+
_context13.next = 117;
|
|
1520
1534
|
return this.FabricUrl({
|
|
1521
1535
|
libraryId: libraryId,
|
|
1522
1536
|
objectId: objectId,
|
|
1523
1537
|
rep: "playout/default/hls-sample-aes/playlist.m3u8"
|
|
1524
1538
|
});
|
|
1525
|
-
case 116:
|
|
1526
|
-
playoutUrls.hlsSampleAes = _context13.sent;
|
|
1527
1539
|
case 117:
|
|
1528
|
-
|
|
1540
|
+
playoutUrls.hlsSampleAes = _context13.sent;
|
|
1541
|
+
case 118:
|
|
1542
|
+
_context13.next = 120;
|
|
1529
1543
|
return this.NetworkInfo();
|
|
1530
|
-
case
|
|
1544
|
+
case 120:
|
|
1531
1545
|
networkInfo = _context13.sent;
|
|
1532
|
-
_context13.next =
|
|
1546
|
+
_context13.next = 123;
|
|
1533
1547
|
return this.authClient.AuthorizationToken({
|
|
1534
1548
|
libraryId: libraryId,
|
|
1535
1549
|
objectId: objectId,
|
|
@@ -1537,7 +1551,7 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
1537
1551
|
noCache: true,
|
|
1538
1552
|
noAuth: true
|
|
1539
1553
|
});
|
|
1540
|
-
case
|
|
1554
|
+
case 123:
|
|
1541
1555
|
token = _context13.sent;
|
|
1542
1556
|
embed_net = "main";
|
|
1543
1557
|
if (networkInfo.name.includes("demo")) {
|
|
@@ -1545,20 +1559,20 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
1545
1559
|
}
|
|
1546
1560
|
playoutUrls.embedUrl = "https://embed.v3.contentfabric.io/?net=".concat(embed_net, "&p&ct=h&oid=").concat(objectId, "&mt=lv&ath=").concat(token);
|
|
1547
1561
|
status.playoutUrls = playoutUrls;
|
|
1548
|
-
case
|
|
1549
|
-
_context13.next =
|
|
1562
|
+
case 128:
|
|
1563
|
+
_context13.next = 133;
|
|
1550
1564
|
break;
|
|
1551
|
-
case
|
|
1552
|
-
_context13.prev =
|
|
1565
|
+
case 130:
|
|
1566
|
+
_context13.prev = 130;
|
|
1553
1567
|
_context13.t5 = _context13["catch"](3);
|
|
1554
1568
|
console.error(_context13.t5);
|
|
1555
|
-
case 132:
|
|
1556
|
-
return _context13.abrupt("return", status);
|
|
1557
1569
|
case 133:
|
|
1570
|
+
return _context13.abrupt("return", status);
|
|
1571
|
+
case 134:
|
|
1558
1572
|
case "end":
|
|
1559
1573
|
return _context13.stop();
|
|
1560
1574
|
}
|
|
1561
|
-
}, _callee13, this, [[3,
|
|
1575
|
+
}, _callee13, this, [[3, 130], [34, 40], [68, 83], [94, 100]]);
|
|
1562
1576
|
}));
|
|
1563
1577
|
return function (_x12) {
|
|
1564
1578
|
return _ref24.apply(this, arguments);
|
|
@@ -3496,7 +3510,7 @@ exports.StreamUpdateConfig = /*#__PURE__*/function () {
|
|
|
3496
3510
|
exports.StreamConfig = /*#__PURE__*/function () {
|
|
3497
3511
|
var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref54) {
|
|
3498
3512
|
var _liveRecordingConfigP;
|
|
3499
|
-
var name, liveRecordingConfig, inputStreamInfo, writeToken, _ref54$finalize, finalize, objectId, probe, currentStatus, libraryId, status, liveRecordingConfigProfile, savedConfigData, lrcMeta, nodeId, _liveRecordingConfigP2, _split, _probe$format, urlProtocol, probeProtocol, streamData, _liveRecordingConfigP3, node, endpoint, streamHref, _yield$GetNodeFromStr2, liveConf, liveRecordingConfigMeta, e, _liveRecordingConfigM, formats, allowList, filteredMeta;
|
|
3513
|
+
var name, liveRecordingConfig, inputStreamInfo, writeToken, _ref54$finalize, finalize, objectId, probe, currentStatus, libraryId, status, liveRecordingConfigProfile, savedConfigData, lrcMeta, nodeId, _liveRecordingConfigP2, _split, _probe$format, urlProtocol, probeProtocol, streamData, _liveRecordingConfigP3, node, endpoint, streamHref, _yield$GetNodeFromStr2, currentLiveRecordingMeta, liveConf, liveRecordingConfigMeta, e, _liveRecordingConfigM, formats, allowList, filteredMeta;
|
|
3500
3514
|
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
3501
3515
|
while (1) switch (_context28.prev = _context28.next) {
|
|
3502
3516
|
case 0:
|
|
@@ -3613,6 +3627,15 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
3613
3627
|
case 45:
|
|
3614
3628
|
probe = _context28.sent;
|
|
3615
3629
|
case 46:
|
|
3630
|
+
_context28.next = 48;
|
|
3631
|
+
return this.ContentObjectMetadata({
|
|
3632
|
+
libraryId: libraryId,
|
|
3633
|
+
objectId: objectId,
|
|
3634
|
+
writeToken: writeToken,
|
|
3635
|
+
metadataSubtree: "/live_recording"
|
|
3636
|
+
});
|
|
3637
|
+
case 48:
|
|
3638
|
+
currentLiveRecordingMeta = _context28.sent;
|
|
3616
3639
|
// Create live recording config
|
|
3617
3640
|
liveConf = new LiveConf({
|
|
3618
3641
|
url: liveRecordingConfigProfile.url,
|
|
@@ -3621,7 +3644,8 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
3621
3644
|
nodeUrl: endpoint,
|
|
3622
3645
|
includeAVSegDurations: false,
|
|
3623
3646
|
overwriteOriginUrl: false,
|
|
3624
|
-
syncAudioToVideo: true
|
|
3647
|
+
syncAudioToVideo: true,
|
|
3648
|
+
liveRecordingMeta: currentLiveRecordingMeta
|
|
3625
3649
|
});
|
|
3626
3650
|
liveRecordingConfigMeta = liveConf.generateLiveConf({
|
|
3627
3651
|
customSettings: {
|
|
@@ -3629,24 +3653,24 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
3629
3653
|
}
|
|
3630
3654
|
}); // Store live recording config into the stream object
|
|
3631
3655
|
if (writeToken) {
|
|
3632
|
-
_context28.next =
|
|
3656
|
+
_context28.next = 56;
|
|
3633
3657
|
break;
|
|
3634
3658
|
}
|
|
3635
|
-
_context28.next =
|
|
3659
|
+
_context28.next = 54;
|
|
3636
3660
|
return this.EditContentObject({
|
|
3637
3661
|
libraryId: libraryId,
|
|
3638
3662
|
objectId: objectId
|
|
3639
3663
|
});
|
|
3640
|
-
case
|
|
3664
|
+
case 54:
|
|
3641
3665
|
e = _context28.sent;
|
|
3642
3666
|
writeToken = e.write_token;
|
|
3643
|
-
case
|
|
3667
|
+
case 56:
|
|
3644
3668
|
if (!["uninitialized", "unconfigured"].includes(currentStatus.state)) {
|
|
3645
|
-
_context28.next =
|
|
3669
|
+
_context28.next = 60;
|
|
3646
3670
|
break;
|
|
3647
3671
|
}
|
|
3648
3672
|
formats = liveRecordingConfigMeta === null || liveRecordingConfigMeta === void 0 || (_liveRecordingConfigM = liveRecordingConfigMeta.live_recording.playout_config) === null || _liveRecordingConfigM === void 0 ? void 0 : _liveRecordingConfigM.playout_formats;
|
|
3649
|
-
_context28.next =
|
|
3673
|
+
_context28.next = 60;
|
|
3650
3674
|
return this.StreamInitialize({
|
|
3651
3675
|
name: objectId,
|
|
3652
3676
|
drm: (formats || []).some(function (el) {
|
|
@@ -3656,14 +3680,14 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
3656
3680
|
writeToken: writeToken,
|
|
3657
3681
|
finalize: false
|
|
3658
3682
|
});
|
|
3659
|
-
case
|
|
3683
|
+
case 60:
|
|
3660
3684
|
allowList = ["fabric_config", "playout_config", "recording_config", "url"];
|
|
3661
3685
|
filteredMeta = Object.fromEntries(Object.entries(liveRecordingConfigMeta.live_recording || {}).filter(function (_ref56) {
|
|
3662
3686
|
var _ref57 = _slicedToArray(_ref56, 1),
|
|
3663
3687
|
key = _ref57[0];
|
|
3664
3688
|
return allowList.includes(key);
|
|
3665
3689
|
}));
|
|
3666
|
-
_context28.next =
|
|
3690
|
+
_context28.next = 64;
|
|
3667
3691
|
return this.ReplaceMetadata({
|
|
3668
3692
|
libraryId: libraryId,
|
|
3669
3693
|
objectId: objectId,
|
|
@@ -3671,8 +3695,8 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
3671
3695
|
metadataSubtree: "live_recording",
|
|
3672
3696
|
metadata: filteredMeta
|
|
3673
3697
|
});
|
|
3674
|
-
case
|
|
3675
|
-
_context28.next =
|
|
3698
|
+
case 64:
|
|
3699
|
+
_context28.next = 66;
|
|
3676
3700
|
return this.ReplaceMetadata({
|
|
3677
3701
|
libraryId: libraryId,
|
|
3678
3702
|
objectId: objectId,
|
|
@@ -3680,23 +3704,23 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
3680
3704
|
metadataSubtree: "live_recording_config/probe_info",
|
|
3681
3705
|
metadata: probe
|
|
3682
3706
|
});
|
|
3683
|
-
case
|
|
3707
|
+
case 66:
|
|
3684
3708
|
if (!finalize) {
|
|
3685
|
-
_context28.next =
|
|
3709
|
+
_context28.next = 70;
|
|
3686
3710
|
break;
|
|
3687
3711
|
}
|
|
3688
|
-
_context28.next =
|
|
3712
|
+
_context28.next = 69;
|
|
3689
3713
|
return this.FinalizeContentObject({
|
|
3690
3714
|
libraryId: libraryId,
|
|
3691
3715
|
objectId: objectId,
|
|
3692
3716
|
writeToken: writeToken,
|
|
3693
3717
|
commitMessage: "Apply live stream configuration"
|
|
3694
3718
|
});
|
|
3695
|
-
case
|
|
3719
|
+
case 69:
|
|
3696
3720
|
status.fin = _context28.sent;
|
|
3697
|
-
case
|
|
3721
|
+
case 70:
|
|
3698
3722
|
return _context28.abrupt("return", status);
|
|
3699
|
-
case
|
|
3723
|
+
case 71:
|
|
3700
3724
|
case "end":
|
|
3701
3725
|
return _context28.stop();
|
|
3702
3726
|
}
|
|
@@ -4500,33 +4524,159 @@ exports.AuditStream = /*#__PURE__*/function () {
|
|
|
4500
4524
|
}();
|
|
4501
4525
|
|
|
4502
4526
|
/**
|
|
4527
|
+
* Live output delivery protocols. Exactly one delivery block is present on a LiveOutput.
|
|
4528
|
+
*
|
|
4529
|
+
* @typedef {("srt_pull"|"srt_push"|"rtp"|"udp")} OutputDeliveryType
|
|
4530
|
+
*/
|
|
4531
|
+
|
|
4532
|
+
/**
|
|
4533
|
+
* Input stream configuration for a live output.
|
|
4534
|
+
*
|
|
4535
|
+
* @typedef {Object} OutputInput
|
|
4536
|
+
* @property {string=} stream - Object ID of the input stream, e.g. "iq__AAA" (null to disconnect)
|
|
4537
|
+
* @property {string=} offering - Offering key of the input stream to use (optional; defaults to the stream's default offering)
|
|
4538
|
+
*/
|
|
4539
|
+
|
|
4540
|
+
/**
|
|
4541
|
+
* Configuration options for an SRT connection. Durations are strings with time units
|
|
4542
|
+
* (e.g. "200ms", "1s500ms") or a floating-point number of seconds (e.g. 0.2, 1.5).
|
|
4543
|
+
*
|
|
4544
|
+
* @typedef {Object} SrtConnectionConfig
|
|
4545
|
+
* @property {string=} connection_timeout - Connection timeout (SRTO_CONNTIMEO)
|
|
4546
|
+
* @property {boolean=} enforced_encryption - Reject connection if parties set different passphrase (SRTO_ENFORCEDENCRYPTION)
|
|
4547
|
+
* @property {number=} fc - Flow control window size in packets (SRTO_FC)
|
|
4548
|
+
* @property {number=} input_bw - Input bandwidth in bytes per second (SRTO_INPUTBW)
|
|
4549
|
+
* @property {number=} iptos - IP socket "type of service" (SRTO_IPTOS)
|
|
4550
|
+
* @property {number=} ipttl - IP socket "time to live" option (SRTO_IPTTL)
|
|
4551
|
+
* @property {number=} km_pre_announce - Duration of stream encryption key switchover in packets (SRTO_KMPREANNOUNCE)
|
|
4552
|
+
* @property {number=} km_refresh_rate - Stream encryption key refresh rate in packets (SRTO_KMREFRESHRATE)
|
|
4553
|
+
* @property {string=} latency - Maximum accepted transmission latency (SRTO_LATENCY)
|
|
4554
|
+
* @property {number=} loss_max_ttl - Packet reorder tolerance (SRTO_LOSSMAXTTL)
|
|
4555
|
+
* @property {number=} max_bw - Bandwidth limit in bytes per second (SRTO_MAXBW)
|
|
4556
|
+
* @property {boolean=} message_api - Enable SRT message mode (SRTO_MESSAGEAPI)
|
|
4557
|
+
* @property {number=} min_input_bw - Minimum input bandwidth (SRTO_MININPUTBW)
|
|
4558
|
+
* @property {number=} min_version - Minimum SRT library version of a peer, encoded (major<<16)|(minor<<8)|patch (SRTO_MINVERSION)
|
|
4559
|
+
* @property {number=} mss - MTU size (SRTO_MSS)
|
|
4560
|
+
* @property {number=} overhead_bw - Limit bandwidth overhead in percent (SRTO_OHEADBW)
|
|
4561
|
+
* @property {number=} payload_size - Maximum payload size in bytes (SRTO_PAYLOADSIZE)
|
|
4562
|
+
* @property {number=} pb_keylen - Length of encryption key in bytes (SRTO_PBKEYLEN): 0=disabled, 16=AES-128, 24=AES-192, 32=AES-256
|
|
4563
|
+
* @property {string=} peer_idle_timeout - Peer idle timeout (SRTO_PEERIDLETIMEO)
|
|
4564
|
+
* @property {string=} peer_latency - Minimum receiver latency to be requested by sender (SRTO_PEERLATENCY)
|
|
4565
|
+
* @property {number=} receiver_buffer_size - Receiver buffer size in bytes (SRTO_RCVBUF)
|
|
4566
|
+
* @property {string=} receiver_latency - Receiver-side latency (SRTO_RCVLATENCY)
|
|
4567
|
+
* @property {number=} send_buffer_size - Sender buffer size in bytes (SRTO_SNDBUF)
|
|
4568
|
+
* @property {string=} send_drop_delay - Sender's delay before dropping packets (SRTO_SNDDROPDELAY)
|
|
4569
|
+
* @property {boolean=} allow_peer_ip_change - Allow a new IP address to start sending data on an existing socket id
|
|
4570
|
+
*/
|
|
4571
|
+
|
|
4572
|
+
/**
|
|
4573
|
+
* SRT push delivery: the fabric node designated by node_id connects to the given SRT URL in caller
|
|
4574
|
+
* mode and pushes the live stream to it.
|
|
4575
|
+
*
|
|
4576
|
+
* @typedef {Object} OutputSrtPush
|
|
4577
|
+
* @property {string} url - Destination SRT URL (e.g. "srt://192.0.2.10:9000")
|
|
4578
|
+
* @property {string=} node_id - ID of the fabric node that pushes to the destination URL, e.g. "inodAAA" (resolved from elvgeo if omitted)
|
|
4579
|
+
* @property {string=} elvgeo - Geo region used to select a node; resolved to node_id on create
|
|
4580
|
+
* @property {string=} passphrase - Optional passphrase for SRT encryption. Must be at least 10 characters if specified.
|
|
4581
|
+
* @property {boolean=} strip_rtp - If true, strip RTP encapsulation from the source stream before pushing
|
|
4582
|
+
* @property {SrtConnectionConfig=} connection - Configuration options for an SRT connection
|
|
4583
|
+
*/
|
|
4584
|
+
|
|
4585
|
+
/**
|
|
4586
|
+
* SRT pull delivery: an external client pulls from a synthetic SRT URL exposed by the fabric.
|
|
4587
|
+
*
|
|
4588
|
+
* @typedef {Object} OutputSrtPull
|
|
4589
|
+
* @property {Array<string>=} elvgeos - Geo region(s) used to select node(s); resolved to node_ids on create
|
|
4590
|
+
* @property {Array<string>=} node_ids - Egress node ID(s), e.g. ["inodAAA"] (resolved from elvgeos if omitted)
|
|
4591
|
+
* @property {string=} passphrase - SRT passphrase for encrypted delivery
|
|
4592
|
+
* @property {boolean=} strip_rtp - Whether to strip RTP headers
|
|
4593
|
+
* @property {Array<string>=} urls - Fabric-generated SRT pull URL(s) (generated by the server on PUT; not set by caller)
|
|
4594
|
+
* @property {SrtConnectionConfig=} connection - Configuration options for an SRT connection
|
|
4595
|
+
*/
|
|
4596
|
+
|
|
4597
|
+
/**
|
|
4598
|
+
* RTP delivery: the fabric node designated by node_id pushes the live stream as MPEG-TS over RTP
|
|
4599
|
+
* to the specified URL.
|
|
4600
|
+
*
|
|
4601
|
+
* @typedef {Object} OutputRtp
|
|
4602
|
+
* @property {string} url - Destination RTP URL (e.g. "rtp://239.0.0.1:5004")
|
|
4603
|
+
* @property {string=} node_id - ID of the fabric node that pushes to the destination URL, e.g. "inodAAA" (resolved from elvgeo if omitted)
|
|
4604
|
+
* @property {string=} elvgeo - Geo region used to select a node; resolved to node_id on create
|
|
4605
|
+
*/
|
|
4606
|
+
|
|
4607
|
+
/**
|
|
4608
|
+
* UDP delivery: the fabric node designated by node_id pushes the live stream as raw MPEG-TS over UDP
|
|
4609
|
+
* to the specified URL.
|
|
4610
|
+
*
|
|
4611
|
+
* @typedef {Object} OutputUdp
|
|
4612
|
+
* @property {string} url - Destination UDP URL (e.g. "udp://239.0.0.1:1234")
|
|
4613
|
+
* @property {string=} node_id - ID of the fabric node that pushes to the destination URL, e.g. "inodAAA" (resolved from elvgeo if omitted)
|
|
4614
|
+
* @property {string=} elvgeo - Geo region used to select a node; resolved to node_id on create
|
|
4615
|
+
*/
|
|
4616
|
+
|
|
4617
|
+
/**
|
|
4618
|
+
* A single live output. Keyed by output ID in the outputs map. Exactly one of
|
|
4619
|
+
* srt_push / srt_pull / rtp / udp is present and selects the delivery protocol.
|
|
4620
|
+
*
|
|
4503
4621
|
* @typedef {Object} LiveOutput
|
|
4504
4622
|
* @property {boolean=} enabled - Whether the output is enabled
|
|
4505
4623
|
* @property {string=} name - Display name for the output
|
|
4506
4624
|
* @property {string=} description - Description of the output
|
|
4507
4625
|
* @property {string=} external_id - External identifier for the output
|
|
4508
|
-
* @property {
|
|
4509
|
-
* @property {
|
|
4510
|
-
* @property {
|
|
4511
|
-
* @property {
|
|
4512
|
-
* @property {
|
|
4513
|
-
* @property {string=} srt_pull.passphrase - SRT passphrase for encrypted delivery
|
|
4514
|
-
* @property {boolean=} srt_pull.strip_rtp - Whether to strip RTP headers
|
|
4515
|
-
* @property {Object=} srt_pull.connection - Additional SRT connection configuration
|
|
4516
|
-
* @property {Array<string>=} srt_pull.urls - SRT URLs (returned by server, not set by caller)
|
|
4626
|
+
* @property {OutputInput=} input - Input stream configuration
|
|
4627
|
+
* @property {OutputSrtPush=} srt_push - SRT push delivery configuration
|
|
4628
|
+
* @property {OutputSrtPull=} srt_pull - SRT pull delivery configuration
|
|
4629
|
+
* @property {OutputRtp=} rtp - RTP delivery configuration
|
|
4630
|
+
* @property {OutputUdp=} udp - UDP delivery configuration
|
|
4517
4631
|
*/
|
|
4518
4632
|
|
|
4519
|
-
|
|
4633
|
+
/**
|
|
4634
|
+
* Delivery envelope accepted by OutputsCreate. The `type` selects the protocol and `settings`
|
|
4635
|
+
* carries the matching delivery block (OutputSrtPush / OutputSrtPull / OutputRtp / OutputUdp).
|
|
4636
|
+
*
|
|
4637
|
+
* @typedef {Object} OutputDelivery
|
|
4638
|
+
* @property {OutputDeliveryType} type - Delivery protocol
|
|
4639
|
+
* @property {(OutputSrtPush|OutputSrtPull|OutputRtp|OutputUdp)} settings - Protocol-specific delivery settings
|
|
4640
|
+
*/
|
|
4641
|
+
|
|
4642
|
+
var DELIVERY_PROTOCOLS = ["srt_pull", "srt_push", "rtp", "udp"];
|
|
4643
|
+
var OutputDeliverySettings = function OutputDeliverySettings(value) {
|
|
4644
|
+
var type = DELIVERY_PROTOCOLS.find(function (protocol) {
|
|
4645
|
+
return value && value[protocol];
|
|
4646
|
+
});
|
|
4647
|
+
return type ? value[type] : undefined;
|
|
4648
|
+
};
|
|
4649
|
+
|
|
4650
|
+
// Egress node ID, normalizing srt_pull's node_ids array and the singular node_id of other protocols.
|
|
4651
|
+
var OutputDeliveryNodeId = function OutputDeliveryNodeId(value) {
|
|
4652
|
+
var _settings$node_id, _settings$node_ids;
|
|
4653
|
+
var settings = OutputDeliverySettings(value);
|
|
4654
|
+
return (_settings$node_id = settings === null || settings === void 0 ? void 0 : settings.node_id) !== null && _settings$node_id !== void 0 ? _settings$node_id : settings === null || settings === void 0 || (_settings$node_ids = settings.node_ids) === null || _settings$node_ids === void 0 ? void 0 : _settings$node_ids[0];
|
|
4655
|
+
};
|
|
4656
|
+
|
|
4657
|
+
// Rewrite the host of fabric-generated srt_pull URLs to the egress node's fabric hostname.
|
|
4520
4658
|
// Necessary because the backend API doesn't return the proper SRT URLs currently.
|
|
4659
|
+
var RewriteSrtPullUrls = function RewriteSrtPullUrls(value, fabricUrl) {
|
|
4660
|
+
var _value$srt_pull;
|
|
4661
|
+
if (!fabricUrl || !((_value$srt_pull = value.srt_pull) !== null && _value$srt_pull !== void 0 && _value$srt_pull.urls)) {
|
|
4662
|
+
return;
|
|
4663
|
+
}
|
|
4664
|
+
var egressHost = new URL(fabricUrl).hostname;
|
|
4665
|
+
value.srt_pull.urls = value.srt_pull.urls.map(function (url) {
|
|
4666
|
+
return url.replace(/^srt:\/\/[^:/?]+/, "srt://".concat(egressHost));
|
|
4667
|
+
});
|
|
4668
|
+
};
|
|
4669
|
+
|
|
4670
|
+
// Resolve egress node and replace SRT URL with the egress endpoint hostname.
|
|
4521
4671
|
exports.OutputsResolveSrtPullUrls = /*#__PURE__*/function () {
|
|
4522
4672
|
var _ref70 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref69) {
|
|
4523
|
-
var _value$
|
|
4524
|
-
var value, nodeId, nodes, fabricUrl
|
|
4673
|
+
var _value$srt_pull2, _nodes$;
|
|
4674
|
+
var value, nodeId, nodes, fabricUrl;
|
|
4525
4675
|
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
4526
4676
|
while (1) switch (_context35.prev = _context35.next) {
|
|
4527
4677
|
case 0:
|
|
4528
4678
|
value = _ref69.value;
|
|
4529
|
-
nodeId = (_value$
|
|
4679
|
+
nodeId = (_value$srt_pull2 = value.srt_pull) === null || _value$srt_pull2 === void 0 || (_value$srt_pull2 = _value$srt_pull2.node_ids) === null || _value$srt_pull2 === void 0 ? void 0 : _value$srt_pull2[0];
|
|
4530
4680
|
if (nodeId) {
|
|
4531
4681
|
_context35.next = 4;
|
|
4532
4682
|
break;
|
|
@@ -4540,14 +4690,7 @@ exports.OutputsResolveSrtPullUrls = /*#__PURE__*/function () {
|
|
|
4540
4690
|
case 6:
|
|
4541
4691
|
nodes = _context35.sent;
|
|
4542
4692
|
fabricUrl = nodes === null || nodes === void 0 || (_nodes$ = nodes[0]) === null || _nodes$ === void 0 || (_nodes$ = _nodes$.services) === null || _nodes$ === void 0 || (_nodes$ = _nodes$.fabric_api) === null || _nodes$ === void 0 || (_nodes$ = _nodes$.urls) === null || _nodes$ === void 0 ? void 0 : _nodes$[0];
|
|
4543
|
-
|
|
4544
|
-
egressHost = new URL(fabricUrl).hostname;
|
|
4545
|
-
if ((_value$srt_pull2 = value.srt_pull) !== null && _value$srt_pull2 !== void 0 && _value$srt_pull2.urls) {
|
|
4546
|
-
value.srt_pull.urls = value.srt_pull.urls.map(function (url) {
|
|
4547
|
-
return url.replace(/^srt:\/\/[^:/?]+/, "srt://".concat(egressHost));
|
|
4548
|
-
});
|
|
4549
|
-
}
|
|
4550
|
-
}
|
|
4693
|
+
RewriteSrtPullUrls(value, fabricUrl);
|
|
4551
4694
|
return _context35.abrupt("return", value);
|
|
4552
4695
|
case 10:
|
|
4553
4696
|
case "end":
|
|
@@ -4572,33 +4715,34 @@ exports.OutputsResolveSrtPullUrls = /*#__PURE__*/function () {
|
|
|
4572
4715
|
* @returns {Promise<Object<string, LiveOutput>>} - Map of output IDs to LiveOutput objects, each optionally with a `state` field
|
|
4573
4716
|
*/
|
|
4574
4717
|
exports.OutputsList = /*#__PURE__*/function () {
|
|
4575
|
-
var _ref72 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
4576
|
-
var
|
|
4577
|
-
|
|
4578
|
-
|
|
4718
|
+
var _ref72 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref71) {
|
|
4719
|
+
var _this7 = this;
|
|
4720
|
+
var libraryId, objectId, _ref71$includeState, includeState, _yield$RouteToLiveEgr, restore, outputs, nodeIds, nodeUrls, outputsByNode, _i3, _Object$entries, _Object$entries$_i, key, value, nodeId, fabricUrl, savedURIs, _i4, _Object$entries2, _Object$entries2$_i, _nodeId, outputIds;
|
|
4721
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
4722
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
4579
4723
|
case 0:
|
|
4580
4724
|
libraryId = _ref71.libraryId, objectId = _ref71.objectId, _ref71$includeState = _ref71.includeState, includeState = _ref71$includeState === void 0 ? true : _ref71$includeState;
|
|
4581
4725
|
ValidateObject(objectId);
|
|
4582
4726
|
if (libraryId) {
|
|
4583
|
-
|
|
4727
|
+
_context39.next = 6;
|
|
4584
4728
|
break;
|
|
4585
4729
|
}
|
|
4586
|
-
|
|
4730
|
+
_context39.next = 5;
|
|
4587
4731
|
return this.ContentObjectLibraryId({
|
|
4588
4732
|
objectId: objectId
|
|
4589
4733
|
});
|
|
4590
4734
|
case 5:
|
|
4591
|
-
libraryId =
|
|
4735
|
+
libraryId = _context39.sent;
|
|
4592
4736
|
case 6:
|
|
4593
|
-
|
|
4737
|
+
_context39.next = 8;
|
|
4594
4738
|
return RouteToLiveEgress({
|
|
4595
4739
|
client: this
|
|
4596
4740
|
});
|
|
4597
4741
|
case 8:
|
|
4598
|
-
_yield$RouteToLiveEgr =
|
|
4742
|
+
_yield$RouteToLiveEgr = _context39.sent;
|
|
4599
4743
|
restore = _yield$RouteToLiveEgr.restore;
|
|
4600
|
-
|
|
4601
|
-
|
|
4744
|
+
_context39.prev = 10;
|
|
4745
|
+
_context39.next = 13;
|
|
4602
4746
|
return this.CallBitcodeMethod({
|
|
4603
4747
|
libraryId: libraryId,
|
|
4604
4748
|
objectId: objectId,
|
|
@@ -4606,90 +4750,190 @@ exports.OutputsList = /*#__PURE__*/function () {
|
|
|
4606
4750
|
constant: true
|
|
4607
4751
|
});
|
|
4608
4752
|
case 13:
|
|
4609
|
-
outputs =
|
|
4753
|
+
outputs = _context39.sent;
|
|
4610
4754
|
case 14:
|
|
4611
|
-
|
|
4755
|
+
_context39.prev = 14;
|
|
4612
4756
|
restore();
|
|
4613
|
-
return
|
|
4757
|
+
return _context39.finish(14);
|
|
4614
4758
|
case 17:
|
|
4759
|
+
_context39.next = 19;
|
|
4760
|
+
return this.utils.LimitedMap(10, Object.values(outputs), /*#__PURE__*/function () {
|
|
4761
|
+
var _ref73 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(value) {
|
|
4762
|
+
var _value$input;
|
|
4763
|
+
var streamId, _yield$Promise$all3, _yield$Promise$all4, streamLibraryId, streamStatus;
|
|
4764
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
4765
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
4766
|
+
case 0:
|
|
4767
|
+
streamId = (_value$input = value.input) === null || _value$input === void 0 ? void 0 : _value$input.stream;
|
|
4768
|
+
if (streamId) {
|
|
4769
|
+
_context36.next = 3;
|
|
4770
|
+
break;
|
|
4771
|
+
}
|
|
4772
|
+
return _context36.abrupt("return");
|
|
4773
|
+
case 3:
|
|
4774
|
+
_context36.next = 5;
|
|
4775
|
+
return Promise.all([_this7.ContentObjectLibraryId({
|
|
4776
|
+
objectId: streamId
|
|
4777
|
+
}), _this7.StreamStatus({
|
|
4778
|
+
name: streamId
|
|
4779
|
+
})]);
|
|
4780
|
+
case 5:
|
|
4781
|
+
_yield$Promise$all3 = _context36.sent;
|
|
4782
|
+
_yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 2);
|
|
4783
|
+
streamLibraryId = _yield$Promise$all4[0];
|
|
4784
|
+
streamStatus = _yield$Promise$all4[1];
|
|
4785
|
+
_context36.next = 11;
|
|
4786
|
+
return _this7.ContentObjectMetadata({
|
|
4787
|
+
libraryId: streamLibraryId,
|
|
4788
|
+
objectId: streamId,
|
|
4789
|
+
metadataSubtree: "/public/name"
|
|
4790
|
+
});
|
|
4791
|
+
case 11:
|
|
4792
|
+
value.input.name = _context36.sent;
|
|
4793
|
+
value.input.status = streamStatus === null || streamStatus === void 0 ? void 0 : streamStatus.state;
|
|
4794
|
+
case 13:
|
|
4795
|
+
case "end":
|
|
4796
|
+
return _context36.stop();
|
|
4797
|
+
}
|
|
4798
|
+
}, _callee36);
|
|
4799
|
+
}));
|
|
4800
|
+
return function (_x34) {
|
|
4801
|
+
return _ref73.apply(this, arguments);
|
|
4802
|
+
};
|
|
4803
|
+
}());
|
|
4804
|
+
case 19:
|
|
4805
|
+
if (includeState) {
|
|
4806
|
+
_context39.next = 21;
|
|
4807
|
+
break;
|
|
4808
|
+
}
|
|
4809
|
+
return _context39.abrupt("return", outputs);
|
|
4810
|
+
case 21:
|
|
4811
|
+
// Resolve each distinct egress node's fabric URL once (concurrent, read-only)
|
|
4812
|
+
nodeIds = _toConsumableArray(new Set(Object.values(outputs).map(function (value) {
|
|
4813
|
+
return OutputDeliveryNodeId(value);
|
|
4814
|
+
}).filter(Boolean)));
|
|
4815
|
+
nodeUrls = {};
|
|
4816
|
+
_context39.next = 25;
|
|
4817
|
+
return this.utils.LimitedMap(10, nodeIds, /*#__PURE__*/function () {
|
|
4818
|
+
var _ref74 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(nodeId) {
|
|
4819
|
+
var _nodes$2;
|
|
4820
|
+
var nodes, fabricUrl;
|
|
4821
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
4822
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
4823
|
+
case 0:
|
|
4824
|
+
_context37.next = 2;
|
|
4825
|
+
return _this7.SpaceNodes({
|
|
4826
|
+
matchNodeId: nodeId
|
|
4827
|
+
});
|
|
4828
|
+
case 2:
|
|
4829
|
+
nodes = _context37.sent;
|
|
4830
|
+
fabricUrl = nodes === null || nodes === void 0 || (_nodes$2 = nodes[0]) === null || _nodes$2 === void 0 || (_nodes$2 = _nodes$2.services) === null || _nodes$2 === void 0 || (_nodes$2 = _nodes$2.fabric_api) === null || _nodes$2 === void 0 || (_nodes$2 = _nodes$2.urls) === null || _nodes$2 === void 0 ? void 0 : _nodes$2[0];
|
|
4831
|
+
if (fabricUrl) {
|
|
4832
|
+
nodeUrls[nodeId] = fabricUrl;
|
|
4833
|
+
}
|
|
4834
|
+
case 5:
|
|
4835
|
+
case "end":
|
|
4836
|
+
return _context37.stop();
|
|
4837
|
+
}
|
|
4838
|
+
}, _callee37);
|
|
4839
|
+
}));
|
|
4840
|
+
return function (_x35) {
|
|
4841
|
+
return _ref74.apply(this, arguments);
|
|
4842
|
+
};
|
|
4843
|
+
}());
|
|
4844
|
+
case 25:
|
|
4845
|
+
// Rewrite fabric-generated srt_pull URLs to the egress host, and group outputs by node
|
|
4846
|
+
outputsByNode = {};
|
|
4615
4847
|
_i3 = 0, _Object$entries = Object.entries(outputs);
|
|
4616
|
-
case
|
|
4848
|
+
case 27:
|
|
4617
4849
|
if (!(_i3 < _Object$entries.length)) {
|
|
4618
|
-
|
|
4850
|
+
_context39.next = 39;
|
|
4619
4851
|
break;
|
|
4620
4852
|
}
|
|
4621
4853
|
_Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2), key = _Object$entries$_i[0], value = _Object$entries$_i[1];
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4854
|
+
nodeId = OutputDeliveryNodeId(value);
|
|
4855
|
+
fabricUrl = nodeId && nodeUrls[nodeId];
|
|
4856
|
+
RewriteSrtPullUrls(value, fabricUrl);
|
|
4857
|
+
if (fabricUrl) {
|
|
4858
|
+
_context39.next = 35;
|
|
4625
4859
|
break;
|
|
4626
4860
|
}
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
});
|
|
4632
|
-
case 25:
|
|
4633
|
-
_context36.t1 = _context36.sent;
|
|
4634
|
-
_context36.t2 = streamId;
|
|
4635
|
-
_context36.t3 = {
|
|
4636
|
-
libraryId: _context36.t1,
|
|
4637
|
-
objectId: _context36.t2,
|
|
4638
|
-
metadataSubtree: "/public/name"
|
|
4639
|
-
};
|
|
4640
|
-
_context36.next = 30;
|
|
4641
|
-
return _context36.t0.ContentObjectMetadata.call(_context36.t0, _context36.t3);
|
|
4642
|
-
case 30:
|
|
4643
|
-
streamMetadata = _context36.sent;
|
|
4644
|
-
_context36.next = 33;
|
|
4645
|
-
return this.StreamStatus({
|
|
4646
|
-
name: streamId
|
|
4647
|
-
});
|
|
4648
|
-
case 33:
|
|
4649
|
-
streamStatus = _context36.sent;
|
|
4650
|
-
value.input.name = streamMetadata;
|
|
4651
|
-
value.input.status = streamStatus === null || streamStatus === void 0 ? void 0 : streamStatus.state;
|
|
4861
|
+
value.state = {};
|
|
4862
|
+
return _context39.abrupt("continue", 36);
|
|
4863
|
+
case 35:
|
|
4864
|
+
(outputsByNode[nodeId] = outputsByNode[nodeId] || []).push(key);
|
|
4652
4865
|
case 36:
|
|
4653
|
-
|
|
4654
|
-
|
|
4866
|
+
_i3++;
|
|
4867
|
+
_context39.next = 27;
|
|
4868
|
+
break;
|
|
4869
|
+
case 39:
|
|
4870
|
+
// Fetch state per node: route to the node once, fetch its outputs concurrently, then restore
|
|
4871
|
+
savedURIs = _toConsumableArray(this.fabricURIs);
|
|
4872
|
+
_context39.prev = 40;
|
|
4873
|
+
_i4 = 0, _Object$entries2 = Object.entries(outputsByNode);
|
|
4874
|
+
case 42:
|
|
4875
|
+
if (!(_i4 < _Object$entries2.length)) {
|
|
4876
|
+
_context39.next = 50;
|
|
4655
4877
|
break;
|
|
4656
4878
|
}
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
});
|
|
4661
|
-
case 39:
|
|
4662
|
-
_context36.prev = 39;
|
|
4663
|
-
nodeId = (_value$srt_pull3 = value.srt_pull) === null || _value$srt_pull3 === void 0 || (_value$srt_pull3 = _value$srt_pull3.node_ids) === null || _value$srt_pull3 === void 0 ? void 0 : _value$srt_pull3[0];
|
|
4664
|
-
_context36.next = 43;
|
|
4665
|
-
return this.OutputsState({
|
|
4666
|
-
outputId: key,
|
|
4667
|
-
objectId: objectId,
|
|
4668
|
-
libraryId: libraryId,
|
|
4669
|
-
nodeId: nodeId,
|
|
4670
|
-
includeState: true
|
|
4879
|
+
_Object$entries2$_i = _slicedToArray(_Object$entries2[_i4], 2), _nodeId = _Object$entries2$_i[0], outputIds = _Object$entries2$_i[1];
|
|
4880
|
+
this.SetNodes({
|
|
4881
|
+
fabricURIs: [nodeUrls[_nodeId]]
|
|
4671
4882
|
});
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4883
|
+
_context39.next = 47;
|
|
4884
|
+
return this.utils.LimitedMap(10, outputIds, /*#__PURE__*/function () {
|
|
4885
|
+
var _ref75 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(outputId) {
|
|
4886
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
4887
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
4888
|
+
case 0:
|
|
4889
|
+
_context38.prev = 0;
|
|
4890
|
+
_context38.next = 3;
|
|
4891
|
+
return _this7.CallBitcodeMethod({
|
|
4892
|
+
libraryId: libraryId,
|
|
4893
|
+
objectId: objectId,
|
|
4894
|
+
method: UrlJoin("live", "outputs", outputId, "state"),
|
|
4895
|
+
queryParams: {
|
|
4896
|
+
"client_stats": 1,
|
|
4897
|
+
"srt_stats": 1
|
|
4898
|
+
},
|
|
4899
|
+
constant: true
|
|
4900
|
+
});
|
|
4901
|
+
case 3:
|
|
4902
|
+
outputs[outputId].state = _context38.sent;
|
|
4903
|
+
_context38.next = 10;
|
|
4904
|
+
break;
|
|
4905
|
+
case 6:
|
|
4906
|
+
_context38.prev = 6;
|
|
4907
|
+
_context38.t0 = _context38["catch"](0);
|
|
4908
|
+
_this7.Log("Failed to retrieve state for output ".concat(outputId, ": ").concat(_context38.t0.message), true);
|
|
4909
|
+
outputs[outputId].state = {};
|
|
4910
|
+
case 10:
|
|
4911
|
+
case "end":
|
|
4912
|
+
return _context38.stop();
|
|
4913
|
+
}
|
|
4914
|
+
}, _callee38, null, [[0, 6]]);
|
|
4915
|
+
}));
|
|
4916
|
+
return function (_x36) {
|
|
4917
|
+
return _ref75.apply(this, arguments);
|
|
4918
|
+
};
|
|
4919
|
+
}());
|
|
4677
4920
|
case 47:
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
this.Log("Failed to retrieve state for output ".concat(key, ": ").concat(_context36.t4.message), true);
|
|
4681
|
-
value.state = {};
|
|
4682
|
-
case 51:
|
|
4683
|
-
_i3++;
|
|
4684
|
-
_context36.next = 18;
|
|
4921
|
+
_i4++;
|
|
4922
|
+
_context39.next = 42;
|
|
4685
4923
|
break;
|
|
4924
|
+
case 50:
|
|
4925
|
+
_context39.prev = 50;
|
|
4926
|
+
this.SetNodes({
|
|
4927
|
+
fabricURIs: savedURIs
|
|
4928
|
+
});
|
|
4929
|
+
return _context39.finish(50);
|
|
4930
|
+
case 53:
|
|
4931
|
+
return _context39.abrupt("return", outputs);
|
|
4686
4932
|
case 54:
|
|
4687
|
-
return _context36.abrupt("return", outputs);
|
|
4688
|
-
case 55:
|
|
4689
4933
|
case "end":
|
|
4690
|
-
return
|
|
4934
|
+
return _context39.stop();
|
|
4691
4935
|
}
|
|
4692
|
-
},
|
|
4936
|
+
}, _callee39, this, [[10,, 14, 17], [40,, 50, 53]]);
|
|
4693
4937
|
}));
|
|
4694
4938
|
return function (_x33) {
|
|
4695
4939
|
return _ref72.apply(this, arguments);
|
|
@@ -4709,35 +4953,35 @@ exports.OutputsList = /*#__PURE__*/function () {
|
|
|
4709
4953
|
* @returns {Promise<LiveOutput>} - Output config, optionally with a `state` field containing client_stats and srt_stats
|
|
4710
4954
|
*/
|
|
4711
4955
|
exports.OutputsListItem = /*#__PURE__*/function () {
|
|
4712
|
-
var
|
|
4956
|
+
var _ref77 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref76) {
|
|
4713
4957
|
var _value$input2;
|
|
4714
|
-
var libraryId, objectId, outputId,
|
|
4715
|
-
return _regeneratorRuntime.wrap(function
|
|
4716
|
-
while (1) switch (
|
|
4958
|
+
var libraryId, objectId, outputId, _ref76$includeState, includeState, _yield$RouteToLiveEgr2, restore, outputs, value, streamId, streamMetadata, streamStatus, nodeId, result;
|
|
4959
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
4960
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
4717
4961
|
case 0:
|
|
4718
|
-
libraryId =
|
|
4962
|
+
libraryId = _ref76.libraryId, objectId = _ref76.objectId, outputId = _ref76.outputId, _ref76$includeState = _ref76.includeState, includeState = _ref76$includeState === void 0 ? true : _ref76$includeState;
|
|
4719
4963
|
ValidateObject(objectId);
|
|
4720
4964
|
ValidatePresence("outputId", outputId);
|
|
4721
4965
|
if (libraryId) {
|
|
4722
|
-
|
|
4966
|
+
_context40.next = 7;
|
|
4723
4967
|
break;
|
|
4724
4968
|
}
|
|
4725
|
-
|
|
4969
|
+
_context40.next = 6;
|
|
4726
4970
|
return this.ContentObjectLibraryId({
|
|
4727
4971
|
objectId: objectId
|
|
4728
4972
|
});
|
|
4729
4973
|
case 6:
|
|
4730
|
-
libraryId =
|
|
4974
|
+
libraryId = _context40.sent;
|
|
4731
4975
|
case 7:
|
|
4732
|
-
|
|
4976
|
+
_context40.next = 9;
|
|
4733
4977
|
return RouteToLiveEgress({
|
|
4734
4978
|
client: this
|
|
4735
4979
|
});
|
|
4736
4980
|
case 9:
|
|
4737
|
-
_yield$RouteToLiveEgr2 =
|
|
4981
|
+
_yield$RouteToLiveEgr2 = _context40.sent;
|
|
4738
4982
|
restore = _yield$RouteToLiveEgr2.restore;
|
|
4739
|
-
|
|
4740
|
-
|
|
4983
|
+
_context40.prev = 11;
|
|
4984
|
+
_context40.next = 14;
|
|
4741
4985
|
return this.CallBitcodeMethod({
|
|
4742
4986
|
libraryId: libraryId,
|
|
4743
4987
|
objectId: objectId,
|
|
@@ -4745,62 +4989,62 @@ exports.OutputsListItem = /*#__PURE__*/function () {
|
|
|
4745
4989
|
constant: true
|
|
4746
4990
|
});
|
|
4747
4991
|
case 14:
|
|
4748
|
-
outputs =
|
|
4992
|
+
outputs = _context40.sent;
|
|
4749
4993
|
case 15:
|
|
4750
|
-
|
|
4994
|
+
_context40.prev = 15;
|
|
4751
4995
|
restore();
|
|
4752
|
-
return
|
|
4996
|
+
return _context40.finish(15);
|
|
4753
4997
|
case 18:
|
|
4754
4998
|
value = outputs[outputId];
|
|
4755
4999
|
if (value) {
|
|
4756
|
-
|
|
5000
|
+
_context40.next = 21;
|
|
4757
5001
|
break;
|
|
4758
5002
|
}
|
|
4759
5003
|
throw new Error("Output not found: ".concat(outputId));
|
|
4760
5004
|
case 21:
|
|
4761
5005
|
streamId = (_value$input2 = value.input) === null || _value$input2 === void 0 ? void 0 : _value$input2.stream;
|
|
4762
5006
|
if (!streamId) {
|
|
4763
|
-
|
|
5007
|
+
_context40.next = 37;
|
|
4764
5008
|
break;
|
|
4765
5009
|
}
|
|
4766
|
-
|
|
4767
|
-
|
|
5010
|
+
_context40.t0 = this;
|
|
5011
|
+
_context40.next = 26;
|
|
4768
5012
|
return this.ContentObjectLibraryId({
|
|
4769
5013
|
objectId: streamId
|
|
4770
5014
|
});
|
|
4771
5015
|
case 26:
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
libraryId:
|
|
4776
|
-
objectId:
|
|
5016
|
+
_context40.t1 = _context40.sent;
|
|
5017
|
+
_context40.t2 = streamId;
|
|
5018
|
+
_context40.t3 = {
|
|
5019
|
+
libraryId: _context40.t1,
|
|
5020
|
+
objectId: _context40.t2,
|
|
4777
5021
|
metadataSubtree: "/public/name"
|
|
4778
5022
|
};
|
|
4779
|
-
|
|
4780
|
-
return
|
|
5023
|
+
_context40.next = 31;
|
|
5024
|
+
return _context40.t0.ContentObjectMetadata.call(_context40.t0, _context40.t3);
|
|
4781
5025
|
case 31:
|
|
4782
|
-
streamMetadata =
|
|
4783
|
-
|
|
5026
|
+
streamMetadata = _context40.sent;
|
|
5027
|
+
_context40.next = 34;
|
|
4784
5028
|
return this.StreamStatus({
|
|
4785
5029
|
name: streamId
|
|
4786
5030
|
});
|
|
4787
5031
|
case 34:
|
|
4788
|
-
streamStatus =
|
|
5032
|
+
streamStatus = _context40.sent;
|
|
4789
5033
|
value.input.name = streamMetadata;
|
|
4790
5034
|
value.input.status = streamStatus === null || streamStatus === void 0 ? void 0 : streamStatus.state;
|
|
4791
5035
|
case 37:
|
|
4792
|
-
|
|
5036
|
+
_context40.next = 39;
|
|
4793
5037
|
return this.OutputsResolveSrtPullUrls({
|
|
4794
5038
|
value: value
|
|
4795
5039
|
});
|
|
4796
5040
|
case 39:
|
|
4797
5041
|
if (!includeState) {
|
|
4798
|
-
|
|
5042
|
+
_context40.next = 52;
|
|
4799
5043
|
break;
|
|
4800
5044
|
}
|
|
4801
|
-
|
|
4802
|
-
nodeId = (
|
|
4803
|
-
|
|
5045
|
+
_context40.prev = 40;
|
|
5046
|
+
nodeId = OutputDeliveryNodeId(value);
|
|
5047
|
+
_context40.next = 44;
|
|
4804
5048
|
return this.OutputsState({
|
|
4805
5049
|
outputId: outputId,
|
|
4806
5050
|
objectId: objectId,
|
|
@@ -4809,25 +5053,25 @@ exports.OutputsListItem = /*#__PURE__*/function () {
|
|
|
4809
5053
|
includeState: true
|
|
4810
5054
|
});
|
|
4811
5055
|
case 44:
|
|
4812
|
-
result =
|
|
5056
|
+
result = _context40.sent;
|
|
4813
5057
|
value.state = result.state;
|
|
4814
|
-
|
|
5058
|
+
_context40.next = 52;
|
|
4815
5059
|
break;
|
|
4816
5060
|
case 48:
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
this.Log("Failed to retrieve state for output ".concat(outputId, ": ").concat(
|
|
5061
|
+
_context40.prev = 48;
|
|
5062
|
+
_context40.t4 = _context40["catch"](40);
|
|
5063
|
+
this.Log("Failed to retrieve state for output ".concat(outputId, ": ").concat(_context40.t4.message), true);
|
|
4820
5064
|
value.state = {};
|
|
4821
5065
|
case 52:
|
|
4822
|
-
return
|
|
5066
|
+
return _context40.abrupt("return", value);
|
|
4823
5067
|
case 53:
|
|
4824
5068
|
case "end":
|
|
4825
|
-
return
|
|
5069
|
+
return _context40.stop();
|
|
4826
5070
|
}
|
|
4827
|
-
},
|
|
5071
|
+
}, _callee40, this, [[11,, 15, 18], [40, 48]]);
|
|
4828
5072
|
}));
|
|
4829
|
-
return function (
|
|
4830
|
-
return
|
|
5073
|
+
return function (_x37) {
|
|
5074
|
+
return _ref77.apply(this, arguments);
|
|
4831
5075
|
};
|
|
4832
5076
|
}();
|
|
4833
5077
|
|
|
@@ -4847,34 +5091,34 @@ exports.OutputsListItem = /*#__PURE__*/function () {
|
|
|
4847
5091
|
* @returns {Promise<LiveOutput>} - Output config, optionally with a `state` field containing client_stats and srt_stats
|
|
4848
5092
|
*/
|
|
4849
5093
|
exports.OutputsState = /*#__PURE__*/function () {
|
|
4850
|
-
var
|
|
4851
|
-
var libraryId, objectId, outputId, nodeId,
|
|
4852
|
-
return _regeneratorRuntime.wrap(function
|
|
4853
|
-
while (1) switch (
|
|
5094
|
+
var _ref79 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref78) {
|
|
5095
|
+
var libraryId, objectId, outputId, nodeId, _ref78$includeState, includeState, _yield$RouteToLiveEgr3, restore, _yield$RouteToOutputN, config, state;
|
|
5096
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
5097
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
4854
5098
|
case 0:
|
|
4855
|
-
libraryId =
|
|
5099
|
+
libraryId = _ref78.libraryId, objectId = _ref78.objectId, outputId = _ref78.outputId, nodeId = _ref78.nodeId, _ref78$includeState = _ref78.includeState, includeState = _ref78$includeState === void 0 ? true : _ref78$includeState;
|
|
4856
5100
|
ValidateObject(objectId);
|
|
4857
5101
|
ValidatePresence("outputId", outputId);
|
|
4858
5102
|
if (libraryId) {
|
|
4859
|
-
|
|
5103
|
+
_context41.next = 7;
|
|
4860
5104
|
break;
|
|
4861
5105
|
}
|
|
4862
|
-
|
|
5106
|
+
_context41.next = 6;
|
|
4863
5107
|
return this.ContentObjectLibraryId({
|
|
4864
5108
|
objectId: objectId
|
|
4865
5109
|
});
|
|
4866
5110
|
case 6:
|
|
4867
|
-
libraryId =
|
|
5111
|
+
libraryId = _context41.sent;
|
|
4868
5112
|
case 7:
|
|
4869
|
-
|
|
5113
|
+
_context41.next = 9;
|
|
4870
5114
|
return RouteToLiveEgress({
|
|
4871
5115
|
client: this
|
|
4872
5116
|
});
|
|
4873
5117
|
case 9:
|
|
4874
|
-
_yield$RouteToLiveEgr3 =
|
|
5118
|
+
_yield$RouteToLiveEgr3 = _context41.sent;
|
|
4875
5119
|
restore = _yield$RouteToLiveEgr3.restore;
|
|
4876
|
-
|
|
4877
|
-
|
|
5120
|
+
_context41.prev = 11;
|
|
5121
|
+
_context41.next = 14;
|
|
4878
5122
|
return RouteToOutputNode({
|
|
4879
5123
|
client: this,
|
|
4880
5124
|
libraryId: libraryId,
|
|
@@ -4883,15 +5127,15 @@ exports.OutputsState = /*#__PURE__*/function () {
|
|
|
4883
5127
|
nodeId: nodeId
|
|
4884
5128
|
});
|
|
4885
5129
|
case 14:
|
|
4886
|
-
_yield$RouteToOutputN =
|
|
5130
|
+
_yield$RouteToOutputN = _context41.sent;
|
|
4887
5131
|
config = _yield$RouteToOutputN.config;
|
|
4888
5132
|
if (includeState) {
|
|
4889
|
-
|
|
5133
|
+
_context41.next = 18;
|
|
4890
5134
|
break;
|
|
4891
5135
|
}
|
|
4892
|
-
return
|
|
5136
|
+
return _context41.abrupt("return", config);
|
|
4893
5137
|
case 18:
|
|
4894
|
-
|
|
5138
|
+
_context41.next = 20;
|
|
4895
5139
|
return this.CallBitcodeMethod({
|
|
4896
5140
|
libraryId: libraryId,
|
|
4897
5141
|
objectId: objectId,
|
|
@@ -4903,29 +5147,29 @@ exports.OutputsState = /*#__PURE__*/function () {
|
|
|
4903
5147
|
constant: true
|
|
4904
5148
|
});
|
|
4905
5149
|
case 20:
|
|
4906
|
-
state =
|
|
4907
|
-
return
|
|
5150
|
+
state = _context41.sent;
|
|
5151
|
+
return _context41.abrupt("return", _objectSpread(_objectSpread({}, config), {}, {
|
|
4908
5152
|
state: state
|
|
4909
5153
|
}));
|
|
4910
5154
|
case 22:
|
|
4911
|
-
|
|
5155
|
+
_context41.prev = 22;
|
|
4912
5156
|
restore();
|
|
4913
|
-
return
|
|
5157
|
+
return _context41.finish(22);
|
|
4914
5158
|
case 25:
|
|
4915
5159
|
case "end":
|
|
4916
|
-
return
|
|
5160
|
+
return _context41.stop();
|
|
4917
5161
|
}
|
|
4918
|
-
},
|
|
5162
|
+
}, _callee41, this, [[11,, 22, 25]]);
|
|
4919
5163
|
}));
|
|
4920
|
-
return function (
|
|
4921
|
-
return
|
|
5164
|
+
return function (_x38) {
|
|
5165
|
+
return _ref79.apply(this, arguments);
|
|
4922
5166
|
};
|
|
4923
5167
|
}();
|
|
4924
5168
|
|
|
4925
5169
|
/**
|
|
4926
5170
|
* Pin (route) the client to the egress node for a specific output. Fetches the output config
|
|
4927
5171
|
* to determine the node ID then sets the client fabric URIs.
|
|
4928
|
-
*
|
|
5172
|
+
* Node ID is retrieved from the output's delivery block (srt_push / srt_pull / rtp / udp).
|
|
4929
5173
|
* Assumes the client is already routed to an eligible egress node (via RouteToLiveEgress).
|
|
4930
5174
|
* Returns a function that restores the original fabric URIs.
|
|
4931
5175
|
*
|
|
@@ -4937,12 +5181,12 @@ exports.OutputsState = /*#__PURE__*/function () {
|
|
|
4937
5181
|
* @returns {Promise<{restore: Function, config: Object}>} - restore function and output config
|
|
4938
5182
|
*/
|
|
4939
5183
|
var RouteToOutputNode = /*#__PURE__*/function () {
|
|
4940
|
-
var
|
|
4941
|
-
var client, libraryId, objectId, outputId, nodeId, savedURIs, restore, config,
|
|
4942
|
-
return _regeneratorRuntime.wrap(function
|
|
4943
|
-
while (1) switch (
|
|
5184
|
+
var _ref81 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref80) {
|
|
5185
|
+
var client, libraryId, objectId, outputId, nodeId, savedURIs, restore, config, _nodes$3, nodes, fabricUrl;
|
|
5186
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
5187
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
4944
5188
|
case 0:
|
|
4945
|
-
client =
|
|
5189
|
+
client = _ref80.client, libraryId = _ref80.libraryId, objectId = _ref80.objectId, outputId = _ref80.outputId, nodeId = _ref80.nodeId;
|
|
4946
5190
|
savedURIs = _toConsumableArray(client.fabricURIs);
|
|
4947
5191
|
restore = function restore() {
|
|
4948
5192
|
return client.SetNodes({
|
|
@@ -4950,10 +5194,10 @@ var RouteToOutputNode = /*#__PURE__*/function () {
|
|
|
4950
5194
|
});
|
|
4951
5195
|
};
|
|
4952
5196
|
if (nodeId) {
|
|
4953
|
-
|
|
5197
|
+
_context42.next = 8;
|
|
4954
5198
|
break;
|
|
4955
5199
|
}
|
|
4956
|
-
|
|
5200
|
+
_context42.next = 6;
|
|
4957
5201
|
return client.CallBitcodeMethod({
|
|
4958
5202
|
libraryId: libraryId,
|
|
4959
5203
|
objectId: objectId,
|
|
@@ -4961,48 +5205,48 @@ var RouteToOutputNode = /*#__PURE__*/function () {
|
|
|
4961
5205
|
constant: true
|
|
4962
5206
|
});
|
|
4963
5207
|
case 6:
|
|
4964
|
-
config =
|
|
4965
|
-
nodeId = (
|
|
5208
|
+
config = _context42.sent;
|
|
5209
|
+
nodeId = OutputDeliveryNodeId(config);
|
|
4966
5210
|
case 8:
|
|
4967
5211
|
if (!nodeId) {
|
|
4968
|
-
|
|
5212
|
+
_context42.next = 18;
|
|
4969
5213
|
break;
|
|
4970
5214
|
}
|
|
4971
|
-
|
|
5215
|
+
_context42.next = 11;
|
|
4972
5216
|
return client.SpaceNodes({
|
|
4973
5217
|
matchNodeId: nodeId
|
|
4974
5218
|
});
|
|
4975
5219
|
case 11:
|
|
4976
|
-
nodes =
|
|
4977
|
-
fabricUrl = nodes === null || nodes === void 0 || (_nodes$
|
|
5220
|
+
nodes = _context42.sent;
|
|
5221
|
+
fabricUrl = nodes === null || nodes === void 0 || (_nodes$3 = nodes[0]) === null || _nodes$3 === void 0 || (_nodes$3 = _nodes$3.services) === null || _nodes$3 === void 0 || (_nodes$3 = _nodes$3.fabric_api) === null || _nodes$3 === void 0 || (_nodes$3 = _nodes$3.urls) === null || _nodes$3 === void 0 ? void 0 : _nodes$3[0];
|
|
4978
5222
|
if (!fabricUrl) {
|
|
4979
|
-
|
|
5223
|
+
_context42.next = 18;
|
|
4980
5224
|
break;
|
|
4981
5225
|
}
|
|
4982
5226
|
client.SetNodes({
|
|
4983
5227
|
fabricURIs: [fabricUrl]
|
|
4984
5228
|
});
|
|
4985
5229
|
if (!config) {
|
|
4986
|
-
|
|
5230
|
+
_context42.next = 18;
|
|
4987
5231
|
break;
|
|
4988
5232
|
}
|
|
4989
|
-
|
|
5233
|
+
_context42.next = 18;
|
|
4990
5234
|
return client.OutputsResolveSrtPullUrls({
|
|
4991
5235
|
value: config
|
|
4992
5236
|
});
|
|
4993
5237
|
case 18:
|
|
4994
|
-
return
|
|
5238
|
+
return _context42.abrupt("return", {
|
|
4995
5239
|
restore: restore,
|
|
4996
5240
|
config: config
|
|
4997
5241
|
});
|
|
4998
5242
|
case 19:
|
|
4999
5243
|
case "end":
|
|
5000
|
-
return
|
|
5244
|
+
return _context42.stop();
|
|
5001
5245
|
}
|
|
5002
|
-
},
|
|
5246
|
+
}, _callee42);
|
|
5003
5247
|
}));
|
|
5004
|
-
return function RouteToOutputNode(
|
|
5005
|
-
return
|
|
5248
|
+
return function RouteToOutputNode(_x39) {
|
|
5249
|
+
return _ref81.apply(this, arguments);
|
|
5006
5250
|
};
|
|
5007
5251
|
}();
|
|
5008
5252
|
|
|
@@ -5014,52 +5258,52 @@ var RouteToOutputNode = /*#__PURE__*/function () {
|
|
|
5014
5258
|
* @returns {Promise<{restore: Function}>} - restore function
|
|
5015
5259
|
*/
|
|
5016
5260
|
var RouteToLiveEgress = /*#__PURE__*/function () {
|
|
5017
|
-
var
|
|
5018
|
-
var client, savedURIs, restore, nodeId, _nodes$
|
|
5019
|
-
return _regeneratorRuntime.wrap(function
|
|
5020
|
-
while (1) switch (
|
|
5261
|
+
var _ref83 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref82) {
|
|
5262
|
+
var client, savedURIs, restore, nodeId, _nodes$4, nodes, fabricUrl;
|
|
5263
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
5264
|
+
while (1) switch (_context43.prev = _context43.next) {
|
|
5021
5265
|
case 0:
|
|
5022
|
-
client =
|
|
5266
|
+
client = _ref82.client;
|
|
5023
5267
|
savedURIs = _toConsumableArray(client.fabricURIs);
|
|
5024
5268
|
restore = function restore() {
|
|
5025
5269
|
return client.SetNodes({
|
|
5026
5270
|
fabricURIs: savedURIs
|
|
5027
5271
|
});
|
|
5028
5272
|
};
|
|
5029
|
-
|
|
5273
|
+
_context43.next = 5;
|
|
5030
5274
|
return RetrieveOutputNodeId({
|
|
5031
5275
|
client: client
|
|
5032
5276
|
});
|
|
5033
5277
|
case 5:
|
|
5034
|
-
nodeId =
|
|
5278
|
+
nodeId = _context43.sent;
|
|
5035
5279
|
if (!nodeId) {
|
|
5036
|
-
|
|
5280
|
+
_context43.next = 12;
|
|
5037
5281
|
break;
|
|
5038
5282
|
}
|
|
5039
|
-
|
|
5283
|
+
_context43.next = 9;
|
|
5040
5284
|
return client.SpaceNodes({
|
|
5041
5285
|
matchNodeId: nodeId
|
|
5042
5286
|
});
|
|
5043
5287
|
case 9:
|
|
5044
|
-
nodes =
|
|
5045
|
-
fabricUrl = nodes === null || nodes === void 0 || (_nodes$
|
|
5288
|
+
nodes = _context43.sent;
|
|
5289
|
+
fabricUrl = nodes === null || nodes === void 0 || (_nodes$4 = nodes[0]) === null || _nodes$4 === void 0 || (_nodes$4 = _nodes$4.services) === null || _nodes$4 === void 0 || (_nodes$4 = _nodes$4.fabric_api) === null || _nodes$4 === void 0 || (_nodes$4 = _nodes$4.urls) === null || _nodes$4 === void 0 ? void 0 : _nodes$4[0];
|
|
5046
5290
|
if (fabricUrl) {
|
|
5047
5291
|
client.SetNodes({
|
|
5048
5292
|
fabricURIs: [fabricUrl]
|
|
5049
5293
|
});
|
|
5050
5294
|
}
|
|
5051
5295
|
case 12:
|
|
5052
|
-
return
|
|
5296
|
+
return _context43.abrupt("return", {
|
|
5053
5297
|
restore: restore
|
|
5054
5298
|
});
|
|
5055
5299
|
case 13:
|
|
5056
5300
|
case "end":
|
|
5057
|
-
return
|
|
5301
|
+
return _context43.stop();
|
|
5058
5302
|
}
|
|
5059
|
-
},
|
|
5303
|
+
}, _callee43);
|
|
5060
5304
|
}));
|
|
5061
|
-
return function RouteToLiveEgress(
|
|
5062
|
-
return
|
|
5305
|
+
return function RouteToLiveEgress(_x40) {
|
|
5306
|
+
return _ref83.apply(this, arguments);
|
|
5063
5307
|
};
|
|
5064
5308
|
}();
|
|
5065
5309
|
|
|
@@ -5074,66 +5318,70 @@ var RouteToLiveEgress = /*#__PURE__*/function () {
|
|
|
5074
5318
|
* @returns {Promise<string>} - A node ID for the output
|
|
5075
5319
|
*/
|
|
5076
5320
|
var RetrieveOutputNodeId = /*#__PURE__*/function () {
|
|
5077
|
-
var
|
|
5321
|
+
var _ref85 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref84) {
|
|
5078
5322
|
var client, nodeIds, geos, uri, fabricInfo, liveEgressUrls, hostname, nodes;
|
|
5079
|
-
return _regeneratorRuntime.wrap(function
|
|
5080
|
-
while (1) switch (
|
|
5323
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
5324
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
5081
5325
|
case 0:
|
|
5082
|
-
client =
|
|
5326
|
+
client = _ref84.client, nodeIds = _ref84.nodeIds, geos = _ref84.geos;
|
|
5083
5327
|
if (!nodeIds) {
|
|
5084
|
-
|
|
5328
|
+
_context44.next = 3;
|
|
5085
5329
|
break;
|
|
5086
5330
|
}
|
|
5087
|
-
return
|
|
5331
|
+
return _context44.abrupt("return", nodeIds[0]);
|
|
5088
5332
|
case 3:
|
|
5089
5333
|
uri = new URI(client.ConfigUrl());
|
|
5090
5334
|
uri.pathname("/config");
|
|
5091
5335
|
if (geos && geos.length > 0) {
|
|
5092
5336
|
uri.addSearch("elvgeo", geos[0]);
|
|
5093
5337
|
}
|
|
5094
|
-
|
|
5338
|
+
_context44.next = 8;
|
|
5095
5339
|
return client.utils.ResponseToJson(HttpClient.Fetch(uri.toString()));
|
|
5096
5340
|
case 8:
|
|
5097
|
-
fabricInfo =
|
|
5341
|
+
fabricInfo = _context44.sent;
|
|
5098
5342
|
liveEgressUrls = fabricInfo.network.services.live_egress;
|
|
5099
5343
|
if (!(!liveEgressUrls || liveEgressUrls.length === 0)) {
|
|
5100
|
-
|
|
5344
|
+
_context44.next = 12;
|
|
5101
5345
|
break;
|
|
5102
5346
|
}
|
|
5103
5347
|
throw new Error("No live_egress endpoints found in fabric config");
|
|
5104
5348
|
case 12:
|
|
5105
5349
|
// Extract hostname from the first live_egress URL and resolve to a node ID
|
|
5106
5350
|
hostname = new URL(liveEgressUrls[0]).hostname;
|
|
5107
|
-
|
|
5351
|
+
_context44.next = 15;
|
|
5108
5352
|
return client.SpaceNodes({
|
|
5109
5353
|
matchEndpoint: hostname
|
|
5110
5354
|
});
|
|
5111
5355
|
case 15:
|
|
5112
|
-
nodes =
|
|
5356
|
+
nodes = _context44.sent;
|
|
5113
5357
|
if (!(!nodes || nodes.length === 0)) {
|
|
5114
|
-
|
|
5358
|
+
_context44.next = 18;
|
|
5115
5359
|
break;
|
|
5116
5360
|
}
|
|
5117
5361
|
throw new Error("No node found matching live_egress endpoint: ".concat(hostname));
|
|
5118
5362
|
case 18:
|
|
5119
|
-
return
|
|
5363
|
+
return _context44.abrupt("return", nodes[0].id);
|
|
5120
5364
|
case 19:
|
|
5121
5365
|
case "end":
|
|
5122
|
-
return
|
|
5366
|
+
return _context44.stop();
|
|
5123
5367
|
}
|
|
5124
|
-
},
|
|
5368
|
+
}, _callee44);
|
|
5125
5369
|
}));
|
|
5126
|
-
return function RetrieveOutputNodeId(
|
|
5127
|
-
return
|
|
5370
|
+
return function RetrieveOutputNodeId(_x41) {
|
|
5371
|
+
return _ref85.apply(this, arguments);
|
|
5128
5372
|
};
|
|
5129
5373
|
}();
|
|
5130
5374
|
|
|
5131
5375
|
/**
|
|
5132
5376
|
* Create a new live output.
|
|
5133
5377
|
*
|
|
5134
|
-
*
|
|
5135
|
-
*
|
|
5136
|
-
*
|
|
5378
|
+
* The delivery protocol is selected with `delivery.type` and configured with `delivery.settings`,
|
|
5379
|
+
* whose fields match the corresponding delivery block (see {@link OutputSrtPush}, {@link OutputSrtPull},
|
|
5380
|
+
* {@link OutputRtp}, {@link OutputUdp}). The output is pinned to an egress node, resolved in order
|
|
5381
|
+
* (node_ids/elvgeos for srt_pull, node_id/elvgeo for srt_push/rtp/udp):
|
|
5382
|
+
* - the node ID, if provided directly
|
|
5383
|
+
* - the geo, resolved against the fabric config `live_egress` services
|
|
5384
|
+
* - otherwise, the first available `live_egress` node
|
|
5137
5385
|
*
|
|
5138
5386
|
* Note: Output creation and modification is transactional. To create multiple outputs in a single
|
|
5139
5387
|
* transaction, use EditContentObject to open a write token, call CallBitcodeMethod for each output,
|
|
@@ -5144,99 +5392,142 @@ var RetrieveOutputNodeId = /*#__PURE__*/function () {
|
|
|
5144
5392
|
* @param {string=} libraryId - Library ID of the output settings object. If not provided, it will be retrieved automatically.
|
|
5145
5393
|
* @param {string} objectId - Object ID of the outputs settings object
|
|
5146
5394
|
* @param {string=} streamObjectId - Object ID of the input stream to use as the output source
|
|
5395
|
+
* @param {string=} offering - Offering key of the input stream to use
|
|
5396
|
+
* @param {boolean=} enabled - Whether the output is enabled (forced to false when no stream is specified)
|
|
5147
5397
|
* @param {string=} name - Display name for the output
|
|
5148
5398
|
* @param {string=} description - Description of the output
|
|
5149
|
-
* @param {
|
|
5150
|
-
* @param {
|
|
5151
|
-
* @param {string=} passphrase - SRT passphrase for encrypted delivery
|
|
5152
|
-
* @param {boolean=} stripRtp - Whether to strip RTP headers (default: false)
|
|
5153
|
-
* @param {Object=} srtConfig - Additional SRT connection configuration (see openapi-bitcode.html#tocssrtconnectionconfig)
|
|
5399
|
+
* @param {string=} externalId - External identifier for the output
|
|
5400
|
+
* @param {OutputDelivery} delivery - Delivery configuration: `{type, settings}`
|
|
5154
5401
|
*
|
|
5155
5402
|
* @returns {Promise<Object>} - The created output
|
|
5156
5403
|
*/
|
|
5157
5404
|
exports.OutputsCreate = /*#__PURE__*/function () {
|
|
5158
|
-
var
|
|
5159
|
-
var
|
|
5160
|
-
|
|
5161
|
-
|
|
5405
|
+
var _ref87 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref86) {
|
|
5406
|
+
var _settings$node_ids2,
|
|
5407
|
+
_settings$elvgeos,
|
|
5408
|
+
_this8 = this,
|
|
5409
|
+
_settings$connection;
|
|
5410
|
+
var libraryId, objectId, streamObjectId, offering, enabled, name, description, externalId, delivery, _ref88, type, _ref88$settings, settings, isPull, _settings$node_ids3, _settings$elvgeos2, _yield$RouteToLiveEgr4, restore, output, _yield$this$EditConte13, writeToken, outputs;
|
|
5411
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
5412
|
+
while (1) switch (_context45.prev = _context45.next) {
|
|
5162
5413
|
case 0:
|
|
5163
|
-
libraryId =
|
|
5414
|
+
libraryId = _ref86.libraryId, objectId = _ref86.objectId, streamObjectId = _ref86.streamObjectId, offering = _ref86.offering, enabled = _ref86.enabled, name = _ref86.name, description = _ref86.description, externalId = _ref86.externalId, delivery = _ref86.delivery;
|
|
5164
5415
|
ValidateObject(objectId);
|
|
5165
|
-
|
|
5166
|
-
|
|
5416
|
+
_ref88 = delivery || {}, type = _ref88.type, _ref88$settings = _ref88.settings, settings = _ref88$settings === void 0 ? {} : _ref88$settings;
|
|
5417
|
+
if (DELIVERY_PROTOCOLS.includes(type)) {
|
|
5418
|
+
_context45.next = 5;
|
|
5167
5419
|
break;
|
|
5168
5420
|
}
|
|
5169
|
-
throw new Error("
|
|
5170
|
-
case
|
|
5171
|
-
|
|
5172
|
-
|
|
5421
|
+
throw new Error("delivery.type must be one of ".concat(DELIVERY_PROTOCOLS.join(", ")));
|
|
5422
|
+
case 5:
|
|
5423
|
+
// srt_pull uses array node_ids/elvgeos; srt_push/rtp/udp use singular node_id/elvgeo/url
|
|
5424
|
+
isPull = type === "srt_pull";
|
|
5425
|
+
if (!(isPull && (_settings$node_ids2 = settings.node_ids) !== null && _settings$node_ids2 !== void 0 && _settings$node_ids2.length && (_settings$elvgeos = settings.elvgeos) !== null && _settings$elvgeos !== void 0 && _settings$elvgeos.length)) {
|
|
5426
|
+
_context45.next = 8;
|
|
5173
5427
|
break;
|
|
5174
5428
|
}
|
|
5175
|
-
throw new Error("
|
|
5176
|
-
case
|
|
5177
|
-
if (!(
|
|
5178
|
-
|
|
5429
|
+
throw new Error("delivery.settings may specify either node_ids or elvgeos, not both");
|
|
5430
|
+
case 8:
|
|
5431
|
+
if (!(["srt_push", "rtp", "udp"].includes(type) && !settings.url)) {
|
|
5432
|
+
_context45.next = 10;
|
|
5179
5433
|
break;
|
|
5180
5434
|
}
|
|
5181
|
-
throw new Error("
|
|
5182
|
-
case
|
|
5435
|
+
throw new Error("delivery.settings.url is required for ".concat(type, " outputs"));
|
|
5436
|
+
case 10:
|
|
5183
5437
|
if (libraryId) {
|
|
5184
|
-
|
|
5438
|
+
_context45.next = 14;
|
|
5185
5439
|
break;
|
|
5186
5440
|
}
|
|
5187
|
-
|
|
5441
|
+
_context45.next = 13;
|
|
5188
5442
|
return this.ContentObjectLibraryId({
|
|
5189
5443
|
objectId: objectId
|
|
5190
5444
|
});
|
|
5191
|
-
case
|
|
5192
|
-
libraryId =
|
|
5193
|
-
case
|
|
5194
|
-
|
|
5445
|
+
case 13:
|
|
5446
|
+
libraryId = _context45.sent;
|
|
5447
|
+
case 14:
|
|
5448
|
+
if (!isPull) {
|
|
5449
|
+
_context45.next = 30;
|
|
5450
|
+
break;
|
|
5451
|
+
}
|
|
5452
|
+
if ((_settings$node_ids3 = settings.node_ids) !== null && _settings$node_ids3 !== void 0 && _settings$node_ids3.length) {
|
|
5453
|
+
_context45.next = 27;
|
|
5454
|
+
break;
|
|
5455
|
+
}
|
|
5456
|
+
if (!((_settings$elvgeos2 = settings.elvgeos) !== null && _settings$elvgeos2 !== void 0 && _settings$elvgeos2.length)) {
|
|
5457
|
+
_context45.next = 22;
|
|
5458
|
+
break;
|
|
5459
|
+
}
|
|
5460
|
+
_context45.next = 19;
|
|
5461
|
+
return Promise.all(settings.elvgeos.map(function (geo) {
|
|
5462
|
+
return RetrieveOutputNodeId({
|
|
5463
|
+
client: _this8,
|
|
5464
|
+
geos: [geo]
|
|
5465
|
+
});
|
|
5466
|
+
}));
|
|
5467
|
+
case 19:
|
|
5468
|
+
_context45.t0 = _context45.sent;
|
|
5469
|
+
_context45.next = 26;
|
|
5470
|
+
break;
|
|
5471
|
+
case 22:
|
|
5472
|
+
_context45.next = 24;
|
|
5473
|
+
return RetrieveOutputNodeId({
|
|
5474
|
+
client: this
|
|
5475
|
+
});
|
|
5476
|
+
case 24:
|
|
5477
|
+
_context45.t1 = _context45.sent;
|
|
5478
|
+
_context45.t0 = [_context45.t1];
|
|
5479
|
+
case 26:
|
|
5480
|
+
settings.node_ids = _context45.t0;
|
|
5481
|
+
case 27:
|
|
5482
|
+
delete settings.elvgeos;
|
|
5483
|
+
_context45.next = 35;
|
|
5484
|
+
break;
|
|
5485
|
+
case 30:
|
|
5486
|
+
if (settings.node_id) {
|
|
5487
|
+
_context45.next = 34;
|
|
5488
|
+
break;
|
|
5489
|
+
}
|
|
5490
|
+
_context45.next = 33;
|
|
5195
5491
|
return RetrieveOutputNodeId({
|
|
5196
5492
|
client: this,
|
|
5197
|
-
|
|
5198
|
-
geos: geos
|
|
5493
|
+
geos: settings.elvgeo ? [settings.elvgeo] : undefined
|
|
5199
5494
|
});
|
|
5200
|
-
case
|
|
5201
|
-
|
|
5202
|
-
|
|
5495
|
+
case 33:
|
|
5496
|
+
settings.node_id = _context45.sent;
|
|
5497
|
+
case 34:
|
|
5498
|
+
delete settings.elvgeo;
|
|
5499
|
+
case 35:
|
|
5500
|
+
_context45.next = 37;
|
|
5203
5501
|
return RouteToLiveEgress({
|
|
5204
5502
|
client: this
|
|
5205
5503
|
});
|
|
5206
|
-
case
|
|
5207
|
-
_yield$RouteToLiveEgr4 =
|
|
5504
|
+
case 37:
|
|
5505
|
+
_yield$RouteToLiveEgr4 = _context45.sent;
|
|
5208
5506
|
restore = _yield$RouteToLiveEgr4.restore;
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
srtConfig["pb_keylen"] = 16;
|
|
5507
|
+
if ((type === "srt_pull" || type === "srt_push") && (_settings$connection = settings.connection) !== null && _settings$connection !== void 0 && _settings$connection.enforced_encryption && !settings.passphrase) {
|
|
5508
|
+
settings.passphrase = Buffer.from(globalThis.crypto.getRandomValues(new Uint8Array(16))).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
5509
|
+
settings.connection.pb_keylen = 16;
|
|
5213
5510
|
}
|
|
5214
|
-
|
|
5215
|
-
output = {
|
|
5511
|
+
_context45.prev = 40;
|
|
5512
|
+
output = _defineProperty({
|
|
5216
5513
|
enabled: streamObjectId ? enabled : false,
|
|
5217
|
-
// Output must be disabled if no stream specified
|
|
5218
5514
|
name: name,
|
|
5219
5515
|
description: description,
|
|
5220
5516
|
external_id: externalId,
|
|
5221
5517
|
input: streamObjectId ? {
|
|
5222
|
-
stream: streamObjectId
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
passphrase: passphrase,
|
|
5228
|
-
strip_rtp: stripRtp
|
|
5229
|
-
}
|
|
5230
|
-
};
|
|
5231
|
-
_context42.next = 24;
|
|
5518
|
+
stream: streamObjectId,
|
|
5519
|
+
offering: offering
|
|
5520
|
+
} : undefined
|
|
5521
|
+
}, type, settings);
|
|
5522
|
+
_context45.next = 44;
|
|
5232
5523
|
return this.EditContentObject({
|
|
5233
5524
|
libraryId: libraryId,
|
|
5234
5525
|
objectId: objectId
|
|
5235
5526
|
});
|
|
5236
|
-
case
|
|
5237
|
-
_yield$this$EditConte13 =
|
|
5527
|
+
case 44:
|
|
5528
|
+
_yield$this$EditConte13 = _context45.sent;
|
|
5238
5529
|
writeToken = _yield$this$EditConte13.writeToken;
|
|
5239
|
-
|
|
5530
|
+
_context45.next = 48;
|
|
5240
5531
|
return this.CallBitcodeMethod({
|
|
5241
5532
|
libraryId: libraryId,
|
|
5242
5533
|
objectId: objectId,
|
|
@@ -5245,29 +5536,29 @@ exports.OutputsCreate = /*#__PURE__*/function () {
|
|
|
5245
5536
|
constant: false,
|
|
5246
5537
|
body: output
|
|
5247
5538
|
});
|
|
5248
|
-
case
|
|
5249
|
-
outputs =
|
|
5250
|
-
|
|
5539
|
+
case 48:
|
|
5540
|
+
outputs = _context45.sent;
|
|
5541
|
+
_context45.next = 51;
|
|
5251
5542
|
return this.FinalizeContentObject({
|
|
5252
5543
|
libraryId: libraryId,
|
|
5253
5544
|
objectId: objectId,
|
|
5254
5545
|
writeToken: writeToken,
|
|
5255
5546
|
commitMessage: "Create output"
|
|
5256
5547
|
});
|
|
5257
|
-
case
|
|
5258
|
-
return
|
|
5259
|
-
case
|
|
5260
|
-
|
|
5548
|
+
case 51:
|
|
5549
|
+
return _context45.abrupt("return", outputs);
|
|
5550
|
+
case 52:
|
|
5551
|
+
_context45.prev = 52;
|
|
5261
5552
|
restore();
|
|
5262
|
-
return
|
|
5263
|
-
case
|
|
5553
|
+
return _context45.finish(52);
|
|
5554
|
+
case 55:
|
|
5264
5555
|
case "end":
|
|
5265
|
-
return
|
|
5556
|
+
return _context45.stop();
|
|
5266
5557
|
}
|
|
5267
|
-
},
|
|
5558
|
+
}, _callee45, this, [[40,, 52, 55]]);
|
|
5268
5559
|
}));
|
|
5269
|
-
return function (
|
|
5270
|
-
return
|
|
5560
|
+
return function (_x42) {
|
|
5561
|
+
return _ref87.apply(this, arguments);
|
|
5271
5562
|
};
|
|
5272
5563
|
}();
|
|
5273
5564
|
|
|
@@ -5292,50 +5583,51 @@ exports.OutputsCreate = /*#__PURE__*/function () {
|
|
|
5292
5583
|
* @returns {Promise<Object>} - The modified output
|
|
5293
5584
|
*/
|
|
5294
5585
|
exports.OutputsModify = /*#__PURE__*/function () {
|
|
5295
|
-
var
|
|
5296
|
-
var libraryId, objectId, outputId, output, writeToken,
|
|
5297
|
-
return _regeneratorRuntime.wrap(function
|
|
5298
|
-
while (1) switch (
|
|
5586
|
+
var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref89) {
|
|
5587
|
+
var libraryId, objectId, outputId, output, writeToken, _ref89$finalize, finalize, _yield$RouteToLiveEgr5, restore, _deliverySettings$con, _yield$this$EditConte14, deliverySettings, outputs;
|
|
5588
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
5589
|
+
while (1) switch (_context46.prev = _context46.next) {
|
|
5299
5590
|
case 0:
|
|
5300
|
-
libraryId =
|
|
5591
|
+
libraryId = _ref89.libraryId, objectId = _ref89.objectId, outputId = _ref89.outputId, output = _ref89.output, writeToken = _ref89.writeToken, _ref89$finalize = _ref89.finalize, finalize = _ref89$finalize === void 0 ? true : _ref89$finalize;
|
|
5301
5592
|
ValidateObject(objectId);
|
|
5302
5593
|
ValidatePresence("output", output);
|
|
5303
5594
|
if (libraryId) {
|
|
5304
|
-
|
|
5595
|
+
_context46.next = 7;
|
|
5305
5596
|
break;
|
|
5306
5597
|
}
|
|
5307
|
-
|
|
5598
|
+
_context46.next = 6;
|
|
5308
5599
|
return this.ContentObjectLibraryId({
|
|
5309
5600
|
objectId: objectId
|
|
5310
5601
|
});
|
|
5311
5602
|
case 6:
|
|
5312
|
-
libraryId =
|
|
5603
|
+
libraryId = _context46.sent;
|
|
5313
5604
|
case 7:
|
|
5314
|
-
|
|
5605
|
+
_context46.next = 9;
|
|
5315
5606
|
return RouteToLiveEgress({
|
|
5316
5607
|
client: this
|
|
5317
5608
|
});
|
|
5318
5609
|
case 9:
|
|
5319
|
-
_yield$RouteToLiveEgr5 =
|
|
5610
|
+
_yield$RouteToLiveEgr5 = _context46.sent;
|
|
5320
5611
|
restore = _yield$RouteToLiveEgr5.restore;
|
|
5321
|
-
|
|
5612
|
+
_context46.prev = 11;
|
|
5322
5613
|
if (writeToken) {
|
|
5323
|
-
|
|
5614
|
+
_context46.next = 17;
|
|
5324
5615
|
break;
|
|
5325
5616
|
}
|
|
5326
|
-
|
|
5617
|
+
_context46.next = 15;
|
|
5327
5618
|
return this.EditContentObject({
|
|
5328
5619
|
libraryId: libraryId,
|
|
5329
5620
|
objectId: objectId
|
|
5330
5621
|
});
|
|
5331
5622
|
case 15:
|
|
5332
|
-
_yield$this$EditConte14 =
|
|
5623
|
+
_yield$this$EditConte14 = _context46.sent;
|
|
5333
5624
|
writeToken = _yield$this$EditConte14.writeToken;
|
|
5334
5625
|
case 17:
|
|
5335
|
-
|
|
5336
|
-
|
|
5626
|
+
deliverySettings = OutputDeliverySettings(output);
|
|
5627
|
+
if (deliverySettings !== null && deliverySettings !== void 0 && (_deliverySettings$con = deliverySettings.connection) !== null && _deliverySettings$con !== void 0 && _deliverySettings$con.enforced_encryption && !deliverySettings.passphrase) {
|
|
5628
|
+
deliverySettings.passphrase = Buffer.from(globalThis.crypto.getRandomValues(new Uint8Array(16))).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
5337
5629
|
}
|
|
5338
|
-
|
|
5630
|
+
_context46.next = 21;
|
|
5339
5631
|
return this.CallBitcodeMethod({
|
|
5340
5632
|
libraryId: libraryId,
|
|
5341
5633
|
objectId: objectId,
|
|
@@ -5345,33 +5637,33 @@ exports.OutputsModify = /*#__PURE__*/function () {
|
|
|
5345
5637
|
constant: false,
|
|
5346
5638
|
body: output
|
|
5347
5639
|
});
|
|
5348
|
-
case
|
|
5349
|
-
outputs =
|
|
5640
|
+
case 21:
|
|
5641
|
+
outputs = _context46.sent;
|
|
5350
5642
|
if (!finalize) {
|
|
5351
|
-
|
|
5643
|
+
_context46.next = 25;
|
|
5352
5644
|
break;
|
|
5353
5645
|
}
|
|
5354
|
-
|
|
5646
|
+
_context46.next = 25;
|
|
5355
5647
|
return this.FinalizeContentObject({
|
|
5356
5648
|
libraryId: libraryId,
|
|
5357
5649
|
objectId: objectId,
|
|
5358
5650
|
writeToken: writeToken,
|
|
5359
5651
|
commitMessage: "Modify output"
|
|
5360
5652
|
});
|
|
5361
|
-
case 24:
|
|
5362
|
-
return _context43.abrupt("return", outputs);
|
|
5363
5653
|
case 25:
|
|
5364
|
-
|
|
5654
|
+
return _context46.abrupt("return", outputs);
|
|
5655
|
+
case 26:
|
|
5656
|
+
_context46.prev = 26;
|
|
5365
5657
|
restore();
|
|
5366
|
-
return
|
|
5367
|
-
case
|
|
5658
|
+
return _context46.finish(26);
|
|
5659
|
+
case 29:
|
|
5368
5660
|
case "end":
|
|
5369
|
-
return
|
|
5661
|
+
return _context46.stop();
|
|
5370
5662
|
}
|
|
5371
|
-
},
|
|
5663
|
+
}, _callee46, this, [[11,, 26, 29]]);
|
|
5372
5664
|
}));
|
|
5373
|
-
return function (
|
|
5374
|
-
return
|
|
5665
|
+
return function (_x43) {
|
|
5666
|
+
return _ref90.apply(this, arguments);
|
|
5375
5667
|
};
|
|
5376
5668
|
}();
|
|
5377
5669
|
|
|
@@ -5396,34 +5688,34 @@ exports.OutputsModify = /*#__PURE__*/function () {
|
|
|
5396
5688
|
* @returns {Promise<Object>} - The response from the bitcode call
|
|
5397
5689
|
*/
|
|
5398
5690
|
exports.OutputsModifyBatch = /*#__PURE__*/function () {
|
|
5399
|
-
var
|
|
5400
|
-
var libraryId, objectId, outputs, _yield$RouteToLiveEgr6, restore, current, merged,
|
|
5401
|
-
return _regeneratorRuntime.wrap(function
|
|
5402
|
-
while (1) switch (
|
|
5691
|
+
var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref91) {
|
|
5692
|
+
var libraryId, objectId, outputs, _yield$RouteToLiveEgr6, restore, current, merged, _i5, _Object$entries3, _Object$entries3$_i, id, changes, _yield$this$EditConte15, writeToken, result;
|
|
5693
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
5694
|
+
while (1) switch (_context47.prev = _context47.next) {
|
|
5403
5695
|
case 0:
|
|
5404
|
-
libraryId =
|
|
5696
|
+
libraryId = _ref91.libraryId, objectId = _ref91.objectId, outputs = _ref91.outputs;
|
|
5405
5697
|
ValidateObject(objectId);
|
|
5406
5698
|
ValidatePresence("outputs", outputs);
|
|
5407
5699
|
if (libraryId) {
|
|
5408
|
-
|
|
5700
|
+
_context47.next = 7;
|
|
5409
5701
|
break;
|
|
5410
5702
|
}
|
|
5411
|
-
|
|
5703
|
+
_context47.next = 6;
|
|
5412
5704
|
return this.ContentObjectLibraryId({
|
|
5413
5705
|
objectId: objectId
|
|
5414
5706
|
});
|
|
5415
5707
|
case 6:
|
|
5416
|
-
libraryId =
|
|
5708
|
+
libraryId = _context47.sent;
|
|
5417
5709
|
case 7:
|
|
5418
|
-
|
|
5710
|
+
_context47.next = 9;
|
|
5419
5711
|
return RouteToLiveEgress({
|
|
5420
5712
|
client: this
|
|
5421
5713
|
});
|
|
5422
5714
|
case 9:
|
|
5423
|
-
_yield$RouteToLiveEgr6 =
|
|
5715
|
+
_yield$RouteToLiveEgr6 = _context47.sent;
|
|
5424
5716
|
restore = _yield$RouteToLiveEgr6.restore;
|
|
5425
|
-
|
|
5426
|
-
|
|
5717
|
+
_context47.prev = 11;
|
|
5718
|
+
_context47.next = 14;
|
|
5427
5719
|
return this.CallBitcodeMethod({
|
|
5428
5720
|
libraryId: libraryId,
|
|
5429
5721
|
objectId: objectId,
|
|
@@ -5431,21 +5723,21 @@ exports.OutputsModifyBatch = /*#__PURE__*/function () {
|
|
|
5431
5723
|
constant: true
|
|
5432
5724
|
});
|
|
5433
5725
|
case 14:
|
|
5434
|
-
current =
|
|
5726
|
+
current = _context47.sent;
|
|
5435
5727
|
merged = _objectSpread({}, current);
|
|
5436
|
-
for (
|
|
5437
|
-
_Object$
|
|
5728
|
+
for (_i5 = 0, _Object$entries3 = Object.entries(outputs); _i5 < _Object$entries3.length; _i5++) {
|
|
5729
|
+
_Object$entries3$_i = _slicedToArray(_Object$entries3[_i5], 2), id = _Object$entries3$_i[0], changes = _Object$entries3$_i[1];
|
|
5438
5730
|
merged[id] = _objectSpread(_objectSpread({}, current[id] || {}), changes);
|
|
5439
5731
|
}
|
|
5440
|
-
|
|
5732
|
+
_context47.next = 19;
|
|
5441
5733
|
return this.EditContentObject({
|
|
5442
5734
|
libraryId: libraryId,
|
|
5443
5735
|
objectId: objectId
|
|
5444
5736
|
});
|
|
5445
5737
|
case 19:
|
|
5446
|
-
_yield$this$EditConte15 =
|
|
5738
|
+
_yield$this$EditConte15 = _context47.sent;
|
|
5447
5739
|
writeToken = _yield$this$EditConte15.writeToken;
|
|
5448
|
-
|
|
5740
|
+
_context47.next = 23;
|
|
5449
5741
|
return this.CallBitcodeMethod({
|
|
5450
5742
|
libraryId: libraryId,
|
|
5451
5743
|
objectId: objectId,
|
|
@@ -5456,8 +5748,8 @@ exports.OutputsModifyBatch = /*#__PURE__*/function () {
|
|
|
5456
5748
|
body: merged
|
|
5457
5749
|
});
|
|
5458
5750
|
case 23:
|
|
5459
|
-
result =
|
|
5460
|
-
|
|
5751
|
+
result = _context47.sent;
|
|
5752
|
+
_context47.next = 26;
|
|
5461
5753
|
return this.FinalizeContentObject({
|
|
5462
5754
|
libraryId: libraryId,
|
|
5463
5755
|
objectId: objectId,
|
|
@@ -5465,19 +5757,19 @@ exports.OutputsModifyBatch = /*#__PURE__*/function () {
|
|
|
5465
5757
|
commitMessage: "Modify outputs (batch)"
|
|
5466
5758
|
});
|
|
5467
5759
|
case 26:
|
|
5468
|
-
return
|
|
5760
|
+
return _context47.abrupt("return", result);
|
|
5469
5761
|
case 27:
|
|
5470
|
-
|
|
5762
|
+
_context47.prev = 27;
|
|
5471
5763
|
restore();
|
|
5472
|
-
return
|
|
5764
|
+
return _context47.finish(27);
|
|
5473
5765
|
case 30:
|
|
5474
5766
|
case "end":
|
|
5475
|
-
return
|
|
5767
|
+
return _context47.stop();
|
|
5476
5768
|
}
|
|
5477
|
-
},
|
|
5769
|
+
}, _callee47, this, [[11,, 27, 30]]);
|
|
5478
5770
|
}));
|
|
5479
|
-
return function (
|
|
5480
|
-
return
|
|
5771
|
+
return function (_x44) {
|
|
5772
|
+
return _ref92.apply(this, arguments);
|
|
5481
5773
|
};
|
|
5482
5774
|
}();
|
|
5483
5775
|
|
|
@@ -5493,33 +5785,33 @@ exports.OutputsModifyBatch = /*#__PURE__*/function () {
|
|
|
5493
5785
|
* @returns {Promise<Object>} - Response from the stop call
|
|
5494
5786
|
*/
|
|
5495
5787
|
exports.OutputsStop = /*#__PURE__*/function () {
|
|
5496
|
-
var
|
|
5497
|
-
var libraryId, objectId, outputId, _yield$RouteToLiveEgr7, restore, _yield$this$EditConte16, writeToken;
|
|
5498
|
-
return _regeneratorRuntime.wrap(function
|
|
5499
|
-
while (1) switch (
|
|
5788
|
+
var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref93) {
|
|
5789
|
+
var libraryId, objectId, outputId, _yield$RouteToLiveEgr7, restore, _yield$this$EditConte16, writeToken, response;
|
|
5790
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
5791
|
+
while (1) switch (_context48.prev = _context48.next) {
|
|
5500
5792
|
case 0:
|
|
5501
|
-
libraryId =
|
|
5793
|
+
libraryId = _ref93.libraryId, objectId = _ref93.objectId, outputId = _ref93.outputId;
|
|
5502
5794
|
ValidateObject(objectId);
|
|
5503
5795
|
ValidatePresence("outputId", outputId);
|
|
5504
5796
|
if (libraryId) {
|
|
5505
|
-
|
|
5797
|
+
_context48.next = 7;
|
|
5506
5798
|
break;
|
|
5507
5799
|
}
|
|
5508
|
-
|
|
5800
|
+
_context48.next = 6;
|
|
5509
5801
|
return this.ContentObjectLibraryId({
|
|
5510
5802
|
objectId: objectId
|
|
5511
5803
|
});
|
|
5512
5804
|
case 6:
|
|
5513
|
-
libraryId =
|
|
5805
|
+
libraryId = _context48.sent;
|
|
5514
5806
|
case 7:
|
|
5515
|
-
|
|
5807
|
+
_context48.next = 9;
|
|
5516
5808
|
return RouteToLiveEgress({
|
|
5517
5809
|
client: this
|
|
5518
5810
|
});
|
|
5519
5811
|
case 9:
|
|
5520
|
-
_yield$RouteToLiveEgr7 =
|
|
5812
|
+
_yield$RouteToLiveEgr7 = _context48.sent;
|
|
5521
5813
|
restore = _yield$RouteToLiveEgr7.restore;
|
|
5522
|
-
|
|
5814
|
+
_context48.next = 13;
|
|
5523
5815
|
return RouteToOutputNode({
|
|
5524
5816
|
client: this,
|
|
5525
5817
|
libraryId: libraryId,
|
|
@@ -5527,16 +5819,16 @@ exports.OutputsStop = /*#__PURE__*/function () {
|
|
|
5527
5819
|
outputId: outputId
|
|
5528
5820
|
});
|
|
5529
5821
|
case 13:
|
|
5530
|
-
|
|
5531
|
-
|
|
5822
|
+
_context48.prev = 13;
|
|
5823
|
+
_context48.next = 16;
|
|
5532
5824
|
return this.EditContentObject({
|
|
5533
5825
|
libraryId: libraryId,
|
|
5534
5826
|
objectId: objectId
|
|
5535
5827
|
});
|
|
5536
5828
|
case 16:
|
|
5537
|
-
_yield$this$EditConte16 =
|
|
5829
|
+
_yield$this$EditConte16 = _context48.sent;
|
|
5538
5830
|
writeToken = _yield$this$EditConte16.writeToken;
|
|
5539
|
-
|
|
5831
|
+
_context48.next = 20;
|
|
5540
5832
|
return this.CallBitcodeMethod({
|
|
5541
5833
|
libraryId: libraryId,
|
|
5542
5834
|
objectId: objectId,
|
|
@@ -5545,19 +5837,96 @@ exports.OutputsStop = /*#__PURE__*/function () {
|
|
|
5545
5837
|
constant: false
|
|
5546
5838
|
});
|
|
5547
5839
|
case 20:
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5840
|
+
response = _context48.sent;
|
|
5841
|
+
_context48.next = 23;
|
|
5842
|
+
return this.DeleteWriteToken({
|
|
5843
|
+
writeToken: writeToken
|
|
5844
|
+
});
|
|
5845
|
+
case 23:
|
|
5846
|
+
return _context48.abrupt("return", response);
|
|
5553
5847
|
case 24:
|
|
5848
|
+
_context48.prev = 24;
|
|
5849
|
+
restore();
|
|
5850
|
+
return _context48.finish(24);
|
|
5851
|
+
case 27:
|
|
5554
5852
|
case "end":
|
|
5555
|
-
return
|
|
5853
|
+
return _context48.stop();
|
|
5556
5854
|
}
|
|
5557
|
-
},
|
|
5855
|
+
}, _callee48, this, [[13,, 24, 27]]);
|
|
5558
5856
|
}));
|
|
5559
|
-
return function (
|
|
5560
|
-
return
|
|
5857
|
+
return function (_x45) {
|
|
5858
|
+
return _ref94.apply(this, arguments);
|
|
5859
|
+
};
|
|
5860
|
+
}();
|
|
5861
|
+
|
|
5862
|
+
/**
|
|
5863
|
+
* Reset a live output.
|
|
5864
|
+
*
|
|
5865
|
+
* @methodGroup Live Stream
|
|
5866
|
+
* @namedParams
|
|
5867
|
+
* @param {string=} libraryId - Library ID of the output settings object. If not provided, it will be retrieved automatically.
|
|
5868
|
+
* @param {string} objectId - Object ID of the output settings object
|
|
5869
|
+
* @param {string} outputId - ID of the output to reset
|
|
5870
|
+
*
|
|
5871
|
+
* @returns {Promise<Object>} - Response from the reset call
|
|
5872
|
+
*/
|
|
5873
|
+
exports.OutputsReset = /*#__PURE__*/function () {
|
|
5874
|
+
var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref95) {
|
|
5875
|
+
var libraryId, objectId, outputId, _yield$RouteToLiveEgr8, restore;
|
|
5876
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
5877
|
+
while (1) switch (_context49.prev = _context49.next) {
|
|
5878
|
+
case 0:
|
|
5879
|
+
libraryId = _ref95.libraryId, objectId = _ref95.objectId, outputId = _ref95.outputId;
|
|
5880
|
+
ValidateObject(objectId);
|
|
5881
|
+
ValidatePresence("outputId", outputId);
|
|
5882
|
+
if (libraryId) {
|
|
5883
|
+
_context49.next = 7;
|
|
5884
|
+
break;
|
|
5885
|
+
}
|
|
5886
|
+
_context49.next = 6;
|
|
5887
|
+
return this.ContentObjectLibraryId({
|
|
5888
|
+
objectId: objectId
|
|
5889
|
+
});
|
|
5890
|
+
case 6:
|
|
5891
|
+
libraryId = _context49.sent;
|
|
5892
|
+
case 7:
|
|
5893
|
+
_context49.next = 9;
|
|
5894
|
+
return RouteToLiveEgress({
|
|
5895
|
+
client: this
|
|
5896
|
+
});
|
|
5897
|
+
case 9:
|
|
5898
|
+
_yield$RouteToLiveEgr8 = _context49.sent;
|
|
5899
|
+
restore = _yield$RouteToLiveEgr8.restore;
|
|
5900
|
+
_context49.next = 13;
|
|
5901
|
+
return RouteToOutputNode({
|
|
5902
|
+
client: this,
|
|
5903
|
+
libraryId: libraryId,
|
|
5904
|
+
objectId: objectId,
|
|
5905
|
+
outputId: outputId
|
|
5906
|
+
});
|
|
5907
|
+
case 13:
|
|
5908
|
+
_context49.prev = 13;
|
|
5909
|
+
_context49.next = 16;
|
|
5910
|
+
return this.CallBitcodeMethod({
|
|
5911
|
+
libraryId: libraryId,
|
|
5912
|
+
objectId: objectId,
|
|
5913
|
+
method: UrlJoin("live", "outputs", outputId, "ctrl", "reset"),
|
|
5914
|
+
constant: false
|
|
5915
|
+
});
|
|
5916
|
+
case 16:
|
|
5917
|
+
return _context49.abrupt("return", _context49.sent);
|
|
5918
|
+
case 17:
|
|
5919
|
+
_context49.prev = 17;
|
|
5920
|
+
restore();
|
|
5921
|
+
return _context49.finish(17);
|
|
5922
|
+
case 20:
|
|
5923
|
+
case "end":
|
|
5924
|
+
return _context49.stop();
|
|
5925
|
+
}
|
|
5926
|
+
}, _callee49, this, [[13,, 17, 20]]);
|
|
5927
|
+
}));
|
|
5928
|
+
return function (_x46) {
|
|
5929
|
+
return _ref96.apply(this, arguments);
|
|
5561
5930
|
};
|
|
5562
5931
|
}();
|
|
5563
5932
|
|
|
@@ -5573,42 +5942,42 @@ exports.OutputsStop = /*#__PURE__*/function () {
|
|
|
5573
5942
|
* @returns {Promise<Object>} - Response from the delete call
|
|
5574
5943
|
*/
|
|
5575
5944
|
exports.OutputsDelete = /*#__PURE__*/function () {
|
|
5576
|
-
var
|
|
5577
|
-
var libraryId, objectId, outputId, _yield$
|
|
5578
|
-
return _regeneratorRuntime.wrap(function
|
|
5579
|
-
while (1) switch (
|
|
5945
|
+
var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref97) {
|
|
5946
|
+
var libraryId, objectId, outputId, _yield$RouteToLiveEgr9, restore, _yield$this$EditConte17, writeToken, result;
|
|
5947
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
5948
|
+
while (1) switch (_context50.prev = _context50.next) {
|
|
5580
5949
|
case 0:
|
|
5581
|
-
libraryId =
|
|
5950
|
+
libraryId = _ref97.libraryId, objectId = _ref97.objectId, outputId = _ref97.outputId;
|
|
5582
5951
|
ValidateObject(objectId);
|
|
5583
5952
|
ValidatePresence("outputId", outputId);
|
|
5584
5953
|
if (libraryId) {
|
|
5585
|
-
|
|
5954
|
+
_context50.next = 7;
|
|
5586
5955
|
break;
|
|
5587
5956
|
}
|
|
5588
|
-
|
|
5957
|
+
_context50.next = 6;
|
|
5589
5958
|
return this.ContentObjectLibraryId({
|
|
5590
5959
|
objectId: objectId
|
|
5591
5960
|
});
|
|
5592
5961
|
case 6:
|
|
5593
|
-
libraryId =
|
|
5962
|
+
libraryId = _context50.sent;
|
|
5594
5963
|
case 7:
|
|
5595
|
-
|
|
5964
|
+
_context50.next = 9;
|
|
5596
5965
|
return RouteToLiveEgress({
|
|
5597
5966
|
client: this
|
|
5598
5967
|
});
|
|
5599
5968
|
case 9:
|
|
5600
|
-
_yield$
|
|
5601
|
-
restore = _yield$
|
|
5602
|
-
|
|
5603
|
-
|
|
5969
|
+
_yield$RouteToLiveEgr9 = _context50.sent;
|
|
5970
|
+
restore = _yield$RouteToLiveEgr9.restore;
|
|
5971
|
+
_context50.prev = 11;
|
|
5972
|
+
_context50.next = 14;
|
|
5604
5973
|
return this.EditContentObject({
|
|
5605
5974
|
libraryId: libraryId,
|
|
5606
5975
|
objectId: objectId
|
|
5607
5976
|
});
|
|
5608
5977
|
case 14:
|
|
5609
|
-
_yield$this$EditConte17 =
|
|
5978
|
+
_yield$this$EditConte17 = _context50.sent;
|
|
5610
5979
|
writeToken = _yield$this$EditConte17.writeToken;
|
|
5611
|
-
|
|
5980
|
+
_context50.next = 18;
|
|
5612
5981
|
return this.CallBitcodeMethod({
|
|
5613
5982
|
libraryId: libraryId,
|
|
5614
5983
|
objectId: objectId,
|
|
@@ -5618,8 +5987,8 @@ exports.OutputsDelete = /*#__PURE__*/function () {
|
|
|
5618
5987
|
constant: false
|
|
5619
5988
|
});
|
|
5620
5989
|
case 18:
|
|
5621
|
-
result =
|
|
5622
|
-
|
|
5990
|
+
result = _context50.sent;
|
|
5991
|
+
_context50.next = 21;
|
|
5623
5992
|
return this.FinalizeContentObject({
|
|
5624
5993
|
libraryId: libraryId,
|
|
5625
5994
|
objectId: objectId,
|
|
@@ -5627,19 +5996,19 @@ exports.OutputsDelete = /*#__PURE__*/function () {
|
|
|
5627
5996
|
commitMessage: "Remove output"
|
|
5628
5997
|
});
|
|
5629
5998
|
case 21:
|
|
5630
|
-
return
|
|
5999
|
+
return _context50.abrupt("return", result);
|
|
5631
6000
|
case 22:
|
|
5632
|
-
|
|
6001
|
+
_context50.prev = 22;
|
|
5633
6002
|
restore();
|
|
5634
|
-
return
|
|
6003
|
+
return _context50.finish(22);
|
|
5635
6004
|
case 25:
|
|
5636
6005
|
case "end":
|
|
5637
|
-
return
|
|
6006
|
+
return _context50.stop();
|
|
5638
6007
|
}
|
|
5639
|
-
},
|
|
6008
|
+
}, _callee50, this, [[11,, 22, 25]]);
|
|
5640
6009
|
}));
|
|
5641
|
-
return function (
|
|
5642
|
-
return
|
|
6010
|
+
return function (_x47) {
|
|
6011
|
+
return _ref98.apply(this, arguments);
|
|
5643
6012
|
};
|
|
5644
6013
|
}();
|
|
5645
6014
|
|
|
@@ -5652,45 +6021,56 @@ exports.OutputsDelete = /*#__PURE__*/function () {
|
|
|
5652
6021
|
* @param {string} objectId - Object ID of the output settings object
|
|
5653
6022
|
* @param {Array<string>} outputs - List of output IDs to delete
|
|
5654
6023
|
*
|
|
5655
|
-
* @returns {Promise<Object
|
|
6024
|
+
* @returns {Promise<Array<Object>>} - Responses from each delete call, in input order
|
|
5656
6025
|
*/
|
|
5657
6026
|
exports.OutputsDeleteBatch = /*#__PURE__*/function () {
|
|
5658
|
-
var
|
|
5659
|
-
var libraryId, objectId, outputs, _yield$
|
|
5660
|
-
return _regeneratorRuntime.wrap(function
|
|
5661
|
-
while (1) switch (
|
|
6027
|
+
var _ref100 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref99) {
|
|
6028
|
+
var libraryId, objectId, outputs, _yield$RouteToLiveEgr10, restore, _yield$this$EditConte18, writeToken, results, _iterator2, _step2, outputId;
|
|
6029
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
6030
|
+
while (1) switch (_context51.prev = _context51.next) {
|
|
5662
6031
|
case 0:
|
|
5663
|
-
libraryId =
|
|
6032
|
+
libraryId = _ref99.libraryId, objectId = _ref99.objectId, outputs = _ref99.outputs;
|
|
5664
6033
|
ValidateObject(objectId);
|
|
5665
6034
|
ValidatePresence("outputs", outputs);
|
|
5666
6035
|
if (libraryId) {
|
|
5667
|
-
|
|
6036
|
+
_context51.next = 7;
|
|
5668
6037
|
break;
|
|
5669
6038
|
}
|
|
5670
|
-
|
|
6039
|
+
_context51.next = 6;
|
|
5671
6040
|
return this.ContentObjectLibraryId({
|
|
5672
6041
|
objectId: objectId
|
|
5673
6042
|
});
|
|
5674
6043
|
case 6:
|
|
5675
|
-
libraryId =
|
|
6044
|
+
libraryId = _context51.sent;
|
|
5676
6045
|
case 7:
|
|
5677
|
-
|
|
6046
|
+
_context51.next = 9;
|
|
5678
6047
|
return RouteToLiveEgress({
|
|
5679
6048
|
client: this
|
|
5680
6049
|
});
|
|
5681
6050
|
case 9:
|
|
5682
|
-
_yield$
|
|
5683
|
-
restore = _yield$
|
|
5684
|
-
|
|
5685
|
-
|
|
6051
|
+
_yield$RouteToLiveEgr10 = _context51.sent;
|
|
6052
|
+
restore = _yield$RouteToLiveEgr10.restore;
|
|
6053
|
+
_context51.prev = 11;
|
|
6054
|
+
_context51.next = 14;
|
|
5686
6055
|
return this.EditContentObject({
|
|
5687
6056
|
libraryId: libraryId,
|
|
5688
6057
|
objectId: objectId
|
|
5689
6058
|
});
|
|
5690
6059
|
case 14:
|
|
5691
|
-
_yield$this$EditConte18 =
|
|
6060
|
+
_yield$this$EditConte18 = _context51.sent;
|
|
5692
6061
|
writeToken = _yield$this$EditConte18.writeToken;
|
|
5693
|
-
|
|
6062
|
+
results = [];
|
|
6063
|
+
_iterator2 = _createForOfIteratorHelper(outputs);
|
|
6064
|
+
_context51.prev = 18;
|
|
6065
|
+
_iterator2.s();
|
|
6066
|
+
case 20:
|
|
6067
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
6068
|
+
_context51.next = 29;
|
|
6069
|
+
break;
|
|
6070
|
+
}
|
|
6071
|
+
outputId = _step2.value;
|
|
6072
|
+
_context51.t0 = results;
|
|
6073
|
+
_context51.next = 25;
|
|
5694
6074
|
return this.CallBitcodeMethod({
|
|
5695
6075
|
libraryId: libraryId,
|
|
5696
6076
|
objectId: objectId,
|
|
@@ -5699,28 +6079,44 @@ exports.OutputsDeleteBatch = /*#__PURE__*/function () {
|
|
|
5699
6079
|
verb: "DELETE",
|
|
5700
6080
|
constant: false
|
|
5701
6081
|
});
|
|
5702
|
-
case
|
|
5703
|
-
|
|
5704
|
-
|
|
6082
|
+
case 25:
|
|
6083
|
+
_context51.t1 = _context51.sent;
|
|
6084
|
+
_context51.t0.push.call(_context51.t0, _context51.t1);
|
|
6085
|
+
case 27:
|
|
6086
|
+
_context51.next = 20;
|
|
6087
|
+
break;
|
|
6088
|
+
case 29:
|
|
6089
|
+
_context51.next = 34;
|
|
6090
|
+
break;
|
|
6091
|
+
case 31:
|
|
6092
|
+
_context51.prev = 31;
|
|
6093
|
+
_context51.t2 = _context51["catch"](18);
|
|
6094
|
+
_iterator2.e(_context51.t2);
|
|
6095
|
+
case 34:
|
|
6096
|
+
_context51.prev = 34;
|
|
6097
|
+
_iterator2.f();
|
|
6098
|
+
return _context51.finish(34);
|
|
6099
|
+
case 37:
|
|
6100
|
+
_context51.next = 39;
|
|
5705
6101
|
return this.FinalizeContentObject({
|
|
5706
6102
|
libraryId: libraryId,
|
|
5707
6103
|
objectId: objectId,
|
|
5708
6104
|
writeToken: writeToken,
|
|
5709
6105
|
commitMessage: "Remove outputs (batch)"
|
|
5710
6106
|
});
|
|
5711
|
-
case
|
|
5712
|
-
return
|
|
5713
|
-
case
|
|
5714
|
-
|
|
6107
|
+
case 39:
|
|
6108
|
+
return _context51.abrupt("return", results);
|
|
6109
|
+
case 40:
|
|
6110
|
+
_context51.prev = 40;
|
|
5715
6111
|
restore();
|
|
5716
|
-
return
|
|
5717
|
-
case
|
|
6112
|
+
return _context51.finish(40);
|
|
6113
|
+
case 43:
|
|
5718
6114
|
case "end":
|
|
5719
|
-
return
|
|
6115
|
+
return _context51.stop();
|
|
5720
6116
|
}
|
|
5721
|
-
},
|
|
6117
|
+
}, _callee51, this, [[11,, 40, 43], [18, 31, 34, 37]]);
|
|
5722
6118
|
}));
|
|
5723
|
-
return function (
|
|
5724
|
-
return
|
|
6119
|
+
return function (_x48) {
|
|
6120
|
+
return _ref100.apply(this, arguments);
|
|
5725
6121
|
};
|
|
5726
6122
|
}();
|