WebViewMediaIntegrityApiStatusConfig
@RequiresFeature(name = WebViewFeature.WEBVIEW_MEDIA_INTEGRITY_API_STATUS, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
public 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 |
|---|
public final class WebViewMediaIntegrityApiStatusConfig.BuilderBuilds a |
Constants |
|
|---|---|
static final 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. |
static final int |
Enables the WebView Media Integrity API and allows sharing of the app package name with the JavaScript caller. |
static final int |
Enables the WebView Media Integrity API for JavaScript callers but disables sharing app package name in generated tokens. |
Public constructors |
|---|
Public methods |
|
|---|---|
int |
Returns the default value for origins that don't match any override rules. |
@NonNull Map<String, Integer> |
Get the explicitly set override rules. |
Constants
WEBVIEW_MEDIA_INTEGRITY_API_DISABLED
public static final int WEBVIEW_MEDIA_INTEGRITY_API_DISABLED = 0
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
public static final int WEBVIEW_MEDIA_INTEGRITY_API_ENABLED = 2
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
public static final int WEBVIEW_MEDIA_INTEGRITY_API_ENABLED_WITHOUT_APP_IDENTITY = 1
Enables the WebView Media Integrity API for JavaScript callers but disables sharing app package name in generated tokens.
Public constructors
WebViewMediaIntegrityApiStatusConfig
public WebViewMediaIntegrityApiStatusConfig(
@NonNull WebViewMediaIntegrityApiStatusConfig.Builder builder
)
Public methods
getDefaultStatus
public int getDefaultStatus()
Returns the default value for origins that don't match any override rules.