Commit Graph

688 Commits

Author SHA1 Message Date
Alex 810abe1f43
Merge 336a75812f into 5f15d8b2f6 2025-11-06 02:12:23 -08:00
Adam Shiervani 5f15d8b2f6
refactor: More robust handling of jsonrpc calls (#915)
Co-authored-by: Marc Brooks <IDisposable@gmail.com>
2025-11-06 11:12:19 +01:00
Aveline 28919bf37c
fix: await sleep needs to be called inside async function (#946) 2025-11-05 13:25:13 -06:00
Marc Brooks 4090592112
chore: add delay before forced page-reload (#916) 2025-11-04 15:12:03 +01:00
Alex P 336a75812f feat: add visual feedback for auto-enable microphone toggle
Added success notifications when toggling auto-enable microphone setting.
Includes translations for all supported languages.
2025-11-04 11:17:29 +02:00
Alex P ce4ea10551 fix: handle audio track recreation to prevent microphone failures
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.
2025-11-04 10:40:35 +02:00
Alex P 3448663afa feat: persist audio preferences to backend config
- 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
2025-11-04 08:52:27 +02:00
Alex P 925b14da1e feat: add microphone auto-enable setting with session-based opt-in
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
2025-11-03 22:09:39 +02:00
Adam Shiervani d0e6bb1ac6 feat: enhance audio settings UI and localization
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.
2025-11-03 13:55:57 +01:00
Adam Shiervani 645b178d0d feat: add audio dependencies to Docker build context
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.
2025-11-03 13:54:11 +01:00
Alex P 14b741c3dd temp: disable audio source selection while HDMI audio issues are diagnosed
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
2025-11-03 10:49:35 +02:00
dependabot[bot] 1d1e58f036
build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 (#932)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:29:20 +01:00
dependabot[bot] 09ddd21610
build(deps): bump github.com/go-co-op/gocron/v2 from 2.16.6 to 2.17.0 (#933)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:29:13 +01:00
dependabot[bot] 10c4c959a8
build(deps): bump react-router from 7.9.4 to 7.9.5 in /ui (#931)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:27:14 +01:00
dependabot[bot] 69b7682002
build(deps-dev): bump @eslint/compat from 1.4.0 to 1.4.1 in /ui (#924)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:27:03 +01:00
dependabot[bot] 92758c6337
build(deps-dev): bump @eslint/js from 9.38.0 to 9.39.0 in /ui (#936)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:26:36 +01:00
dependabot[bot] 2cde2c0ecb
build(deps): bump github.com/pion/webrtc/v4 from 4.1.4 to 4.1.6 (#927)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:25:57 +01:00
dependabot[bot] 6eb842885d
build(deps): bump github.com/coreos/go-oidc/v3 from 3.15.0 to 3.16.0 (#930)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:25:40 +01:00
dependabot[bot] bc1bc53fb2
build(deps): bump golang.org/x/net from 0.44.0 to 0.46.0 (#929)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:25:32 +01:00
dependabot[bot] cdffb3e32a
build(deps): bump actions/setup-node from 5 to 6 (#921)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:25:20 +01:00
dependabot[bot] 362540d83d
build(deps): bump actions/upload-artifact from 4 to 5 (#920)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:25:14 +01:00
dependabot[bot] 57c9cf324d
build(deps): bump github.com/prometheus/procfs from 0.17.0 to 0.19.2 (#925)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:23:21 +01:00
dependabot[bot] a359cb34bd
build(deps): bump github.com/beevik/ntp from 1.4.3 to 1.5.0 (#934)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 14:23:04 +01:00
Alex P de74ae1a12 fix: update default EDID to enable audio support
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.
2025-10-30 22:33:04 +02:00
Alex 2ea65c7a96
Merge branch 'dev' into feat/audio-support 2025-10-30 22:27:30 +02:00
Marc Brooks 4b049c4b7c
Add iputils-ping to install dependencies script (#917)
The new dev_deploy.sh uses ping to check if we can see the JetKVM, but mcr.microsoft.com/devcontainers/go:1.25-trixie does not have ping installed.
2025-10-30 09:53:32 +01:00
Alex P 516a953f41 Merge branch 'dev' into feat/audio-support 2025-10-30 02:14:30 +02:00
Marc Brooks 7955ee9d35
Improves OTA update reporting and process (#838) 2025-10-29 23:10:23 +01:00
Adam Shiervani 1ce63664c0
fix: video quality (#913) 2025-10-29 16:11:07 +01:00
Adam Shiervani 4b6e796a0e
fix: ensure proper redirection and page reload (#909) 2025-10-29 02:04:58 +01:00
Alex P eeacceb667 fix: wait for audio relay goroutine to exit before disconnecting source 2025-10-29 00:44:02 +02:00
Alex P 802166ba23 fix: use atomic.Bool for audio source to prevent mutex contention during switching 2025-10-29 00:26:48 +02:00
Alex P 4bc60c3f1b Updates: revert VERSION to 0.4.8 2025-10-28 22:36:52 +02:00
Alex P e7e6d7cb9d Updates: bump Makefile VERSION to 0.4.9 2025-10-28 22:32:18 +02:00
Alex P 65bbcf85ad fix: prevent race condition in audio output source switching by reading from in-memory state with proper synchronization 2025-10-28 22:11:11 +02:00
Adam Shiervani 79098d3546
feat: Enhance DHCP client timeout and retry logic (#908) 2025-10-28 18:50:29 +01:00
Adam Shiervani 50fc88aae1
bug: fix null pointer in wakeDisplay (#907) 2025-10-28 18:48:30 +01:00
Alex P cd7a098f76 fix: track audio autoplay status separately to handle Safari blocking audio while allowing video 2025-10-28 15:47:36 +02:00
Alex P ef86af8afc fix: enable audio playback via manual start stream button
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.
2025-10-28 14:28:30 +02:00
Adam Shiervani 204909b49a
feat: Add connectivity checks, ensure killing of jetkvm process, and disable SSH host key verification (#905) 2025-10-28 07:11:16 +01:00
Alex P b2a57a64e9 Merge branch 'dev' into feat/audio-support 2025-10-27 19:22:45 +02:00
Alex P be2bb518ed Merge branch 'dev' into feat/audio-support 2025-10-27 19:19:41 +02:00
Marc Brooks b1c788cc5e
chore/Automatically sort language files after machine-translate run (#902)
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
2025-10-27 16:34:07 +01:00
Adam Shiervani 71fe95bf57
More UI translations (#899)
* Enhance localization for reboot messages in multiple languages, including descriptions for device rebooting, IP address changes, and reconnection prompts in Danish, German, English, Spanish, French, Italian, Norwegian, Swedish, and Chinese.

* Update Swedish localization strings

* Update German localization strings

* Update Spanish localization strings

* Update Danish localization strings

* Update French localization strings

* Update Italian localization strings

* Update Norwegian localization strings

* Update Chinese localization strings

* sort translation keys

---------

Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
2025-10-27 16:33:58 +01:00
Alex P 0f43a84551 fix: remove continuous sleep mode check to prevent audio interference
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.
2025-10-27 17:28:14 +02:00
Adam Shiervani ce9f95b8c8
refactor: ota redirecting (#898)
* 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>
2025-10-27 16:21:11 +01:00
Alex P 557b3bf3e6 Fix: app not loading via HTTP 2025-10-27 11:21:49 +02:00
Alex P 450836daba chore: revert golangci-lint config and remove audio stub
- Revert .golangci.yml to dev branch state (removed custom build-tags)
- Remove internal/audio/cgo_source_stub.go (not needed with proper cross-compilation)
- Fix import ordering in ui/src/utils.ts

Use 'make lint-go' for proper ARM cross-compilation environment.
2025-10-24 01:31:06 +03:00
Alex P 68b1bc54ce fix: add stub implementation for CGO audio on non-ARM platforms
Provides no-op AudioSource implementations for platforms that don't
support ARM CGO audio (x86_64, darwin, etc.). This allows golangci-lint
to run successfully on any platform without requiring ARM cross-compilation
toolchain.

The stub implementations return errors when called, ensuring that if
they're accidentally used at runtime on non-ARM platforms, it will fail
gracefully with a clear error message rather than undefined symbols.

Build constraints ensure the real CGO implementation is used on linux/arm
and linux/arm64, while stubs are used everywhere else.
2025-10-24 00:04:05 +03:00
Alex P 54cbd98781 fix: verify audio source change and show accurate feedback
After setting audio output source, fetch the actual value from backend
to verify the change was applied successfully. This prevents the UI
from showing incorrect state when the backend fails to apply the change.

The optimistic update provides immediate feedback, but we now verify
the actual result and show error if backend returned a different value
than expected.
2025-10-23 23:59:02 +03:00