stormcloud-video-player 0.2.7 → 0.2.8

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/lib/index.js CHANGED
@@ -582,6 +582,7 @@ async function getBrowserID(clientInfo) {
582
582
  const fingerprintString = JSON.stringify(clientInfo);
583
583
  if (typeof crypto !== "undefined" && crypto.subtle && crypto.subtle.digest) {
584
584
  try {
585
+ await crypto.subtle.digest("SHA-256", new Uint8Array([1, 2, 3]));
585
586
  const hashBuffer = await crypto.subtle.digest(
586
587
  "SHA-256",
587
588
  new TextEncoder().encode(fingerprintString)
@@ -591,8 +592,7 @@ async function getBrowserID(clientInfo) {
591
592
  return hashHex;
592
593
  } catch (error) {
593
594
  console.warn(
594
- "[StormcloudVideoPlayer] crypto.subtle.digest failed, using fallback hash:",
595
- error
595
+ "[StormcloudVideoPlayer] crypto.subtle.digest not supported, using fallback hash"
596
596
  );
597
597
  }
598
598
  }