@eluvio/elv-player-js 1.0.114 → 1.0.115

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "1.0.114",
3
+ "version": "1.0.115",
4
4
  "description": "![Eluvio Logo](src/static/images/Logo.png \"Eluvio Logo\")",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -641,6 +641,7 @@ export class EluvioPlayer {
641
641
  }
642
642
  } catch (error) {
643
643
  // If playout failed due to a permission issue, check the content to see if there is a message to display
644
+ let permissionErrorMessage;
644
645
  if(error && [401, 403].includes(error.status) || [401, 403].includes(error.code)) {
645
646
  try {
646
647
  const client = await this.Client();
@@ -651,7 +652,7 @@ export class EluvioPlayer {
651
652
  this.sourceOptions.playoutParameters.versionHash ||
652
653
  await client.LatestVersionHash({objectId: this.sourceOptions.playoutParameters.objectId});
653
654
 
654
- const permissionErrorMessage = await client.ContentObjectMetadata({
655
+ permissionErrorMessage = await client.ContentObjectMetadata({
655
656
  versionHash: targetHash,
656
657
  metadataSubtree: "public/asset_metadata/permission_message",
657
658
  authorizationToken: this.sourceOptions.playoutParameters.authorizationToken
@@ -674,7 +675,7 @@ export class EluvioPlayer {
674
675
  } catch(error) {}
675
676
  }
676
677
 
677
-
678
+ error.permission_message = permissionErrorMessage;
678
679
  if(this.playerOptions.errorCallback) {
679
680
  this.playerOptions.errorCallback(error, this);
680
681
  }