@eluvio/elv-client-js 4.2.15 → 4.2.17

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.
Files changed (41) hide show
  1. package/dist/ElvClient-min.js +1 -1
  2. package/dist/ElvClient-node-min.js +1 -1
  3. package/dist/ElvFrameClient-min.js +1 -1
  4. package/dist/ElvPermissionsClient-min.js +1 -1
  5. package/dist/ElvWalletClient-min.js +1 -1
  6. package/dist/ElvWalletClient-node-min.js +1 -1
  7. package/dist/src/AuthorizationClient.js +2 -1
  8. package/dist/src/ContentObjectAudit.js +2 -1
  9. package/dist/src/ContentObjectVerification.js +281 -0
  10. package/dist/src/ElvClient.js +8 -9
  11. package/dist/src/FrameClient.js +1 -1
  12. package/dist/src/HttpClient.js +83 -47
  13. package/dist/src/NetworkUrls.js +8 -0
  14. package/dist/src/abr_profiles/abr_profile_live_drm.js +0 -10
  15. package/dist/src/client/ContentAccess.js +76 -85
  16. package/dist/src/client/LiveConf.js +170 -84
  17. package/dist/src/client/LiveStream.js +5205 -2118
  18. package/dist/src/live_recording_config_profiles/live_recording_config_default.js +45 -0
  19. package/package.json +3 -2
  20. package/src/AuthorizationClient.js +2 -1
  21. package/src/ContentObjectAudit.js +4 -1
  22. package/src/ElvClient.js +8 -15
  23. package/src/FrameClient.js +23 -2
  24. package/src/HttpClient.js +17 -1
  25. package/src/NetworkUrls.js +9 -0
  26. package/src/abr_profiles/abr_profile_live_drm.js +0 -10
  27. package/src/client/ContentAccess.js +8 -23
  28. package/src/client/LiveConf.js +149 -65
  29. package/src/client/LiveStream.js +2592 -654
  30. package/src/live_recording_config_profiles/live_recording_config_default.js +54 -0
  31. package/src/live_recording_config_profiles/live_stream_profile_full.json +143 -0
  32. package/testScripts/StreamUpdateLinks.js +95 -0
  33. package/utilities/ChannelCreate.js +1 -1
  34. package/utilities/LibraryDownloadMp4.js +54 -8
  35. package/utilities/LibraryDownloadMp4Parallel.js +544 -0
  36. package/utilities/LiveOutputs.js +149 -0
  37. package/utilities/StreamCreate.js +53 -0
  38. package/utilities/lib/concerns/Client.js +5 -0
  39. package/utilities/lib/helpers.js +5 -1
  40. package/utilities/tests/mocks/ElvClient.mock.js +9 -1
  41. package/utilities/tests/unit/StreamCreate.test.js +39 -0
@@ -2375,7 +2375,7 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2375
2375
  i = 0;
2376
2376
  case 70:
2377
2377
  if (!(i < playoutOptions.length)) {
2378
- _context32.next = 135;
2378
+ _context32.next = 136;
2379
2379
  break;
2380
2380
  }
2381
2381
  option = playoutOptions[i];
@@ -2409,11 +2409,12 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2409
2409
  _context32.t21 = _defineProperty;
2410
2410
  _context32.t22 = {};
2411
2411
  _context32.t23 = drm || "clear";
2412
+ _context32.t24 = option.properties || {};
2412
2413
  if (!signedLink) {
2413
- _context32.next = 98;
2414
+ _context32.next = 99;
2414
2415
  break;
2415
2416
  }
2416
- _context32.next = 95;
2417
+ _context32.next = 96;
2417
2418
  return this.LinkUrl({
2418
2419
  versionHash: versionHash,
2419
2420
  writeToken: writeToken,
@@ -2421,12 +2422,12 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2421
2422
  queryParams: queryParams,
2422
2423
  noAuth: true
2423
2424
  });
2424
- case 95:
2425
- _context32.t24 = _context32.sent;
2426
- _context32.next = 101;
2425
+ case 96:
2426
+ _context32.t25 = _context32.sent;
2427
+ _context32.next = 102;
2427
2428
  break;
2428
- case 98:
2429
- _context32.next = 100;
2429
+ case 99:
2430
+ _context32.next = 101;
2430
2431
  return this.Rep({
2431
2432
  libraryId: linkTarget.libraryId || libraryId,
2432
2433
  objectId: linkTarget.objectId || objectId,
@@ -2436,26 +2437,26 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2436
2437
  noAuth: true,
2437
2438
  queryParams: queryParams
2438
2439
  });
2439
- case 100:
2440
- _context32.t24 = _context32.sent;
2441
2440
  case 101:
2442
- _context32.t25 = _context32.t24;
2441
+ _context32.t25 = _context32.sent;
2442
+ case 102:
2443
+ _context32.t26 = _context32.t25;
2443
2444
  if (!signedLink) {
2444
- _context32.next = 108;
2445
+ _context32.next = 109;
2445
2446
  break;
2446
2447
  }
2447
- _context32.next = 105;
2448
+ _context32.next = 106;
2448
2449
  return this.GlobalUrl({
2449
2450
  versionHash: versionHash,
2450
2451
  path: UrlJoin(linkPath, offering, playoutPath),
2451
2452
  queryParams: queryParams
2452
2453
  });
2453
- case 105:
2454
- _context32.t26 = _context32.sent;
2455
- _context32.next = 111;
2454
+ case 106:
2455
+ _context32.t27 = _context32.sent;
2456
+ _context32.next = 112;
2456
2457
  break;
2457
- case 108:
2458
- _context32.next = 110;
2458
+ case 109:
2459
+ _context32.next = 111;
2459
2460
  return this.GlobalUrl({
2460
2461
  libraryId: linkTarget.libraryId || libraryId,
2461
2462
  objectId: linkTarget.objectId || objectId,
@@ -2463,23 +2464,23 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2463
2464
  path: UrlJoin("rep", handler, offering, playoutPath),
2464
2465
  queryParams: queryParams
2465
2466
  });
2466
- case 110:
2467
- _context32.t26 = _context32.sent;
2468
2467
  case 111:
2469
- _context32.t27 = _context32.t26;
2470
- _context32.t28 = drm ? _defineProperty({}, drm, {
2468
+ _context32.t27 = _context32.sent;
2469
+ case 112:
2470
+ _context32.t28 = _context32.t27;
2471
+ _context32.t29 = drm ? _defineProperty({}, drm, {
2471
2472
  licenseServers: licenseServers,
2472
2473
  cert: cert
2473
2474
  }) : undefined;
2474
2475
  if (thumbnailTrackUri) {
2475
- _context32.next = 117;
2476
+ _context32.next = 118;
2476
2477
  break;
2477
2478
  }
2478
- _context32.t29 = undefined;
2479
- _context32.next = 120;
2479
+ _context32.t30 = undefined;
2480
+ _context32.next = 121;
2480
2481
  break;
2481
- case 117:
2482
- _context32.next = 119;
2482
+ case 118:
2483
+ _context32.next = 120;
2483
2484
  return this.Rep({
2484
2485
  libraryId: linkTarget.libraryId || libraryId,
2485
2486
  objectId: linkTarget.objectId || objectId,
@@ -2487,22 +2488,23 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2487
2488
  rep: UrlJoin(handler, offering, thumbnailTrackUri),
2488
2489
  queryParams: queryParams
2489
2490
  });
2490
- case 119:
2491
- _context32.t29 = _context32.sent;
2492
2491
  case 120:
2493
- _context32.t30 = _context32.t29;
2494
- _context32.t31 = {
2495
- playoutUrl: _context32.t25,
2496
- globalPlayoutUrl: _context32.t27,
2497
- drms: _context32.t28,
2498
- thumbnailTrack: _context32.t30
2492
+ _context32.t30 = _context32.sent;
2493
+ case 121:
2494
+ _context32.t31 = _context32.t30;
2495
+ _context32.t32 = {
2496
+ properties: _context32.t24,
2497
+ playoutUrl: _context32.t26,
2498
+ globalPlayoutUrl: _context32.t28,
2499
+ drms: _context32.t29,
2500
+ thumbnailTrack: _context32.t31
2499
2501
  };
2500
- _context32.t32 = (0, _context32.t21)(_context32.t22, _context32.t23, _context32.t31);
2501
- _context32.t33 = (0, _context32.t18)(_context32.t19, _context32.t20, _context32.t32);
2502
- _context32.t34 = {
2503
- playoutMethods: _context32.t33
2502
+ _context32.t33 = (0, _context32.t21)(_context32.t22, _context32.t23, _context32.t32);
2503
+ _context32.t34 = (0, _context32.t18)(_context32.t19, _context32.t20, _context32.t33);
2504
+ _context32.t35 = {
2505
+ playoutMethods: _context32.t34
2504
2506
  };
2505
- playoutMap[protocol] = (0, _context32.t15)(_context32.t16, _context32.t17, _context32.t34);
2507
+ playoutMap[protocol] = (0, _context32.t15)(_context32.t16, _context32.t17, _context32.t35);
2506
2508
  // Add .cert_url if playoutMap[protocol].playoutMethods[].drms[].cert is present
2507
2509
  // (for clients that need cert supplied as a URL reference rather than as a string literal)
2508
2510
  for (method in playoutMap[protocol].playoutMethods) {
@@ -2518,21 +2520,21 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2518
2520
  protocolMatch = protocols.includes(protocol);
2519
2521
  drmMatch = drms.includes(drm || "clear") || drms.length === 0 && !drm;
2520
2522
  if (!(!protocolMatch || !drmMatch)) {
2521
- _context32.next = 131;
2523
+ _context32.next = 132;
2522
2524
  break;
2523
2525
  }
2524
- return _context32.abrupt("continue", 132);
2525
- case 131:
2526
+ return _context32.abrupt("continue", 133);
2527
+ case 132:
2526
2528
  // This protocol / DRM satisfies the specifications (prefer DRM over clear, if available)
2527
2529
  if (!playoutMap[protocol].playoutUrl || drm && drm !== "clear") {
2528
2530
  playoutMap[protocol].playoutUrl = playoutMap[protocol].playoutMethods[drm || "clear"].playoutUrl;
2529
2531
  playoutMap[protocol].drms = playoutMap[protocol].playoutMethods[drm || "clear"].drms;
2530
2532
  }
2531
- case 132:
2533
+ case 133:
2532
2534
  i++;
2533
2535
  _context32.next = 70;
2534
2536
  break;
2535
- case 135:
2537
+ case 136:
2536
2538
  // Callbacks for retrieving and setting multiview views
2537
2539
  if (multiview && sessionId) {
2538
2540
  playoutMap.sessionId = sessionId;
@@ -2588,7 +2590,7 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2588
2590
  }
2589
2591
  this.Log(playoutMap);
2590
2592
  return _context32.abrupt("return", playoutMap);
2591
- case 138:
2593
+ case 139:
2592
2594
  case "end":
2593
2595
  return _context32.stop();
2594
2596
  }
@@ -2780,62 +2782,50 @@ exports.GlobalUrl = /*#__PURE__*/function () {
2780
2782
  libraryId = _ref59.libraryId, objectId = _ref59.objectId, writeToken = _ref59.writeToken, versionHash = _ref59.versionHash, _ref59$path = _ref59.path, path = _ref59$path === void 0 ? "/" : _ref59$path, authorizationToken = _ref59.authorizationToken, _ref59$noAuth = _ref59.noAuth, noAuth = _ref59$noAuth === void 0 ? false : _ref59$noAuth, _ref59$resolve = _ref59.resolve, resolve = _ref59$resolve === void 0 ? true : _ref59$resolve, _ref59$queryParams = _ref59.queryParams, queryParams = _ref59$queryParams === void 0 ? {} : _ref59$queryParams;
2781
2783
  network = this.NetworkInfo().name;
2782
2784
  url = new URL(network === "main" ? "https://main.net955305.contentfabric.io" : "https://demov3.net955210.contentfabric.io"); // Pull auth out of query params
2783
- if (queryParams.authorization && (typeof queryParams.authorization === "string" || Array.isArray(queryParams.authorization) && queryParams.authorization.length === 1)) {
2784
- queryParams = _objectSpread({}, queryParams);
2785
- authorizationToken = typeof queryParams.authorization === "string" ? queryParams.authorization : queryParams.authorization[0];
2786
- }
2787
- if (writeToken) {
2788
- fabricNodeUrl = this.HttpClient.draftURIs[writeToken];
2789
- if (fabricNodeUrl) {
2790
- url = new URL(fabricNodeUrl);
2791
- }
2792
- }
2793
- urlPath = UrlJoin("s", network);
2794
- if (!(!noAuth || authorizationToken)) {
2795
- _context34.next = 15;
2796
- break;
2797
- }
2798
- _context34.t0 = UrlJoin;
2799
- _context34.t1 = authorizationToken;
2800
- if (_context34.t1) {
2801
- _context34.next = 13;
2785
+ if (queryParams.authorization) {
2786
+ _context34.next = 8;
2802
2787
  break;
2803
2788
  }
2804
- _context34.next = 12;
2789
+ queryParams = _objectSpread({}, queryParams);
2790
+ _context34.next = 7;
2805
2791
  return this.authClient.AuthorizationToken({
2806
2792
  libraryId: libraryId,
2807
2793
  objectId: objectId,
2808
2794
  versionHash: versionHash,
2809
2795
  noAuth: noAuth
2810
2796
  });
2811
- case 12:
2812
- _context34.t1 = _context34.sent;
2813
- case 13:
2814
- _context34.t2 = _context34.t1;
2815
- urlPath = (0, _context34.t0)("t", _context34.t2);
2816
- case 15:
2797
+ case 7:
2798
+ queryParams.authorization = _context34.sent;
2799
+ case 8:
2800
+ if (writeToken) {
2801
+ fabricNodeUrl = this.HttpClient.draftURIs[writeToken];
2802
+ if (fabricNodeUrl) {
2803
+ url = new URL(fabricNodeUrl);
2804
+ }
2805
+ }
2806
+ urlPath = UrlJoin("s", network);
2817
2807
  if (!versionHash) {
2818
- _context34.next = 19;
2808
+ _context34.next = 14;
2819
2809
  break;
2820
2810
  }
2821
2811
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2822
- _context34.next = 25;
2812
+ _context34.next = 20;
2823
2813
  break;
2824
- case 19:
2825
- _context34.t3 = libraryId;
2826
- if (_context34.t3) {
2827
- _context34.next = 24;
2814
+ case 14:
2815
+ _context34.t0 = libraryId;
2816
+ if (_context34.t0) {
2817
+ _context34.next = 19;
2828
2818
  break;
2829
2819
  }
2830
- _context34.next = 23;
2820
+ _context34.next = 18;
2831
2821
  return this.ContentObjectLibraryId({
2832
2822
  objectId: objectId
2833
2823
  });
2834
- case 23:
2835
- _context34.t3 = _context34.sent;
2836
- case 24:
2837
- libraryId = _context34.t3;
2838
- case 25:
2824
+ case 18:
2825
+ _context34.t0 = _context34.sent;
2826
+ case 19:
2827
+ libraryId = _context34.t0;
2828
+ case 20:
2839
2829
  if (path.startsWith("/qfab")) {
2840
2830
  urlPath = UrlJoin(urlPath, path.replace(/^\/qfab/, "q"));
2841
2831
  } else if (versionHash) {
@@ -2851,7 +2841,7 @@ exports.GlobalUrl = /*#__PURE__*/function () {
2851
2841
  return url.searchParams.set(key, queryParams[key]);
2852
2842
  });
2853
2843
  return _context34.abrupt("return", url.toString());
2854
- case 30:
2844
+ case 25:
2855
2845
  case "end":
2856
2846
  return _context34.stop();
2857
2847
  }
@@ -4339,6 +4329,7 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4339
4329
  libraryId: libraryId,
4340
4330
  objectId: objectId,
4341
4331
  versionHash: versionHash,
4332
+ writeToken: writeToken,
4342
4333
  metadataSubtree: ownerCapKey
4343
4334
  });
4344
4335
  case 10: