Compare commits
1
Commits
514e42fccb
...
v0.0.18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90f03dd142 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jellytau",
|
"name": "jellytau",
|
||||||
"version": "0.0.16",
|
"version": "0.0.18",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "bun@1.3.5",
|
"packageManager": "bun@1.3.5",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "jellytau",
|
"productName": "jellytau",
|
||||||
"version": "0.0.16",
|
"version": "0.0.18",
|
||||||
"identifier": "com.dtourolle.jellytau",
|
"identifier": "com.dtourolle.jellytau",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "bun run dev",
|
"beforeDevCommand": "bun run dev",
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
import { createRustReportHost } from "$lib/player/adapters/rustReportHost";
|
import { createRustReportHost } from "$lib/player/adapters/rustReportHost";
|
||||||
import { isPipSupported, enterPip, setAutoEnterEnabled } from "$lib/utils/pictureInPicture";
|
import { isPipSupported, enterPip, setAutoEnterEnabled } from "$lib/utils/pictureInPicture";
|
||||||
import {
|
import {
|
||||||
isBackgroundAudioSupported,
|
|
||||||
setBackgroundAudioEnabled,
|
setBackgroundAudioEnabled,
|
||||||
subscribeAppBackgrounded,
|
subscribeAppBackgrounded,
|
||||||
subscribeAppForegrounded,
|
subscribeAppForegrounded,
|
||||||
} from "$lib/utils/backgroundAudio";
|
} from "$lib/utils/backgroundAudio";
|
||||||
|
import { platform } from "@tauri-apps/plugin-os";
|
||||||
import {
|
import {
|
||||||
computeHandoffPosition,
|
computeHandoffPosition,
|
||||||
initialHandoffState,
|
initialHandoffState,
|
||||||
@@ -1178,8 +1178,14 @@
|
|||||||
// playback off to the native ExoPlayer audio service; the WebView <video> is
|
// playback off to the native ExoPlayer audio service; the WebView <video> is
|
||||||
// torn down so no video is decoded. Mutually exclusive with auto-PiP.
|
// torn down so no video is decoded. Mutually exclusive with auto-PiP.
|
||||||
//
|
//
|
||||||
// Resolved synchronously (no await) for the same native-mode reason as PiP.
|
// Gate on the platform, NOT on the AndroidBackgroundAudio JS-bridge probe.
|
||||||
const backgroundAudioSupported = isBackgroundAudioSupported();
|
// The native isSupported() is unconditionally true on Android, but the bridge
|
||||||
|
// is injected into the WebView asynchronously and races component mount — a
|
||||||
|
// one-shot bridge probe here comes out false on some loads and, being a const,
|
||||||
|
// never recovers, so the button vanished on "some videos". platform() is
|
||||||
|
// available synchronously and is stable. toggleBackgroundAudio() no-ops safely
|
||||||
|
// if the bridge is momentarily absent.
|
||||||
|
const backgroundAudioSupported = platform() === "android";
|
||||||
let backgroundAudioOn = $state(false); // v1: default OFF each session
|
let backgroundAudioOn = $state(false); // v1: default OFF each session
|
||||||
let handoffState: BackgroundAudioState = { ...initialHandoffState };
|
let handoffState: BackgroundAudioState = { ...initialHandoffState };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user