# Unable to access camera or audio when embedding SDK into Iframe

**URL:** <https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093>\
**Category:** Meeting SDK\
**Created:** [August 8, 2023, 11:31am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093 "2023-08-08T11:31:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca.licata](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/luca.licata/32/50909_2.png) [@luca.licata](https://devforum.zoom.us/u/luca.licata)\
**Post date:** [August 8, 2023, 11:31am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/1 "2023-08-08T11:31:14Z")

</div>

Meeting SDK 2.14.0

Client View

I am embedding an HTML web page configured with the Zoom Meeting SDK into a separate web page via iframe.

All the relevant attributes(I.e. camera, microphone, screen-wake-lock) are enabled in the iframe

Both pages have different domain, but no cross-domain issues are encountered as the iframe domain is allowed in the root page

However when the Meeting SDK loads in the iframe this errors appear in thse console

NotAllowedError, Failed to execute ‘request’ on ‘WakeLock’: Access to Screen Wake Lock features is disallowed by permissions policy

And neither the Camera nor the Audio can be activated and the below error appears

Audio is unavailable for use at this time. Please refresh the page. [Learn more] how to allow access to your microphone.

Enable camera access in your browser’s address bar.

**There is no option to enable the camera in the address bar**

Please help resolve  
Thank you

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 10, 2023, 7:32am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/2 "2023-08-10T07:32:35Z")

</div>

@luca.licata ,

Edited. I’ve managed to get it working with the code below. Camera, microphone, screen lock are ok.

I’m using this as my iframe

```auto
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Zoom Meeting SDK Sample JavaScript</title>
    <script src="coi-serviceworker.js"></script>
   
  </head>
  <body>
  
  
    <iframe src="https://msdk.purejs.asdc.cc/index-latest.html?meetingNumber=1111111111&passWord=123123&role=0" allow="camera; microphone; screen-wake-lock;" width="1024" height="768"></iframe>

  </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![luca.licata](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/luca.licata/32/50909_2.png) [@luca.licata](https://devforum.zoom.us/u/luca.licata)\
**Post date:** [August 10, 2023, 2:21pm UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/3 "2023-08-10T14:21:38Z")

</div>

Hi @chunsiong.zoom

Thank you very much for your response

We have already all those attributes in the iframe tag, but still blocking it

Please let me know if you have any other suggestions

Thank you  
Luca

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 11, 2023, 12:30am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/4 "2023-08-11T00:30:46Z")

</div>

@luca ,

Could you try loading my hosted sample application with your client?  
I’m assuming your client is a mobile browser.

[https://msdk.purejs.asdc.cc/iframe.html](https://msdk.purejs.asdc.cc/iframe.html)

---

<div class="post-metadata">

**Author:** ![itango8](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@itango8](https://devforum.zoom.us/u/itango8)\
**Post date:** [August 14, 2023, 9:39am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/5 "2023-08-14T09:39:58Z")

</div>

@chunsiong.zoom Could you explain how you constructed the `src` attribute for the iFrame?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 14, 2023, 11:04am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/6 "2023-08-14T11:04:09Z")

</div>

@itango8 ,

You need to host your own web SDK on a server, and then point the iframe to it using src

---

<div class="post-metadata">

**Author:** ![luca.licata](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/luca.licata/32/50909_2.png) [@luca.licata](https://devforum.zoom.us/u/luca.licata)\
**Post date:** [August 14, 2023, 11:28am UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/7 "2023-08-14T11:28:37Z")

</div>

It has the same effect, I am starting to think its something in the application so we will be doing some testing and will let you know the results, thank you very much for your help Chun!!

---

<div class="post-metadata">

**Author:** ![itango8](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@itango8](https://devforum.zoom.us/u/itango8)\
**Post date:** [August 14, 2023, 12:24pm UTC](https://devforum.zoom.us/t/unable-to-access-camera-or-audio-when-embedding-sdk-into-iframe/93093/8 "2023-08-14T12:24:05Z")

</div>

> [@luca.licata](#):
>
> Meeting SDK 2.14.0

@chunsiong.zoom Thank you for your answer. I created a new topic, related to my question, [Can I use an iFrame with the Meeting SDK app type for authorization?](https://devforum.zoom.us/t/can-i-use-an-iframe-with-the-meeting-sdk-app-type-for-authorization/93359). When you have a chance please check it.
