diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-05 15:17:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-05 15:17:09 +0200 |
commit | ff5f37e4f3d23ec8ade8baae5c1b73fe2ac7732c (patch) | |
tree | 03a03f040eea7e1072a9c2359159291091dc0d9d | |
parent | 3ce48a0cd062d9ff64d9411d702453503a49f3b1 (diff) | |
download | PeerTube-ff5f37e4f3d23ec8ade8baae5c1b73fe2ac7732c.tar.gz PeerTube-ff5f37e4f3d23ec8ade8baae5c1b73fe2ac7732c.tar.zst PeerTube-ff5f37e4f3d23ec8ade8baae5c1b73fe2ac7732c.zip |
Fix sha fallback
-rw-r--r-- | client/src/assets/player/p2p-media-loader/segment-validator.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/assets/player/p2p-media-loader/segment-validator.ts b/client/src/assets/player/p2p-media-loader/segment-validator.ts index 4a0caec5e..59245ceb4 100644 --- a/client/src/assets/player/p2p-media-loader/segment-validator.ts +++ b/client/src/assets/player/p2p-media-loader/segment-validator.ts | |||
@@ -85,7 +85,7 @@ async function sha256Hex (data?: ArrayBuffer) { | |||
85 | } | 85 | } |
86 | 86 | ||
87 | // Fallback for non HTTPS context | 87 | // Fallback for non HTTPS context |
88 | const shaModule = await import('sha.js') | 88 | const shaModule = (await import('sha.js') as any).default |
89 | return new shaModule.sha256().update(Buffer.from(data)).digest('hex') | 89 | return new shaModule.sha256().update(Buffer.from(data)).digest('hex') |
90 | } | 90 | } |
91 | 91 | ||