Mobile remote: per-track trim (in/out) + waveform + times + scrub/seek + gap
- Queue cards expand to a detail panel with the waveform, elapsed/total/remaining times, draggable in/out handles, scrub-to-seek and a 'pausa dopo' gap. - /api/peaks now also returns exact duration (samples/8000) so non-playing tracks have correct times/trim without relying on the output media probe. - Service worker switched to network-first (+v2) so UI updates aren't masked by a stale cache; output.js probeDurations hardened (load()+timeout fallback). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3f4d0f81e
commit
c0230ee1d6
5 files changed
+167
-19
No files matched your search
+11
-4
@@ -1,6 +1,7 @@
|
||||
// Minimal app-shell cache so the remote installs as a PWA and the UI loads fast.
|
||||
// API, media and websockets are always fetched from the network (never cached).
|
||||
const CACHE = 'djv-shell-v1';
|
||||
// App-shell caching for installability/offline. The server is local and fast,
|
||||
// so we use NETWORK-FIRST for the shell (always get the latest UI after a
|
||||
// redeploy) and fall back to cache only when offline. API/media never cached.
|
||||
const CACHE = 'djv-shell-v2';
|
||||
const SHELL = [
|
||||
'./', 'index.html', 'css/mobile.css',
|
||||
'js/net.js', 'js/control.js', 'js/engine/shaders.js', 'js/engine/effects.js',
|
||||
@@ -15,5 +16,11 @@ self.addEventListener('activate', (e) => {
|
||||
self.addEventListener('fetch', (e) => {
|
||||
const url = new URL(e.request.url);
|
||||
if (e.request.method !== 'GET' || url.pathname.startsWith('/api') || url.pathname.startsWith('/media')) return;
|
||||
e.respondWith(caches.match(e.request).then((hit) => hit || fetch(e.request)));
|
||||
e.respondWith(
|
||||
fetch(e.request).then((res) => {
|
||||
const copy = res.clone();
|
||||
caches.open(CACHE).then((c) => c.put(e.request, copy)).catch(() => {});
|
||||
return res;
|
||||
}).catch(() => caches.match(e.request))
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user