# Screen sharing error

**URL:** <https://openvidu.discourse.group/t/screen-sharing-error/4197>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [September 15, 2022, 4:07pm UTC](https://openvidu.discourse.group/t/screen-sharing-error/4197 "2022-09-15T16:07:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CraosCZ](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@CraosCZ](https://openvidu.discourse.group/u/CraosCZ)\
**Post date:** [September 15, 2022, 4:07pm UTC](https://openvidu.discourse.group/t/screen-sharing-error/4197/1 "2022-09-15T16:07:51Z")

</div>

I need to enable user screen sharing for my project. I used this example from the documentation - [Screen sharing documentation](https://docs.openvidu.io/en/stable/advanced-features/screen-share/#chrome-opera-firefox-safari-edge). It works great on my Mac with Google Chrome. Unfortunately, Firefox gives me this JS error:

> getDisplayMedia requires transient activation from a user gesture.

instead of asking for permission as Chrome does. Any idea, what can be wrong?

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [September 16, 2022, 4:16pm UTC](https://openvidu.discourse.group/t/screen-sharing-error/4197/2 "2022-09-16T16:16:19Z")

</div>

Try this: [openvidu-insecure-js-screen-share - OpenVidu Docs](https://docs.openvidu.io/en/2.22.0/tutorials/openvidu-insecure-js-screen-share/)

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [September 19, 2022, 9:01am UTC](https://openvidu.discourse.group/t/screen-sharing-error/4197/3 "2022-09-19T09:01:10Z")

</div>

When some browser complains about “_something requiring a user gesture_” it means that the API you are trying to use is considered critical and for that reason it requires a user gesture to be the trigger of the action. For example, the click of a button. It seems that Firefox in this case is requiring that, but your application is requesting access to the screen sharing API (the initialization of the OpenVidu Publisher’s object) without a user gesture.  
If you encapsulate the Publisher’s initialization after a user gesture, you’ll see the problem go away.
