From ad79ab99dee9090cd25296a5147d9db4ca4baf2a Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Sun, 15 Mar 2026 20:30:50 +0100 Subject: [PATCH] Add GStreamer codec docs, fix connection indicator reactivity Add GStreamer codec dependencies to PKGBUILD and install instructions to README for Linux video/audio playback. Add periodic relay pool status check so connection indicator stays accurate after reconnects. --- PKGBUILD | 3 +++ README.md | 12 ++++++++++++ src/stores/feed.ts | 12 ++++++++++++ 3 files changed, 27 insertions(+) diff --git a/PKGBUILD b/PKGBUILD index 5f0dd3e..f16a8af 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,6 +11,9 @@ depends=( 'gtk3' 'libayatana-appindicator' 'openssl' + 'gst-plugins-base' + 'gst-plugins-good' + 'gst-libav' ) makedepends=( 'rust' diff --git a/README.md b/README.md index 716cefe..382779b 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,18 @@ Grab the latest release from the [Releases page](https://github.com/hoornet/wrys **Windows note:** The installer is not yet code-signed. Windows SmartScreen will show an "Unknown publisher" warning — click "More info → Run anyway" to install. +**Linux note:** Video and audio playback requires GStreamer codec packages. The AUR package installs these automatically. For `.deb`/`.rpm` installs, you may need: +```bash +# Arch / Manjaro +sudo pacman -S gst-plugins-base gst-plugins-good gst-libav + +# Ubuntu / Debian +sudo apt install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav + +# Fedora +sudo dnf install gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-libav +``` + ## Features **Identity & accounts** diff --git a/src/stores/feed.ts b/src/stores/feed.ts index 5662804..a5becc5 100644 --- a/src/stores/feed.ts +++ b/src/stores/feed.ts @@ -28,6 +28,18 @@ export const useFeedStore = create((set, get) => ({ set({ error: null }); await connectToRelays(); set({ connected: true }); + + // Monitor relay connectivity — update status if all relays disconnect + const ndk = getNDK(); + const checkConnection = () => { + const relays = Array.from(ndk.pool?.relays?.values() ?? []); + const hasConnected = relays.some((r) => r.connected); + if (get().connected !== hasConnected) { + set({ connected: hasConnected }); + } + }; + // Re-check periodically (relay reconnects, disconnects) + setInterval(checkConnection, 5000); } catch (err) { set({ error: `Connection failed: ${err}` }); }