WebViewMediaIntegrityApiStatusConfig
@RequiresFeature(name = WebViewFeature.WEBVIEW_MEDIA_INTEGRITY_API_STATUS, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
class WebViewMediaIntegrityApiStatusConfig
Configuration to set API enablement status for site origins through override rules.
Websites will follow the default status supplied in the builder constructor, unless the site origin matches one of the origin patterns supplied in the override rules.
The override rules are a map from origin patterns to the desired WebViewMediaIntegrityApiStatus.
Summary
Nested types |
|---|
|
Builds a |
Constants |
|
|---|---|
const Int |
Disables the WebView Media Integrity API and causes it to return an error code to the JavaScript callers indicating that the app has disabled it. |
const Int |
Enables the WebView Media Integrity API and allows sharing of the app package name with the JavaScript caller. |
const Int |
Enables the WebView Media Integrity API for JavaScript callers but disables sharing app package name in generated tokens. |
Public constructors |
|---|
Public functions |
|
|---|---|
Int |
Returns the default value for origins that don't match any override rules. |
(Mutable)Map<String!, Int!> |
Get the explicitly set override rules. |
Constants
WEBVIEW_MEDIA_INTEGRITY_API_DISABLED
const val WEBVIEW_MEDIA_INTEGRITY_API_DISABLED = 0: Int
Disables the WebView Media Integrity API and causes it to return an error code to the JavaScript callers indicating that the app has disabled it.
WEBVIEW_MEDIA_INTEGRITY_API_ENABLED
const val WEBVIEW_MEDIA_INTEGRITY_API_ENABLED = 2: Int
Enables the WebView Media Integrity API and allows sharing of the app package name with the JavaScript caller.
This is the default value.
WEBVIEW_MEDIA_INTEGRITY_API_ENABLED_WITHOUT_APP_IDENTITY
const val WEBVIEW_MEDIA_INTEGRITY_API_ENABLED_WITHOUT_APP_IDENTITY = 1: Int
Enables the WebView Media Integrity API for JavaScript callers but disables sharing app package name in generated tokens.
Public constructors
WebViewMediaIntegrityApiStatusConfig
WebViewMediaIntegrityApiStatusConfig(
builder: WebViewMediaIntegrityApiStatusConfig.Builder
)
Public functions
getDefaultStatus
fun getDefaultStatus(): Int
Returns the default value for origins that don't match any override rules.