# E2EKey added in mediasoup-demo

**URL:** <https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433>\
**Category:** mediasoup libraries\
**Created:** [January 17, 2025, 5:36am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433 "2025-01-17T05:36:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vinay](https://mediasoup.discourse.group/u/vinay)\
**Post date:** [January 17, 2025, 5:36am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/1 "2025-01-17T05:36:45Z")

</div>

When I add `e2eKey` in my url of mediasoup-demo, audio, video, and screen sharing do not work for the other user. Additionally, the other user is not audible, and when I open my camera, it is not visible on the other user’s end, including screen sharing.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [January 17, 2025, 8:21am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/2 "2025-01-17T08:21:27Z")

</div>

Of course. You are encoding your streams using that key. Add the parameter in the url of all participants.

---

<div class="post-metadata">

**Author:** ![vinay](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vinay](https://mediasoup.discourse.group/u/vinay)\
**Post date:** [January 17, 2025, 9:18am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/3 "2025-01-17T09:18:13Z")

</div>

If I call MediaSoup via an iframe and pass the necessary parameters, will it work? Currently, I am adding the `e2eKey` and sending it to the iframe, but I am neither audible nor visible to others, even though my camera or screen share are enabled

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [January 17, 2025, 9:27am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/4 "2025-01-17T09:27:38Z")

</div>

Please tell me that you are not embedding the mediasoup demo app into an iframe on your website.

---

<div class="post-metadata">

**Author:** ![vinay](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vinay](https://mediasoup.discourse.group/u/vinay)\
**Post date:** [January 17, 2025, 9:44am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/5 "2025-01-17T09:44:44Z")

</div>

yes, i am using mediasoup in iframe

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [January 17, 2025, 10:24am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/6 "2025-01-17T10:24:56Z")

</div>

The `&e2eKey=xxxxx` param works in the mediasoup-demo when using OPUS and VP8 as codecs. Tested. Of course all participants need to use the same key. Whether it works on in iframe or not I don’t know but I see no reason for it not to work.

---

<div class="post-metadata">

**Author:** ![vinay](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vinay](https://mediasoup.discourse.group/u/vinay)\
**Post date:** [January 17, 2025, 10:36am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/7 "2025-01-17T10:36:02Z")

</div>

Thanks for confirming, my all participants have same key.  
issue is that when i send e2eKey from iframe then call is connect with all participants but users are not audible eachother and same issue with camera and screen sharing. Without e2eKey send everything is perfect.

---

<div class="post-metadata">

**Author:** ![vinay](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vinay](https://mediasoup.discourse.group/u/vinay)\
**Post date:** [February 5, 2025, 9:29am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/8 "2025-02-05T09:29:27Z")

</div>

I am trying to make a call from a desktop to a mobile device using an e2eKey, but I am seeing garbage values and a distorted screen when the camera is on. However, when making a call from mobile to mobile, it works fine.

---

<div class="post-metadata">

**Author:** ![vinkovsky](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/vinkovsky/32/3014_2.png) [@vinkovsky](https://mediasoup.discourse.group/u/vinkovsky)\
**Post date:** [January 27, 2026, 7:49pm UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/9 "2026-01-27T19:49:50Z")

</div>

Hello @ibc First of all, thanks for the great library! I noticed that the createSendTransport and createRecvTransport methods no longer provide encodedInsertableStreams field in additionalSettings. Is it ts declaration bug? My current client version is 3.18.3

 ![Screenshot 2026-01-28 at 2.44.27 AM](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/3/39af27431301309ddc462815ebdc729213497f5b.png)

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [January 27, 2026, 8:02pm UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/10 "2026-01-27T20:02:48Z")

</div>

Please avoid direct mentions. This forum is not only intended for us mediasoup authors to answer to others.

Regarding e2e encryption search for “e2e” and “e2eKey” in the `app/src/` folder of the mediasoup-demo project.

---

<div class="post-metadata">

**Author:** ![vinkovsky](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/vinkovsky/32/3014_2.png) [@vinkovsky](https://mediasoup.discourse.group/u/vinkovsky)\
**Post date:** [January 28, 2026, 9:22am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/11 "2026-01-28T09:22:15Z")

</div>

Thanks for the reply! My question is not about adding e2e encryption. I got a typescript error when trying to add [encodedInsertableStreams](https://github.com/versatica/mediasoup-demo/blob/v3/app/src/RoomClient.js#L2310). It missing from [createSendTransport](https://github.com/versatica/mediasoup-client/blob/e8674004c7ca837f9a6772347c4df5a1e7d72df0/src/Transport.ts#L36C31-L36C47).

 ![Screenshot 2026-01-28 at 4.20.25 PM](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/4/4e167bc61e5aaf2a89c4ee9a63258899eabe793c.png)

---

<div class="post-metadata">

**Author:** ![vinkovsky](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/vinkovsky/32/3014_2.png) [@vinkovsky](https://mediasoup.discourse.group/u/vinkovsky)\
**Post date:** [January 28, 2026, 9:32am UTC](https://mediasoup.discourse.group/t/e2ekey-added-in-mediasoup-demo/6433/12 "2026-01-28T09:32:59Z")

</div>

Sorry for the dumb questions, I found the answer: this is a non-standard/experimental feature. The DOM typings included with TypeScript don’t yet include encodedInsertableStreams, so the constructor type doesn’t recognize it. The solution is to declare it globally like this:

```javascript
declare global {
  interface RTCConfiguration {
    encodedInsertableStreams?: boolean;
  }
}

```
