# Titanium.UI.iOS.WebViewConfiguration

> A collection of properties used to initialize a web view.

- Source: https://titaniumsdk.com/docs/sdk/12.7.1/Titanium.UI.iOS.WebViewConfiguration
- Titanium SDK version: 12.7.1
- Kind: proxy
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK iPhone 8.0.0, iPad 8.0.0, macOS 9.2.0
- Extends: Titanium.Proxy
- Inheritance: Titanium.Proxy

Use the [Titanium.UI.iOS.createWebViewConfiguration](https://titaniumsdk.com/docs/sdk/Titanium.UI.iOS.md#createWebViewConfiguration) method to create and use as a parameter of [Titanium.UI.WebView.configuration](https://titaniumsdk.com/docs/sdk/Titanium.UI.WebView.md#configuration).
Using this you can determine how soon a webpage is rendered, how media playback is handled, the granularity of items that the
user can select, and many other options. This property can only be set when creating the webview and will be ignored when set afterwards.

See the example section "Usage of WebViewConfiguration with WebView in iOS".
Information on additional available preferences can be derived from the original WebKit sources:
[WKPreferences.mm](https://github.com/WebKit/webkit/blob/main/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm)

## Properties

### allowsAirPlayMediaPlayback

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `true`

A Boolean value indicating whether AirPlay is allowed.

### allowsInlineMediaPlayback

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `For iPhone false and for iPad true.`

A Boolean value indicating whether HTML5 videos play inline or use the native full-screen controller.

You must set this property to play inline video. Set this property to true to play videos inline.
Set this property to false to use the native full-screen controller. When adding a video element
to a HTML document on the iPhone, you must also include the playsinline attribute.
The default value for iPhone is false and the default value for iPad is true.

### allowsPictureInPictureMediaPlayback

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `true`

A Boolean value indicating whether HTML5 videos can play picture-in-picture.

### mediaTypesRequiringUserActionForPlayback

- Type: Number
- Platforms: iPhone, iPad, macOS
- Default: `Titanium.UI.iOS.AUDIOVISUAL_MEDIA_TYPE_NONE`

Determines which media types require a user gesture to begin playing.

Accepts: `Titanium.UI.iOS.AUDIOVISUAL_MEDIA_TYPE_ALL`, `Titanium.UI.iOS.AUDIOVISUAL_MEDIA_TYPE_AUDIO`, `Titanium.UI.iOS.AUDIOVISUAL_MEDIA_TYPE_NONE`, `Titanium.UI.iOS.AUDIOVISUAL_MEDIA_TYPE_VIDEO`

### preferences

- Type: WebViewPreferencesObject
- Platforms: iPhone, iPad, macOS

The preference settings to be used by the web view.

### processPool

- Type: Titanium.UI.iOS.WebViewProcessPool
- Platforms: iPhone, iPad, macOS

The process pool from which to obtain the  Web Content process of view.

When a web view is initialized, either a new web content process is created for it from the
specified pool or an existing process in that pool is used.

### selectionGranularity

- Type: Number
- Platforms: iPhone, iPad, macOS
- Default: `Titanium.UI.iOS.SELECTION_GRANULARITY_DYNAMIC`

The level of granularity with which the user can interactively select content in the web view.

Accepts: `Titanium.UI.iOS.SELECTION_GRANULARITY_CHARACTER`, `Titanium.UI.iOS.SELECTION_GRANULARITY_DYNAMIC`

### suppressesIncrementalRendering

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `false`

A Boolean value indicating whether the web view suppresses content rendering until it is fully
loaded into memory.

## Inherited members

6 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.7.1/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

