Open
Conversation
User still needs to confirm use of features. Server settings take precedence anyway. Can be overridden by setting H5P_HTTP_FEATURE_POLICY.
Is used by Structure Strip, for instance
kelvin-xu
reviewed
May 9, 2022
| * @var string | ||
| */ | ||
| protected static $h5p_http_feature_policy = 'accelerometer *; autoplay *; camera *; clipboard-write *; fullscreen *; geolocation *; gyroscope *; magnetometer *; microphone *;'; | ||
|
|
There was a problem hiding this comment.
It would be great if you can implement this with associative arrays that apply with a WordPress filter. Then generate the string based on the after-filtered associative array. It would give developers more flexibility to enable/disable permissions based on their site/platform.
Contributor
Author
There was a problem hiding this comment.
@kelvin-xu You're welcome to amend my pull request by sending me one of your own.
There was a problem hiding this comment.
PR has been created for review. Thanks.
…by WordPress hooks.
Improve developer extendability on feature policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change will generously set HTTP feature policies to avoid issues with strict browsers if H5P content needs access to the camera, the microphone, etc. Please compare https://h5p.org/comment/35346 for details and for acceptance by Svein-Tore.
If this approach is feasible, I will gladly port it to Drupal and moodle.