Skip to content
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

Add sandbox attritube to iframe to allow downloads with new privacy s… #97

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,18 @@ define("WherebyEmbed", {
this.roomUrl.searchParams.set(k, v);
}
});

const isLocalRecordingEnabled = this.roomUrl.searchParams.has("recording");

if (isLocalRecordingEnabled)
this.iframe.sandbox = "allow-downloads allow-same-origin allow-forms allow-scripts allow-popups";
Copy link
Contributor

Choose a reason for hiding this comment

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

ps. I think this should be this.iframe.current.sandbox, perhaps with some conditional checks in there first
Screenshot 2023-11-21 at 17 04 31
Screenshot 2023-11-21 at 17 04 25


this.html`
<iframe
ref=${this.iframe}
src=${this.roomUrl}
allow="autoplay; camera; microphone; fullscreen; speaker; display-capture" />
allow="autoplay; camera; microphone; fullscreen; display-capture"
/>
`;
},
});
Expand Down
Loading