From 57758895bc7b0f7f21497194e81172f43d634852 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 3 Oct 2026 09:03:34 +0200 Subject: feat(android): casting through a LAN relay and the platform cast SDK A port of cast-relay.js (backlog also bounded in bytes), discovery and control with the default media receiver, relay calls kept in order, and a foreground service plus a WebView kept visible so a cast survives the screen going off. Co-Authored-By: Claude Opus 5.5 --- .../app/src/main/AndroidManifest.xml | 13 + .../app/src/main/assets/bridge/meshbay-bridge.js | 70 ++++-- .../main/kotlin/org/meshbay/client/MainActivity.kt | 27 +- .../kotlin/org/meshbay/client/bridge/Bridge.kt | 10 +- .../kotlin/org/meshbay/client/bridge/Channels.kt | 18 +- .../org/meshbay/client/cast/BoxAccumulator.kt | 78 ++++++ .../kotlin/org/meshbay/client/cast/CastChannels.kt | 93 +++++++ .../kotlin/org/meshbay/client/cast/CastControl.kt | 232 +++++++++++++++++ .../kotlin/org/meshbay/client/cast/CastRelay.kt | 278 +++++++++++++++++++++ .../kotlin/org/meshbay/client/cast/CastService.kt | 72 ++++++ .../kotlin/org/meshbay/client/save/SaveNames.kt | 1 + .../org/meshbay/client/shell/ShellWebView.kt | 25 ++ 12 files changed, 886 insertions(+), 31 deletions(-) create mode 100644 packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/cast/BoxAccumulator.kt create mode 100644 packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/cast/CastChannels.kt create mode 100644 packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/cast/CastControl.kt create mode 100644 packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/cast/CastRelay.kt create mode 100644 packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/cast/CastService.kt create mode 100644 packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/shell/ShellWebView.kt (limited to 'packages/meshbay-android/app/src/main') diff --git a/packages/meshbay-android/app/src/main/AndroidManifest.xml b/packages/meshbay-android/app/src/main/AndroidManifest.xml index 82b827e..d6f83ee 100644 --- a/packages/meshbay-android/app/src/main/AndroidManifest.xml +++ b/packages/meshbay-android/app/src/main/AndroidManifest.xml @@ -2,6 +2,12 @@ + + + + +