Register devices and report verified holdings to the server
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user