NUKnightLab / NUKnightLab/StoryMapJS
Feature Policy warnings
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 248
- Forks
- 61
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
YouTube embeds (possibly others?) trigger a large number of "Feature Policy" warnings that seem to stem from the feature allow list set on the video iframe embed.
Feature policies are tweakable via the Feature-Policy response header
The iframe itself comes from the YouTube iframe embed API which sets a number of "allows" including, among others: autoplay, accelerometer, clipboard-write.
Because we are not setting the Feature-Policy header on CDN content, there is then a resulting discontinuity between what the YouTube API is allowing and what the page response headers are allowing, resulting in these warnings. Since the warnings result in the browser erring on the side of safety, they are not especially problematic, but are indicative of potential features that might be unlocked. In particular we may want to support autoplay -- it is not clear if any of the other features might be useful.
At this time, the YouTube iframe embed API does not seem to support tweaking the allow list. Thus, the fix to this would be either to allow all of these features via Feature-Policy header, or to generate our own iframe code without the API. (Note that simply modifying the allow list after the iframe is injected will not actually squelch these warnings.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the YouTube iframe embed generation and the CDN or page response-header configuration described in the issue. Reproduce the Feature-Policy warnings in a browser and compare the iframe allow list with the response header. Done means selecting and implementing one supported approach, with the warnings addressed and the intended features, such as autoplay, verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100