Skip to content

Internalize MediaStream recording example #40317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Josh-Cena
Copy link
Member

Part of #16120. This example is not too big, but permissions may not work; still testing.

@Josh-Cena Josh-Cena requested a review from a team as a code owner July 11, 2025 09:05
@Josh-Cena Josh-Cena requested review from wbamberg and removed request for a team July 11, 2025 09:05
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Jul 11, 2025
Copy link
Contributor

github-actions bot commented Jul 11, 2025

Preview URLs

(comment last updated: 2025-07-11 09:43:03)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Josh-Cena Josh-Cena requested a review from bsmth July 11, 2025 09:09
@Josh-Cena
Copy link
Member Author

Apparently camera perms don't work on DMO. 🙄

@Josh-Cena Josh-Cena closed this Jul 11, 2025
@bsmth
Copy link
Member

bsmth commented Jul 11, 2025

Apparently camera perms don't work on DMO. 🙄

Isn't it possible via this: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Page_structures/Live_samples#allowing_features

@Josh-Cena
Copy link
Member Author

You would need to set Permissions-Policy. You can only set allow and sandbox iframe attributes

@Josh-Cena Josh-Cena reopened this Jul 11, 2025
@Josh-Cena
Copy link
Member Author

Uh... I didn't get enough sleep.

@bsmth
Copy link
Member

bsmth commented Jul 11, 2025

You would need to set Permissions-Policy. You can only set allow and sandbox iframe attributes

There's one here to have a look at

{{EmbedLiveSample('Example_of_recording_a_media_element', '600', '440', , , , 'camera;microphone')}}

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Josh-Cena
Copy link
Member Author

Mmm. CSP still blocks the blob URL. That's actually a bit surprising given I've seen blob URLs being used elsewhere.

@bsmth
Copy link
Member

bsmth commented Jul 11, 2025

Mmm. CSP still blocks the blob URL. That's actually a bit surprising given I've seen blob URLs being used elsewhere.

Production media-src CSP is 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; so we would need blob: added to that for it to work.

@Josh-Cena
Copy link
Member Author

I'm not sure where to raise this, nor am I sure if this is a good idea by default, but I think at least it should be configurable. Perhaps the playground can benefit from it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants