From 90f03dd1426cd2cb89cd2a14fc7277d2b0008b23 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Fri, 24 Jul 2026 20:32:08 +0200 Subject: [PATCH] fix(player): show background-audio button on all Android video playback The audio-only (background-audio) button was gated on the AndroidBackgroundAudio JS-bridge probe, resolved once as a const at mount. The bridge is injected into the WebView asynchronously and races component mount, so on some loads the probe returned false and never recovered, hiding the button on 'some videos' at random. Gate on platform() === 'android' instead (synchronous, stable), matching the convention in VolumeControl. toggleBackgroundAudio() already no-ops if the bridge is momentarily absent. Bump version to 0.0.18. --- package.json | 2 +- src-tauri/tauri.conf.json | 2 +- src/lib/components/player/VideoPlayer.svelte | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e0f5ec95..7c144e36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jellytau", - "version": "0.0.16", + "version": "0.0.18", "description": "", "type": "module", "packageManager": "bun@1.3.5", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d8889251..08ea3ebb 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "jellytau", - "version": "0.0.16", + "version": "0.0.18", "identifier": "com.dtourolle.jellytau", "build": { "beforeDevCommand": "bun run dev", diff --git a/src/lib/components/player/VideoPlayer.svelte b/src/lib/components/player/VideoPlayer.svelte index f726c086..697d49ac 100644 --- a/src/lib/components/player/VideoPlayer.svelte +++ b/src/lib/components/player/VideoPlayer.svelte @@ -20,11 +20,11 @@ import { createRustReportHost } from "$lib/player/adapters/rustReportHost"; import { isPipSupported, enterPip, setAutoEnterEnabled } from "$lib/utils/pictureInPicture"; import { - isBackgroundAudioSupported, setBackgroundAudioEnabled, subscribeAppBackgrounded, subscribeAppForegrounded, } from "$lib/utils/backgroundAudio"; + import { platform } from "@tauri-apps/plugin-os"; import { computeHandoffPosition, initialHandoffState, @@ -1178,8 +1178,14 @@ // playback off to the native ExoPlayer audio service; the WebView