aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-04 22:46:00 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-04 22:46:00 +0200
commit652465910dcdcc761aa2e078ff1a82625e2a0aa5 (patch)
tree2378741f73ef0faaf138689ea366febef905e85c /packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
parent859d7ce71795dcfd5701cb08a684dcef23e7c4c0 (diff)
downloadmeshbay-652465910dcdcc761aa2e078ff1a82625e2a0aa5.tar.gz
feat(android): music keeps playing with the screen off
While a track plays, the page asks the shell to stay awake (playback:keep-alive): on Android the cast's foreground service and visible WebView, with a notification; on desktop a power save blocker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js')
-rw-r--r--packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js b/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
index 4755531..7ace33b 100644
--- a/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
+++ b/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
@@ -162,6 +162,12 @@
chromecastPlay: () => call('cast:chromecast:play'),
} } : {}),
+ // Music is playing: keep the process, the Wi-Fi and the page awake with
+ // the screen off, behind a notification, until told otherwise.
+ playback: {
+ keepAlive: (on) => call('playback:keep-alive', on === true),
+ },
+
// Where downloads go, chosen once. A display name comes back, never a URI.
folder: {
choose: () => call('folder:choose'),