- Prevent concurrent getUserMedia requests to fix toggle flakiness
- Add automatic track recovery when microphone track ends unexpectedly
- Fix auto-enable to only trigger on session start, not when toggling setting
- Ensure backend RPC is sent when auto-enable triggers
- Properly clean up old tracks before requesting new ones
* feat: add web route for sending WOL package to given mac addr
```
adds a new route /device/send-wol/:mac-addr to send the magic WOL package
to the specified mac-addr.
Method is POST and is protected.
Useful for custom wake up scripts: example is sending HTTP request through iOS shortcut
Test plan:
calling the API with curl
```
$ curl -X POST http://<jetkvm-ip>/device/send-wol/xx:xx:xx:xx:xx:xx
WOL sent to xx:xx:xx:xx:xx:xx
```
and observing the magic packet on my laptop/PC:
```
$ ncat -u -l 9 -k | xxd
00000000: ffff ffff ffff d050 9978 a620 d050 9978 .......P.x. .P.x
00000010: a620 d050 9978 a620 d050 9978 a620 d050 . .P.x. .P.x. .P
00000020: 9978 a620 d050 9978 a620 d050 9978 a620 .x. .P.x. .P.x.
00000030: d050 9978 a620 d050 9978 a620 d050 9978 .P.x. .P.x. .P.x
00000040: a620 d050 9978 a620 d050 9978 a620 d050 . .P.x. .P.x. .P
00000050: 9978 a620 d050 9978 a620 d050 9978 a620 .x. .P.x. .P.x.
```
calling the api with invalid mac addr returns HTTP 400 error
```
$ curl -X POST -v http://<jetkvm-ip>/device/send-wol/abcd
...
* Request completely sent off
< HTTP/1.1 400 Bad Request
...
...
Invalid mac address provided
* Resolve golint complaint
---------
Co-authored-by: Marc Brooks <IDisposable@gmail.com>
When browsers recreate audio tracks during long sessions, the backend
now properly handles the new track instead of ignoring it. Old track
handlers detect when they've been superseded and exit cleanly to
prevent goroutine leaks.
- Add AudioInputAutoEnable and AudioOutputEnabled fields to backend config
- Implement RPC methods for get/set audio input auto-enable preference
- Load audio output enabled state from config on startup
- Make manual microphone toggle call backend to enable audio pipeline
- Auto-enable preference now persists across incognito sessions
- Reset microphone state to off when reaching login pages
- Fix issue where manual mic toggle required auto-enable to be on
Implement session-based microphone control with optional auto-enable:
- Microphone disabled by default, only requests permission when enabled
- Added persistent "Auto-enable Microphone" setting in audio settings
- Setting syncs to backend and works across browsers/devices
- Auto-enable respects secure context (HTTPS/localhost only)
- Refactored secure context check into reusable utility function
- Removed unused audioInputEnabled store properties
Added new audio-related UI components and improved localization for multiple languages. The SettingsItem component now supports badge links and variants, enhancing the user experience. Updated the AudioPopover to include quick audio controls for speakers and microphone, with descriptions and HTTPS-only warnings where applicable.
Included the installation script for audio dependencies in the Docker build context preparation. This ensures that the necessary audio components are available during the build process.
Temporarily remove the ability to switch between HDMI and USB audio
output sources. The application now uses USB audio (hw:1,0) exclusively
until HDMI audio capture issues are resolved.
Changes:
- Remove AudioOutputSource config field
- Remove audio source switching logic and UI
- Hardcode USB audio output device
- Remove related RPC methods
The previous default EDID did not advertise audio capabilities,
preventing HDMI audio capture from working. This update ensures
the JetKVM properly identifies itself to source devices and
enables audio capture out of the box.
Changes:
- Display identifies as "JetKVM HDMI" (manufacturer ID: JTK)
- Includes full audio support (2/6/8-channel LPCM, up to 192 kHz)
- Advertises all TC358743XBG capabilities (1080p60, YCbCr, Deep Color)
This allows HDMI audio to work by default without manual EDID
configuration.
Browser autoplay policy blocks audio without user interaction.
Store audio elements in ref and trigger playback when user clicks
the existing 'Manually start stream' button.
This should ensure that newly added strings are kept in their correct location so later changes yield clean GIT diffs.
Also bumped a couple minor dependencies
The continuous ensure_sleep_mode_disabled() call in the format detection
loop caused repeated I2C transactions to the TC358743, disrupting HDMI
audio capture. Sleep mode is already disabled once during video_init(),
which is sufficient.
* refactor: improve URL handling in RebootingOverlay component
* refactor: enhance redirect URL handling in TryUpdate function
* refactor: disable old ota rebooting method in new version
* refactor: streamline version retrieval logic and enhance error handling in useVersion hook
* refactor: rename to RedirectTo
* fix: force page reload when redirecting from reboot actions
* refactor: consolidate sleep utility and update usages across components
* refactor: update JsonRpcCallOptions to use maxAttempts and attemptTimeoutMs, implement exponential backoff for retries
---------
Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>