-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Description
I'm using the web-gphoto2 library to build a browser-based DSLR control tool, and I have a requirement to automatically capture and download images only when the camera actually takes a photo (e.g., when the physical shutter is pressed or a remote capture command is sent).
However, I encountered a problem with the current event-listening logic:
The existing consumeEvents() method returns a boolean (hadEvents) indicating whether events occurred, but it doesn’t distinguish between event types. This leads to false triggers—for example, camera configuration changes (e.g., adjusting ISO, shutter speed) or status updates also trigger the "capture and download" workflow, which is not ideal.
Questions for the Author
Could you provide guidance on the following to help me implement this requirement correctly?
Does the web-gphoto2 library (or its underlying libgphoto2/WebUSB backend) support exposing specific event types (e.g., capture completion, new file addition, configuration changes)? If so, how can I access these event types via the API?
Is there an official/recommended way to listen exclusively for camera capture events (excluding non-capture events like settings adjustments) and trigger actions (e.g., auto-download) only for these events?
If specific event types are not currently exposed, are there plans to add this functionality in future updates? Or is there a temporary workaround that aligns with the library’s design principles?
Environment
Library Version: Latest from main branch
Browser: Google Chrome 139.0.7258.139
Camera Model: Sony Corporation ILCE-7M3
OS: Macos 13.7.8
Thank you for your work on this excellent library—it’s been incredibly helpful for browser-based camera control!