@eluvio/elv-client-js 4.0.46 → 4.0.47

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.
@@ -2215,7 +2215,7 @@ exports.UpdateContentObjectGraph = /*#__PURE__*/function () {
2215
2215
  return _context30.delegateYield(_loop(), "t0", 8);
2216
2216
  case 8:
2217
2217
  _ret = _context30.t0;
2218
- if (!(_typeof(_ret) === "object")) {
2218
+ if (!_ret) {
2219
2219
  _context30.next = 11;
2220
2220
  break;
2221
2221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.0.46",
3
+ "version": "4.0.47",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
package/src/Validation.js CHANGED
@@ -41,7 +41,13 @@ exports.ValidateWriteToken = (writeToken) => {
41
41
  exports.ValidatePartHash = (partHash) => {
42
42
  if(!partHash) {
43
43
  throw Error("Part hash not specified");
44
- } else if(!partHash.toString().startsWith("hqp_") && !partHash.toString().startsWith("hqpe")) {
44
+ }
45
+ else if(!partHash.toString().startsWith("hqp_") &&
46
+ !partHash.toString().startsWith("hqpe") &&
47
+ !partHash.toString().startsWith("hqt_") &&
48
+ !partHash.toString().startsWith("hqte") &&
49
+ !partHash.toString().startsWith("hql_") &&
50
+ !partHash.toString().startsWith("hqle")) {
45
51
  throw Error(`Invalid part hash: ${partHash}`);
46
52
  }
47
53
  };
@@ -2144,7 +2144,7 @@ exports.ContentObjectImageUrl = async function({libraryId, objectId, versionHash
2144
2144
  * capLevelToPlayerSize - Caps video quality to player size
2145
2145
  * clipEnd - End time for the video
2146
2146
  * clipStart - Start time for the video
2147
- * controls - Sets the player control visibility. Values: browserDefaul t | autoHide | show. Defaults to autoHide
2147
+ * controls - Sets the player control visibility. Values: browserDefault | autoHide | show | hide | hideWithVolume. Defaults to autoHide
2148
2148
  * description - Sets the page description
2149
2149
  * directLink - If enabled, sets direct link
2150
2150
  * linkPath - Video link path
@@ -2175,6 +2175,13 @@ exports.EmbedUrl = async function({
2175
2175
  // Default options
2176
2176
  options.controls = options.controls === undefined ? "autoHide" : options.controls;
2177
2177
 
2178
+ const controlsMap = {
2179
+ autoHide: "h",
2180
+ browserDefault: "d",
2181
+ show: "s",
2182
+ hideWithVolume: "hv"
2183
+ };
2184
+
2178
2185
  let embedUrl = new URL("https://embed.v3.contentfabric.io");
2179
2186
  const networkInfo = await this.NetworkInfo();
2180
2187
  const networkName = networkInfo.name === "demov3" ? "demo" : (networkInfo.name === "test" && networkInfo.id === 955205) ? "testv4" : networkInfo.name;
@@ -2207,7 +2214,9 @@ exports.EmbedUrl = async function({
2207
2214
  embedUrl.searchParams.set("start", options.clipStart);
2208
2215
  break;
2209
2216
  case "controls":
2210
- embedUrl.searchParams.set("ct", options.controls);
2217
+ if(options.controls !== "hide") {
2218
+ embedUrl.searchParams.set("ct", controlsMap[options.controls]);
2219
+ }
2211
2220
  break;
2212
2221
  case "description":
2213
2222
  data["og:description"] = options.description;