How WebRTC permissions work in WebView apps
Similar to how permissions work in desktop and mobile browsers, your Median app will automatically request microphone and camera access when your embedded WebRTC application initiates media capture.Supported WebRTC permissions
- Microphone access: required for voice calls or audio streams
- Camera access: required for video calls or media recording
No native code neededMedian automatically handles WebRTC permission prompts using its secure
WebView implementation. You don’t need to write native code to enable camera
or microphone access.
Developer tips for WebRTC in Median apps
- Ensure your web app is served over HTTPS, as WebRTC permissions are restricted on insecure origins.
- Use
navigator.mediaDevices.getUserMedia()to trigger permission requests. Median’s WebView will detect these calls and invoke the native permission dialog. - Always include graceful fallbacks and error handling in case users deny access to camera or microphone.
Test WebRTC functionality
You can test WebRTC features in your Median app using official tools and demos:Testing audio & microphone in the embedded simulator
Median’s embedded App Studio simulator has limited audio support:- Audio playback is not supported in the embedded simulator.
- Microphone input is not supported in the embedded simulator, so mic access for WebRTC voice/video calls can’t be tested in the embedded simulator at all.