WebKit.XRPermissionRequest¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class WebKit.XRPermissionRequest(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A permission request for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays.
WebKit.XRPermissionRequestrepresents a request for permission to decide whether WebKit can initialize an XR session through the WebXR API.When a
WebKit.XRPermissionRequestis not handled by the user, it is denied by default.New in version 2.52.
- get_consent_optional_features()¶
- Returns:
a
WebKit.XRSessionFeaturesflag combination- Return type:
Gets the optional features that need user consent.
These features can be granted by calling
WebKit.XRPermissionRequest.set_granted_optional_features() before allowing the request withWebKit.PermissionRequest.allow().New in version 2.52.
- get_consent_required_features()¶
- Returns:
a
WebKit.XRSessionFeaturesflag combination- Return type:
Gets the required features that need user consent.
These features are automatically granted if the request is allowed with
WebKit.PermissionRequest.allow().New in version 2.52.
- get_granted_features()¶
- Returns:
a
WebKit.XRSessionFeaturesflag combination- Return type:
Gets the features requested by the origin for the XR device, which are either granted by default or have been explicitly granted by the user.
New in version 2.52.
- get_optional_features_requested()¶
- Returns:
a
WebKit.XRSessionFeaturesflag combination- Return type:
Gets the full set of optional features requested by the web application.
This includes both already granted features and those requiring consent.
New in version 2.52.
- get_required_features_requested()¶
- Returns:
a
WebKit.XRSessionFeaturesflag combination- Return type:
Gets the full set of required features requested by the web application.
This includes both already granted features and those requiring consent.
New in version 2.52.
- get_security_origin()¶
- Returns:
the
WebKit.SecurityOriginthat initiated the request- Return type:
Gets the security origin that initiated the permission request.
New in version 2.52.
- get_session_mode()¶
- Returns:
- Return type:
Gets the session mode for which permission is being requested.
New in version 2.52.
- set_granted_optional_features(granted)¶
- Parameters:
granted (
WebKit.XRSessionFeatures) – granted features
Sets which optional features should be granted if the permission request is allowed.
This function should be called with a subset of the features from
WebKit.XRPermissionRequest.get_consent_optional_features() before callingWebKit.PermissionRequest.allow(). If the request is denied, no features are granted, regardless of what is set here.New in version 2.52.