Skip to content

Conversation

@otacke
Copy link
Contributor

@otacke otacke commented Jun 18, 2020

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.

otacke added 3 commits June 18, 2020 16:43
User still needs to confirm use of features.
Server settings take precedence anyway.
Can be overridden by setting H5P_HTTP_FEATURE_POLICY.
* @var string
*/
protected static $h5p_http_feature_policy = 'accelerometer *; autoplay *; camera *; clipboard-write *; fullscreen *; geolocation *; gyroscope *; magnetometer *; microphone *;';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kelvin-xu You're welcome to amend my pull request by sending me one of your own.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, thanks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR has been created for review. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants