refactor: remove mobile sender product path (#119)
This commit is contained in:
1 parent
5975dc9b12
commit
6a51ae45ce
35 files changed
+14
-2623
No files matched your search
@@ -132,91 +132,6 @@ code or user data:
|
||||
- Oopz `agora_rtc_sdk.dll`: SHA-256
|
||||
`66B8B34A57BA0EE9DCC6C516E2CC20F5F1EB5D35ED7150FDF37201A46BC8D4A0`.
|
||||
|
||||
## Mobile Sender Boundary
|
||||
|
||||
Android now has one parallel P1 source slice; it does not broaden ADR-0006's
|
||||
Windows scope and does not create a cross-platform sender framework. Mobile Web
|
||||
Host remains unsupported. The accepted native slice targets Android 14/API 34+
|
||||
and the flagship peer-assisted Host direct-child path.
|
||||
|
||||
Android's official `MediaProjection` path captures the display into a `Surface`;
|
||||
selected-app-window capture starts with Android 14 QPR2. API 34 requires fresh
|
||||
consent for each session, one use of each projection token, and a foreground
|
||||
service declared as `mediaProjection`. Rotation or selected-content resizing requires
|
||||
`onCapturedContentResize()` handling; user stop, screen lock, another projection,
|
||||
or process death invalidates the session and requires bounded cleanup through
|
||||
`onStop()`. These OS consent and foreground indicators are part of the product
|
||||
experience and cannot be made invisible.
|
||||
|
||||
The bounded Android data path is:
|
||||
|
||||
```text
|
||||
MediaProjection -> ScreenCapturerAndroid -> hardware VP8/H.264 --.
|
||||
explicit UID -> AudioPlaybackCapture -> ADM callback ---------+
|
||||
-> existing site access / room / WSS / peer-assisted direct assignment
|
||||
-> at most two unmodified Web viewers
|
||||
```
|
||||
|
||||
The slice uses the public libwebrtc Android API rather than hand-building capture,
|
||||
RTP, pacing, congestion control, or SRTP. `DefaultVideoEncoderFactory` is excluded
|
||||
because it composes hardware with software fallback; a filtered
|
||||
`HardwareVideoEncoderFactory` exposes only VP8/H.264. Optional playback audio is
|
||||
default-off and source-only: the user separately selects one single-package UID,
|
||||
the capture matches that UID plus eligible game/media usages, and the fixed
|
||||
webrtc-sdk public ADM callback injects 48 kHz mono PCM16 while its microphone
|
||||
`AudioRecord` is disabled. One audio source/track is attached to the same maximum
|
||||
of two direct children; this does not prove a shared physical Opus encoder. It
|
||||
adds no mobile-only topology, `LOW`, AV1, codec ladder, third downstream edge,
|
||||
SFU publisher, selected-edge TURN, microphone/system-mix fallback, or software
|
||||
fallback. Direct children are authoritative by route revision and connection
|
||||
generation. A requested SFU publication returns
|
||||
one bounded `route-failed`; it is not reported as supported.
|
||||
|
||||
The first functional target is 720p30 at a 3 Mbps ceiling. Codec name and Android
|
||||
hardware metadata are admission signals, not performance proof. Once the source
|
||||
slice closes, one device/one Viewer smoke checks consent, selected encoder, first
|
||||
frame and cleanup. The audio source compile is closed, but eligible/opt-out
|
||||
playback, silence, background service behavior and A/V sync still require one
|
||||
device; track creation only means selected-UID playback was requested. Rotation
|
||||
hot-resize, network reselection, thermal/power and multi-Viewer matrices follow
|
||||
later; they do not block source landing and cannot silently enable software
|
||||
encoding. Network changes reuse the
|
||||
existing per-edge WebRTC recovery contract rather than restarting capture or
|
||||
creating a new transport.
|
||||
|
||||
Activity recreation does not yet reattach to an active foreground service. After
|
||||
rotation or process recreation, controls can show their initial state while the
|
||||
service continues sharing; its duplicate-start gate still prevents a second
|
||||
session. Restoring service status is a later P2 lifecycle task, not a media-path
|
||||
requirement for this source slice.
|
||||
|
||||
The pinned `webrtc-sdk/android` packaging project is MIT-licensed and bundles
|
||||
upstream libwebrtc under its BSD-style license and PATENTS terms; the Maven
|
||||
artifact POM records BSD-3-Clause. LiveKit's Apache-2.0 `ScreenAudioCapturer` was
|
||||
studied as a reference for the public ADM callback and playback-capture lifecycle,
|
||||
but no implementation was copied. OkHttp and kotlinx.serialization are
|
||||
Apache-2.0. A future distributed APK must retain the applicable
|
||||
third-party notices and still waits on Screener's project-license decision.
|
||||
|
||||
OkHttp 5.3.0 resolves Kotlin stdlib 2.2.21. Android's current compatibility
|
||||
table requires AGP 8.10 or newer for Kotlin 2.2 class files, and AGP 8.10 uses
|
||||
Gradle 8.11.1 plus JDK 17. The source therefore pins Kotlin 2.2.21, AGP 8.10.1,
|
||||
Gradle 8.11.1, compile SDK 35 and JDK 17 rather than relying on an IDE default.
|
||||
|
||||
iOS work remains later and separate. Apple's current ScreenCaptureKit
|
||||
documentation says the framework replaces ReplayKit for screen streaming and
|
||||
that a broadcast extension is no longer required, but the iOS sample requires
|
||||
iOS 27 and the current APIs are still beta. Screener therefore does not build a
|
||||
ReplayKit/Broadcast Upload Extension compatibility stack. After the final iOS
|
||||
27 SDK and stable OS ship, one narrow ScreenCaptureKit system-picker spike may
|
||||
feed a fixed-`HIGH` VideoToolbox encoder into the same one/two-Web-viewer
|
||||
contract. It must set
|
||||
`kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder` and verify
|
||||
`kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder`; otherwise it
|
||||
fails closed. Rotation, background execution, lock-screen behavior, network
|
||||
switching, thermal throttling, audio scope, and A/V sync remain explicit gates
|
||||
on real devices, not implied framework capabilities.
|
||||
|
||||
## Pion Validation Route
|
||||
|
||||
Pion is the released-public-API validation route while the larger libwebrtc
|
||||
@@ -606,30 +521,7 @@ SFU/UDP fails and needs its own bounded transport gate.
|
||||
- [RFC 4588 RTP retransmission](https://www.rfc-editor.org/rfc/rfc4588.html)
|
||||
- [RFC 8888 congestion-control feedback](https://www.rfc-editor.org/rfc/rfc8888.html)
|
||||
- [Electron desktop capture](https://www.electronjs.org/docs/latest/api/desktop-capturer/)
|
||||
- [Android media projection](https://developer.android.com/media/grow/media-projection)
|
||||
- [Android 14 app screen sharing](https://developer.android.com/about/versions/14/features/app-screen-sharing)
|
||||
- [Android media-projection foreground service](https://developer.android.com/develop/background-work/services/fgs/service-types#media-projection)
|
||||
- [Android audio-playback capture](https://developer.android.com/media/platform/av-capture)
|
||||
- [Android `AudioPlaybackCaptureConfiguration`](https://developer.android.com/reference/android/media/AudioPlaybackCaptureConfiguration)
|
||||
- [Android 14 foreground-service type requirement](https://developer.android.com/about/versions/14/changes/fgs-types-required)
|
||||
- [Android `MediaCodecInfo`](https://developer.android.com/reference/android/media/MediaCodecInfo)
|
||||
- [Android `MediaCodecList`](https://developer.android.com/reference/android/media/MediaCodecList)
|
||||
- [libwebrtc `ScreenCapturerAndroid`](https://chromium.googlesource.com/external/webrtc/+/HEAD/sdk/android/api/org/webrtc/ScreenCapturerAndroid.java)
|
||||
- [libwebrtc `DefaultVideoEncoderFactory`](https://chromium.googlesource.com/external/webrtc/+/HEAD/sdk/android/api/org/webrtc/DefaultVideoEncoderFactory.java)
|
||||
- [libwebrtc `HardwareVideoEncoderFactory`](https://chromium.googlesource.com/external/webrtc/+/HEAD/sdk/android/api/org/webrtc/HardwareVideoEncoderFactory.java)
|
||||
- [`webrtc-sdk/android` v144.7559.12](https://github.com/webrtc-sdk/android/tree/v144.7559.12)
|
||||
- [`webrtc-sdk/android` license](https://github.com/webrtc-sdk/android/blob/main/LICENSE)
|
||||
- [LiveKit Android `ScreenAudioCapturer` reference](https://github.com/livekit/client-sdk-android/blob/4fdea28d8bd4b7053d7e5f0df50527f2c51fd38f/livekit-android-sdk/src/main/java/io/livekit/android/audio/ScreenAudioCapturer.kt)
|
||||
- [LiveKit Android license](https://github.com/livekit/client-sdk-android/blob/4fdea28d8bd4b7053d7e5f0df50527f2c51fd38f/LICENSE)
|
||||
- [libwebrtc license](https://webrtc.googlesource.com/src/+/refs/heads/main/LICENSE)
|
||||
- [OkHttp license](https://github.com/square/okhttp/blob/master/LICENSE.txt)
|
||||
- [kotlinx.serialization license](https://github.com/Kotlin/kotlinx.serialization/blob/master/LICENSE.txt)
|
||||
- [Android Kotlin/AGP compatibility](https://developer.android.com/build/kotlin-support)
|
||||
- [Android Gradle Plugin 8.10 compatibility](https://developer.android.com/build/releases/agp-8-10-0-release-notes)
|
||||
- [Apple ScreenCaptureKit](https://developer.apple.com/documentation/ScreenCaptureKit)
|
||||
- [Apple iOS ScreenCaptureKit sample](https://developer.apple.com/documentation/screencapturekit/capturing-screen-content-on-ios)
|
||||
- [Apple required hardware encoder key](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderspecification_requirehardwareacceleratedvideoencoder)
|
||||
- [Apple hardware encoder readback](https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_usinghardwareacceleratedvideoencoder)
|
||||
- [GitHub Actions artifact upload](https://github.com/actions/upload-artifact)
|
||||
- [GitHub Windows 2025 runner image](https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md)
|
||||
- [PowerShell `Compress-Archive`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/compress-archive)
|
||||
|
||||
Reference in new issue
Block a user