# Switch camera causes the loss of the user's personal streaming video and sees the player

**URL:** <https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [March 10, 2020, 8:38am UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218 "2020-03-10T08:38:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![giolez](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@giolez](https://openvidu.discourse.group/u/giolez)\
**Post date:** [March 10, 2020, 8:38am UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218/1 "2020-03-10T08:38:22Z")

</div>

Hello to all,  
I’m trying to add the functionality of the Switch camera. But as soon as the user clicks on the button to make the switch he loses his streaming video and sees the player icons. has anyone already faced this problem?

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [March 12, 2020, 11:50am UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218/2 "2020-03-12T11:50:08Z")

</div>

Hello @giolez

What tutorial are you following?

Have you checked if [openvidu-call-ionic](https://openvidu.io/docs/demos/openvidu-call-ionic/) is working for you?

Regarsds

---

<div class="post-metadata">

**Author:** ![giolez](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@giolez](https://openvidu.discourse.group/u/giolez)\
**Post date:** [March 12, 2020, 1:27pm UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218/3 "2020-03-12T13:27:20Z")

</div>

hi, i have follow this tutorial: [https://openvidu.io/docs/advanced-features/switch-camera/](https://openvidu.io/docs/advanced-features/switch-camera/)  
the [openvidu-call-ionic](https://openvidu.io/docs/demos/openvidu-call-ionic/) tutoria works fine, i have tested it. but in my project doesn’t work

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [March 12, 2020, 3:56pm UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218/4 "2020-03-12T15:56:13Z")

</div>

It looks like something is wrong in your code. Please, have a look how [openvidu-call-ionic](https://github.com/OpenVidu/openvidu-call-ionic/blob/d400f815393cdf5d3f9a901014d829cc5d745ded/src/app/video-room/video-room.page.ts#L252-L281) do it.

---

<div class="post-metadata">

**Author:** ![giolez](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@giolez](https://openvidu.discourse.group/u/giolez)\
**Post date:** [March 17, 2020, 7:25pm UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218/5 "2020-03-17T19:25:46Z")

</div>

Hi, i have followed thi tutorial. now all work well. But when toggle the camera from front to back, the flashlight button of the android operating system is disabled. is it a known problem?

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [March 18, 2020, 3:32pm UTC](https://openvidu.discourse.group/t/switch-camera-causes-the-loss-of-the-users-personal-streaming-video-and-sees-the-player/218/6 "2020-03-18T15:32:20Z")

</div>

Hi,

That is really weird and i have never heard that… I’ll try to research it.

By the way, you also can switch your devices without renegociating the webrtc media (that way is using in openvidu-call-ionic and it will be changed). Simply replacing the media stream track.

Regards
