diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-04 22:46:00 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-04 22:46:00 +0200 |
| commit | 652465910dcdcc761aa2e078ff1a82625e2a0aa5 (patch) | |
| tree | 2378741f73ef0faaf138689ea366febef905e85c /packages/meshbay-client/src/preload.js | |
| parent | 859d7ce71795dcfd5701cb08a684dcef23e7c4c0 (diff) | |
| download | meshbay-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-client/src/preload.js')
| -rw-r--r-- | packages/meshbay-client/src/preload.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/meshbay-client/src/preload.js b/packages/meshbay-client/src/preload.js index 43cf317..3af6c10 100644 --- a/packages/meshbay-client/src/preload.js +++ b/packages/meshbay-client/src/preload.js @@ -165,6 +165,11 @@ contextBridge.exposeInMainWorld('meshbay', { serviceMode: (action) => ipcRenderer.invoke('node:service-mode', action), }, + // Music is playing: the machine must not idle-sleep under it. + playback: { + keepAlive: (on) => ipcRenderer.invoke('playback:keep-alive', on === true), + }, + // LAN cast relay. The main process runs a local HTTP server and the // renderer feeds it decrypted segments. A Chromecast or Smart TV on the // same Wi-Fi plays from the URL. |