Skip to content

Commit d2865f9

Browse files
SaraVieiraCompuIves
authored andcommitted
allow webcam and audio when possible
1 parent 246686a commit d2865f9

File tree

2 files changed

+2
-1
lines changed
  • packages

2 files changed

+2
-1
lines changed

packages/app/src/app/pages/common/Modals/ShareModal/getCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const getIframeScript = (sandbox, mainModule, state) =>
7171
state
7272
)}" title="${getSandboxName(
7373
sandbox
74-
)}" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>`;
74+
)}" allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>`;
7575

7676
// eslint-disable-next-line
7777
export const getButtonMarkdown = (sandbox, mainModule, state) => {

packages/common/src/components/Preview/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ class BasePreview extends React.Component<Props, State> {
839839
<React.Fragment>
840840
<StyledFrame
841841
sandbox="allow-forms allow-scripts allow-same-origin allow-modals allow-popups allow-presentation"
842+
allow="geolocation; microphone; camera;midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media"
842843
src={
843844
this.serverPreview
844845
? getSSEUrl(sandbox, this.initialPath)

0 commit comments

Comments
 (0)