Need ability to specify allow attribute on embedded live sample iframes
Categories
(developer.mozilla.org Graveyard :: Wiki pages, defect)
Tracking
(Not tracked)
People
(Reporter: sheppy, Unassigned)
Details
We need the ability to specify requested permissions for samples in our iframes going forward, due to the dawn of the Feature Policy era. Without adding this capability, many of our integrated examples and the like will stop working. This will be particularly problematic in the documentation for WebRTC and other media APIs such as Media Capture, getDisplayMedia(), and MediaRecorder.
If we don't come up with a solution soon many of our pages will be presenting error messages to users on an increasingly frequent basis as users upgrade into browsers that emable Feature Policy by default, or for users who enable it themselves.
| Reporter | ||
Comment 1•7 years ago
|
||
(I put this under "Wiki Pages" because it's the closest we have that I could think of. It's going to be an issue even post-wiki)
Comment 2•7 years ago
|
||
Note that camera and microphone already don't work in Chrome. E.g. in https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_recording_API/Recording_a_media_element#Result
I get NotAllowedError: Permission denied because Chrome implements feature policy already.
| Reporter | ||
Comment 3•7 years ago
|
||
Looks like we may already have the ability to do this. Will check to be sure it does the trick soon.
Comment 4•7 years ago
|
||
Based on this info, I was able to fix https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_recording_API/Recording_a_media_element#Result as follows, by changing the call from:
<p>{{ EmbedLiveSample('Example', 600, 440) }}</p>
tp:
<p>{{ EmbedLiveSample('Example', 600, 440, "", "", "", "camera;microphone") }}</p>
We might want to scan for more places that need this.
Comment 5•7 years ago
|
||
Also, if there are new attributes needed that are currently not allowed, this is managed via constants here:
https://github.com/mozilla/kuma/blob/master/kuma/wiki/constants.py#L39
Updated•6 years ago
|
Description
•