Load layouts and optional features from staged asset caches

This commit is contained in:
Jonathan Sykes
2026-10-08 01:29:50 +08:00
parent d98d444552
commit 5d6a1545df
30 changed files with 512 additions and 146 deletions

View File

@@ -12,7 +12,6 @@
* The ".part" suffix keeps OPFS.listVideos() from ever listing a partial file.
* ========================================================================== */
'use strict';
importScripts('/sha256.js');
let dir = null;
let handle = null;
@@ -36,6 +35,7 @@ self.onmessage = (e) => { chain = chain.then(() => onOp(e.data || {})); };
async function onOp(m) {
try {
if (!self.Sha256) { self.__ASSET_URLS__=m.assetUrls || {}; importScripts(self.__ASSET_URLS__.sha256 || '/sha256.js'); }
if (m.op === 'open') {
const root = await navigator.storage.getDirectory();
dir = await root.getDirectoryHandle('videos', { create: true });