WebView.InstallUserMediaAccess
------------------------------

Enables user media access.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [10.2](newinversion102.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "WebView.InstallUserMediaAccess"; Devices ) 

**MBS**( **"WebView.InstallUserMediaAccess";** /\* Enables user media access. \*/  
**$Devices**) /\* Which devices to enable.  
Pass 1 for microphone.  
Pass 2 for camera.  
Pass 4 for display.  
For multiple values, just add them together.e.g. 1+2 \*/ 

### Parameters

| 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 |

### Result

Returns OK or error.

### Description

Enables user media access.  
For FileMaker Pro on macOS or FileMaker iOS SDK applications on iOS.  
Call once on start of FileMaker to enable user media access.  
  
See [AVRecorder.AuthorizationStatusForMediaType](AVRecorderAuthorizationStatusForMediaType.md) to query status for camera/microphone access.  
### Examples

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](WebViewSetPreferences.md)"; "web"; "mediaStreamEnabled"; 1 ) \]   
Set Variable \[ $r ; Value: MBS ( "[WebView.SetPreferences](WebViewSetPreferences.md)"; "web"; "mediaDevicesEnabled"; 1 ) \]   
  
\# load some website   
Set Web Viewer \[ Object Name: "web" ; URL: "https://test.webrtc.org" \]  
### See also

- [AVRecorder.AuthorizationStatusForMediaType](AVRecorderAuthorizationStatusForMediaType.md)
- [WebView.SetPreferences](WebViewSetPreferences.md)

### Release notes

- **Version 14.0**
    - Fixed [WebView.InstallUserMediaAccess](https://www.mbsplugins.eu/WebViewInstallUserMediaAccess.shtml) to not return error when called a second time.
- **Version 10.2**
    - Added [WebView.InstallUserMediaAccess](https://www.mbsplugins.eu/WebViewInstallUserMediaAccess.shtml) function.

### Example Databases

- [WebViewer/InstallUserMediaAccess](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebViewer/InstallUserMediaAccess.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 13.6pr1](https://www.mbsplugins.de/archive/2023-12-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [WebViewer preferences](https://www.mbsplugins.de/archive/2021-01-21/WebViewer_preferences/monkeybreadsoftware_blog_filemaker)
- [macOS Privacy and FileMaker](https://www.mbsplugins.de/archive/2020-08-11/macOS_Privacy_and_FileMaker/monkeybreadsoftware_blog_filemaker)
- [News about the MBS FileMaker Plugin 10.2](https://www.mbsplugins.de/archive/2020-05-19/News_about_the_MBS_FileMaker_P/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 10.2](https://www.mbsplugins.de/archive/2020-05-12/Neues_MBS_FileMaker_Plugin_102/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 10.2 - More than 6200 Functions In One Plugin](https://www.mbsplugins.de/archive/2020-05-12/MBS_FileMaker_Plugin_102_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.2pr7](https://www.mbsplugins.de/archive/2020-05-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 6th May 2020 , last changed 28th June 2023

  
[WebView.InstallMultiFileOpenDialog](WebViewInstallMultiFileOpenDialog.md) - [WebView.IsLoading](WebViewIsLoading.md)

[HTML Version](WebViewInstallUserMediaAccess.shtml)