Register devices and report verified holdings to the server

This commit is contained in:
Claude
2026-09-30 07:38:47 +00:00
parent 76e0d2f72d
commit c629ff5836
13 changed files with 513 additions and 2 deletions

View File

@@ -108,6 +108,19 @@
}
},
// Bytes [offset, offset+length) of a saved video — answers the server's
// P2P range challenges (p2p-client.js). null when the file is missing.
async readRange(videoId, offset, length) {
try {
const found = await findHandle(videoId);
if (!found) return null;
const file = await found[0].getFile();
return new Uint8Array(await file.slice(offset, offset + length).arrayBuffer());
} catch {
return null;
}
},
revokeUrl(url) {
if (url && _blobUrls.has(url)) {
URL.revokeObjectURL(url);