external icon indicating copy to clipboard operation
external copied to clipboard

Grant permission for multimedia in the frame

Open TheOneWithTheBraid opened this issue 4 years ago • 6 comments

Aside of full-screen, permission for microphone, camera and display capture are granted for use with WebRTC.

Fixes #237

TheOneWithTheBraid avatar Feb 24 '21 13:02 TheOneWithTheBraid

This may benefit from being an option that can be set by the admin in the admin settings?

gary-kim avatar Feb 24 '21 16:02 gary-kim

Well, I thought of, but I did not find any case: Why should I cut down the options a website features? At least if I include a website using WebRTC, in almost every case this is the principal feature of that service.

TheOneWithTheBraid avatar Feb 24 '21 16:02 TheOneWithTheBraid

Well because security is a design principal. Otherwise the options for that wouldn't be off in first place 🙃

nickvergessen avatar Feb 24 '21 17:02 nickvergessen

I'm trying to use this PR and tested it with my Jitsi-meet. There is still no video/audio permissions But have tested a fresh HTML Iframe with allow = "camera; microphone;" Is the issue on my nextcloud side? I have the latest nextcloud 21.0.2(docker) and external-sites app 3.7.3

verbeckii avatar Jun 16 '21 12:06 verbeckii

This does not work currently due to the Feature-Policy also being set in the headers so that will also need to be set if the user wants these permissions given to the embedded website.

gary-kim avatar Jun 17 '21 03:06 gary-kim

This does not work currently due to the Feature-Policy also being set in the headers so that will also need to be set if the user wants these permissions given to the embedded website.

thanks editing nextcloud/lib/public/AppFramework/Http/FeaturePolicy.php by adding * inside protected $cameraDomains = [ '*', ]; and protected $microphoneDomains = [ '*', ];

Solved my camera/audio iFrame permission issue

verbeckii avatar Jun 17 '21 08:06 verbeckii

Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, we would appreciate your feedback on your experience with our community management team.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

github-actions[bot] avatar Jun 22 '23 12:06 github-actions[bot]

Hi @TheOneWithTheBraid, thank you for your PR. I'm sorry this has been open for so long.

I have a few changes I'd like to see in this PR before it can be merged:

  • You need to add a FeaturePolicy so that your changes actually work. You can take a look at https://github.com/nextcloud/spreed/blob/master/lib/Listener/FeaturePolicyListener.php
  • The settings should contain an option to allow additional permissions to the iframe.
  • It would make sense to make it possible to configure any permissions in the settings and not just the ones you added here. It would be great if all permissions in https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Http/EmptyFeaturePolicy.php could be configured in the settings.

I hope this helps with bringing the PR forward. Let me know if you have questions or need help.

provokateurin avatar Aug 21 '23 07:08 provokateurin