Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Enables user media access.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebView | 10.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
Devices | Which devices to enable. Pass 1 for microphone. Pass 2 for camera. Pass 4 for display. For multiple values, just add them together. |
1+2 |
Returns OK or error.
Installs it, enable in preferences and load an URL:
# Make sure it's installed
Set Variable [ $r ; Value: MBS("WebView.InstallUserMediaAccess"; 1+2+4) ]
# make sure you have a web viewer with about:blank as URL
# enable via preferences
Set Variable [ $r ; Value: MBS( "WebView.SetPreferences"; "web"; "mediaStreamEnabled"; 1 ) ]
Set Variable [ $r ; Value: MBS( "WebView.SetPreferences"; "web"; "mediaDevicesEnabled"; 1 ) ]
# load some website
Set Web Viewer [ Object Name: "web" ; URL: "https://test.webrtc.org" ]
This function checks for a license.
Created 6th May 2020, last changed 28th June 2023