# safari: need to authorize access to play streams ?

**URL:** <https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561>\
**Category:** mediasoup-demo\
**Created:** [February 6, 2020, 4:23pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561 "2020-02-06T16:23:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![yarekc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yarekc/32/55_2.png) [@yarekc](https://mediasoup.discourse.group/u/yarekc)\
**Post date:** [February 6, 2020, 4:23pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/1 "2020-02-06T16:23:21Z")

</div>

Hi,  
**Is it possible on Safari to join a meeting as viewer without publishing ?**  
Because when I do enter the room and I do not authorize webcam access, the whole conference rooms is disabled.  
I would like to be able to join the conference but not to publish : only to view.

Regards

---

<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:** [February 6, 2020, 5:19pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/2 "2020-02-06T17:19:00Z")

</div>

It works.

- In Chrome: [https://v3demo.mediasoup.org/?roomId=foo](https://v3demo.mediasoup.org/?roomId=foo)
- In Safari: [https://v3demo.mediasoup.org/?roomId=foo&produce=false](https://v3demo.mediasoup.org/?roomId=foo&produce=false)

You get video from Chrome in Safari.

---

<div class="post-metadata">

**Author:** ![yarekc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yarekc/32/55_2.png) [@yarekc](https://mediasoup.discourse.group/u/yarekc)\
**Post date:** [February 6, 2020, 8:48pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/3 "2020-02-06T20:48:54Z")

</div>

No: it does not work. I tested your safari link in… safari !

If you open your safari link in safari, You MUST accept the access to micro and webcam.  
Otherwise you will never join the meeting.  
So the problem is in Safari is: you MUST accept the access to webcam even if you only want to view webcam without publishing.

Please make a try with Safari. When you lunch the demo on Safari  
[https://v3demo.mediasoup.org/?roomId=foo&produce=false](https://v3demo.mediasoup.org/?roomId=foo&produce=false)  
You immediately got the request for webcam access. If you deny, you are not connected to room and enable to chat or watch or listen.

---

<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:** [February 6, 2020, 9:05pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/4 "2020-02-06T21:05:53Z")

</div>

That’s how the demo works. We force the user to grant mic access. Otherwise, depending on the browser, the app won’t play remote audio or video tracks.

This is browser auto-play policy stuff. There is lot of documentation about that out there.

---

<div class="post-metadata">

**Author:** ![yarekc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yarekc/32/55_2.png) [@yarekc](https://mediasoup.discourse.group/u/yarekc)\
**Post date:** [February 6, 2020, 9:15pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/5 "2020-02-06T21:15:59Z")

</div>

**It works normally on chrome and firefox and does not work correctly on Safari.**

When you lunch the demo on Chrome or Firefox, you do not need to access your webcam to watch streams.  
Just imagine you need to grant webcam access to watch youtube videos.

I think you miss understood my point : this is not auto-play video policy : even if you do not produce (or publish), Safari requests micro access (but not webcam).  
But if you produce (publish), Safari requests both webcam and micro.  
So it looks like there is a small bug on micro request EVEN if nothing is published.

---

<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:** [February 6, 2020, 10:11pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/6 "2020-02-06T22:11:38Z")

</div>

Yes, this is about auto-play policy. If you don’t ask for mic permission (getUserMedia) then the browser may or may not play remote audios and videos. That’s all about autoplay policy.

---

<div class="post-metadata">

**Author:** ![yarekc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yarekc/32/55_2.png) [@yarekc](https://mediasoup.discourse.group/u/yarekc)\
**Post date:** [February 6, 2020, 10:23pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/7 "2020-02-06T22:23:38Z")

</div>

I think it is an “easy, please do not disturb me” answer and I bet you don’t have Safari to test.

For instance other mediasoup alternatives (kurento/janus) do not request mic access to watch …video.

I could also made it run correctly run in mediasoup v2 after many efforts. Not even sure how.

For me this is just common sense: requesting micro to watch a cam.  
I may be wrong but “auto-play” policy is : you need to click the video to start playing it, not to grant micro access !

---

<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:** [February 6, 2020, 10:47pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/8 "2020-02-06T22:47:22Z")

</div>

> [@yarekc](#):
>
> I think it is an “easy, please do not disturb me” answer and I bet you don’t have Safari to test.

I’ve tested in Safari.

> [@yarekc](#):
>
> For instance other mediasoup alternatives (kurento/janus) do not request mic access to watch …video.

mediasoup does NOT require mic access to watch videos. It’s just the mediasoup-demo. You don’t need that in your own mediasoup based application. So let’s please stop assuming this is a “bug” or a “bad design” in mediasoup.

> [@yarekc](#):
>
> I may be wrong but “auto-play” policy is : you need to click the video to start playing it, not to grant micro access !

Both work. If you don’t want to be wrong then just look for the Safari auto-play policy news.

---

<div class="post-metadata">

**Author:** ![yarekc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yarekc/32/55_2.png) [@yarekc](https://mediasoup.discourse.group/u/yarekc)\
**Post date:** [February 6, 2020, 10:51pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/9 "2020-02-06T22:51:33Z")

</div>

Ok thanks for your reply and your time.

Is there an “easy” way to remove that request from your demo ?  
Any clue / tip / advice is welcome.  
I still believe your demo will be better without requesting mic access on Safari.

---

<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:** [February 6, 2020, 11:05pm UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/10 "2020-02-06T23:05:12Z")

</div>

If I remove the mic request then the user should click in remote videos to play them. It’s feasible, I’ll just don’t do that. This is just a demo, and not a product or final application.

---

<div class="post-metadata">

**Author:** ![yarekc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yarekc/32/55_2.png) [@yarekc](https://mediasoup.discourse.group/u/yarekc)\
**Post date:** [February 7, 2020, 12:07am UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/11 "2020-02-07T00:07:05Z")

</div>

ok: sounds logical.  
Thanks for your patience.  
Any idea where to find that micro access in your demo files ?

---

<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:** [February 7, 2020, 12:13am UTC](https://mediasoup.discourse.group/t/safari-need-to-authorize-access-to-play-streams/561/12 "2020-02-07T00:13:33Z")

</div>

In `app/lib/RoomClient.js` line 2062.
