Why is this needed?
Currently, Firefox for Android does not support the WebRTC Screen Capture API (navigator.mediaDevices.getDisplayMedia()). When users join web-based video conferencing platforms—such as Google Meet, Discord, Zoom Web, or Teams—directly through Firefox on Android, attempting to share a screen or tab fails or reports that the feature is unsupported.
Users are forced to either leave Firefox to install native dedicated apps or switch away from web-based workflows entirely.
Proposed Solution:
Hook Android's native MediaProjection API into GeckoView's WebRTC engine to expose getDisplayMedia() on Android:
- System Permission Integration: Trigger Android's standard system consent dialog (MediaProjectionManager) via a Foreground Service when a web app calls getDisplayMedia().
- Audio & Video Capture: Pipe the display frame buffer (and optionally system audio via Android 10+ Audio Playback Capture) into Gecko's WebRTC video pipeline.
- User Controls: Display a persistent Android notification indicating an active screen share with a quick "Stop Sharing" button to maintain security and transparency.
Benefits to Firefox:
- Gives Firefox a major feature advantage, as mobile Chrome and other main Android browsers also lack native in-browser screen sharing.
- Delivers feature parity between Firefox Desktop and Mobile for WebRTC applications.
- Improves productivity for users who rely heavily on web applications without requiring extra native apps.