Commit Graph

165 Commits

Author SHA1 Message Date
Jon
539e3cfb34 Add a spoken countdown between frames
Some checks failed
CI / build-and-deploy (push) Has been cancelled
A 🔊 toggle on the home screen counts you into each frame - "five, four,
three, two, one" - plus start and finish announcements. Useful when you're in
front of the camera rather than at the laptop. Uses the Web Speech API, so
it's local and needs no configuration.

The narrator runs off the intervalometer's state updates rather than a timer
of its own, so it can't drift away from what the sequence is doing; each
second is spoken at most once even though state arrives ~5x/sec.

The count is capped at one second under the interval, so a 3s interval says
"two, one" instead of talking over the previous frame, and a 1s interval stays
silent. A start delay isn't clamped, since that gap is whatever you set.

Countdown length, voice choice and frame-number announcements live in the
settings drawer; only the toggle is on the home screen.

Also:
- The toggle sits in the status card rather than the button row: three buttons
  don't fit a 400px column, and it wrapped onto its own flex line where it
  stretched to the wrong height.
- tsconfig excludes dist/, which build-dist.sh fills with copies of these same
  files and which otherwise gets type-checked twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QK7PKpRVoy69Fpa32R8abb
2026-08-01 21:02:00 +01:00
Jon
1af4b215b2 Turn the demo app into a Canon 450D intervalometer
Some checks failed
CI / build-and-deploy (push) Has been cancelled
Replaces the gPhoto2 demo UI (live view beside the raw config tree) with a
timelapse intervalometer. The home screen carries only what changes between
runs - interval, frame count, start delay, start/stop, countdown, progress
and a log - while every camera setting moves into a settings drawer.

- intervalometer.js: schedules frames on an absolute grid (start + n *
  interval) so transfer time doesn't accumulate as drift over a long run. An
  overrun logs and fires as soon as the camera is free rather than dropping a
  frame; three consecutive failures abort.
- storage.js: frames stream into a folder via the File System Access API,
  named for capture time (20260801-172713_00001.JPG) so sorting by name is
  sorting by time. Falls back to downloads. Also holds the screen wake lock,
  since background tabs get their timers throttled.
- config-utils.js: config tree lookups, shutter speed parsing, and bulb
  capability detection (bulb toggle or Canon eosremoterelease).
- home.js: sequence controls plus a read-only exposure readout and pre-flight
  warnings when the interval can't fit the exposure and transfer.
- settings.js / index.js: app prefs and the full config tree behind a drawer.
  Config polling now only runs while that drawer is open, leaving the USB link
  to the captures during a sequence.

Live view stays up between frames and steps aside only while the shutter
fires, which is what the EOS driver requires; it recovers afterwards with
backoff instead of hammering a busy camera.

Deployed as an assets-only Cloudflare Worker. The WASM is built with pthreads
and allocates a shared WebAssembly.Memory, so _headers reproduces the COOP/COEP
pair from serve.json - without cross-origin isolation the app fails to start.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QK7PKpRVoy69Fpa32R8abb
2026-08-01 18:47:04 +01:00
Ingvar Stepanyan
ec3f4462b1 Provide Loading message sooner instead of blank page 2024-12-06 01:07:58 +00:00
Ingvar Stepanyan
ca9e5b11e7 Get rid of center-parent 2024-12-06 01:05:30 +00:00
Ingvar Stepanyan
b4cd4a1adf Fix dlpreopen versions 2024-12-05 19:08:00 +00:00
Ingvar Stepanyan
d9741c4c8d Rebuild 2024-12-05 16:50:07 +00:00
Ingvar Stepanyan
2beb7fda58 Upgrade libgphoto2 2024-12-05 15:44:26 +00:00
Ingvar Stepanyan
8f7524219b Use libusb from a tarball
Now that Wasm support is included in release tarballs, we don't need to include libusb as a submodule anymore.
2024-12-05 15:31:53 +00:00
Ingvar Stepanyan
9f261eda0c Upgrade Emscripten 2024-12-05 14:55:04 +00:00
Ingvar Stepanyan
0d17b35897 Use em-config to calculate the path 2023-11-15 00:51:18 +00:00
Ingvar Stepanyan
758b5bb95b Upgrade Emscripten 2023-11-15 00:36:38 +00:00
Ingvar Stepanyan
223718d8a8 Build under regular user again
Previously this didn't work because Docker still creates missing target folders as root instead of as mapped user.

Manually creating the folder seems to fix that.
2023-10-17 04:01:12 +01:00
Ingvar Stepanyan
850fbaecbf Rebuild 2023-10-17 03:45:47 +01:00
Ingvar Stepanyan
d377c1426a Remove custom gpp_rethrow wrapper
Upstream Emscripten now natively propagates exception messages to JS.
2023-10-17 03:25:17 +01:00
Ingvar Stepanyan
5652da70d0 Pull newer Emscripten for bundler fixup
Manually pulling in newer Emscripten for workaround from https://github.com/emscripten-core/emscripten/pull/20452 for bundlers that can handle only module Workers.

Closes #12.
2023-10-17 03:17:30 +01:00
Ingvar Stepanyan
cfe8ef68b6 Upgrade Emscripten + build fixes
- Upgraded to 3.1.47.
 - EM_CACHE override leads to some new issues with package search in sysroot, probably because sysroot is hardcoded in PKG_CONFIG* variables. Use Docker's path mapping mechanism instead.
 - Added temporary workaround for new issue from https://github.com/emscripten-core/emscripten/issues/16836.
2023-10-17 03:17:16 +01:00
Ingvar Stepanyan
83cceddc63 Update web-gphoto2 URL in demo 2023-08-05 20:02:18 +01:00
Ingvar Stepanyan
32edf88715 Patch release 2023-08-05 19:58:34 +01:00
Ingvar Stepanyan
6f07599bc3 Add few more package.json fields 2023-08-05 19:58:23 +01:00
Ingvar Stepanyan
1d71ddbc01 Bump package.json again 2023-08-05 19:54:47 +01:00
Ingvar Stepanyan
76b6c2fdb8 Bump package.json 2023-08-05 19:52:55 +01:00
Ingvar Stepanyan
7d5ed6d2ff Update README examples 2023-08-05 19:49:02 +01:00
Ingvar Stepanyan
0380077969 More demo updates 2023-08-05 19:38:32 +01:00
Ingvar Stepanyan
6c693186c2 Fix Wasm build 2023-08-05 19:21:03 +01:00
Ingvar Stepanyan
c80c04f006 Bunch of updates in preparation for publish 2023-08-05 18:46:26 +01:00
Ingvar Stepanyan
a4052aef92 Merge pull request #7 from icheered/main 2023-08-05 17:09:02 +01:00
ICheered
8b2cc94351 Update readme 2023-08-05 17:47:05 +02:00
ICheered
83279b5e58 Fixing nits 2023-08-05 17:46:08 +02:00
ICheered
b74d938839 Make the Camera object a named export 2023-08-05 15:22:29 +02:00
ICheered
3fcfeb9b99 Create types.d.ts for camera type definition 2023-08-05 15:19:17 +02:00
ICheered
824145449a Mode modulepromise outside Camera class 2023-08-05 14:56:24 +02:00
ICheered
34c7df5411 Hide common issues in details/summary 2023-08-05 13:57:40 +02:00
ICheered
6e24a88ad2 Fix testing package.json 2023-08-05 13:51:56 +02:00
ICheered
06a12c1c30 Remove old line 2023-08-05 13:50:10 +02:00
ICheered
b0c044aa3a Fixes for review 2023-08-05 13:43:44 +02:00
ICheered
9d03408513 Set type: module in package.json for exporting functions using ESM syntax 2023-08-05 12:14:43 +02:00
ICheered
e1368affb3 Fix typo, fix version number, fix license field 2023-08-05 11:29:50 +02:00
ICheered
385952d9af Minor readme fix 2023-08-04 18:13:25 +02:00
ICheered
6352101131 Rebuild files with ENVIRONMENT=web,worker flags in Makefile 2023-08-04 18:09:43 +02:00
ICheered
9c97e6e5ab Update package.json 2023-08-04 18:02:27 +02:00
ICheered
8b10757e92 Move navigator.usb.requestDevice to package 2023-08-04 17:59:42 +02:00
ICheered
f93004f8e7 Add environment flag to makefile 2023-08-04 17:52:14 +02:00
ICheered
97210914c9 Improve folder structure 2023-08-04 17:49:09 +02:00
ICheered
d0841c4c85 Lazily load ModulePromise, make rethrowIfCritical standalone 2023-08-04 14:15:01 +02:00
ICheered
8c21f708be Update readme 2023-08-03 18:23:21 +02:00
ICheered
6e09c9d037 Create camera wrapper around functions 2023-08-03 18:18:43 +02:00
ICheered
6358e6c7ef WASM => WebAssembly 2023-08-03 17:18:38 +02:00
ICheered
ea674be2ff Change npm package name and version number 2023-08-02 21:29:26 +02:00
ICheered
0a18222462 Add build files and documentation 2023-08-02 21:28:44 +02:00
Ingvar Stepanyan
e917919ca4 Update README.md 2023-03-05 23:41:25 +00:00