# switchCamera function never return on android web

**URL:** <https://devforum.zoom.us/t/switchcamera-function-never-return-on-android-web/86805>\
**Category:** Web\
**Created:** [April 17, 2023, 11:25am UTC](https://devforum.zoom.us/t/switchcamera-function-never-return-on-android-web/86805 "2023-04-17T11:25:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanh.huynh](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@thanh.huynh](https://devforum.zoom.us/u/thanh.huynh)\
**Post date:** [April 17, 2023, 11:25am UTC](https://devforum.zoom.us/t/switchcamera-function-never-return-on-android-web/86805/1 "2023-04-17T11:25:51Z")

</div>

Hello,

I’m calling the switchCamera but it never return after the camera was changed

Here is my code:

```auto
console.log("switchCamera Environment...");
await stream.switchCamera(MobileVideoFacingMode.Environment);
console.log("switchCamera Environment OK");

```

Steps:

- Join a video session
- Click a button to turn on camera
- Click a button to switch the camera
- After the camera was switched to back camera. The switchCamera didn’t return. No “OK” message in console

I can remove the await keyword but it is not a good practice right?

Video web sdk: 1.7.0  
Device: Redmi 5A, Android 8.1, Chrome 112  
User agent: Mozilla/5.0 (Linux; Android 8.1.0; Redmi 5A Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/112.0.5615.48 Mobile Safari/537.36

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 18, 2023, 1:55am UTC](https://devforum.zoom.us/t/switchcamera-function-never-return-on-android-web/86805/2 "2023-04-18T01:55:43Z")

</div>

Hey @thanh.huynh

Thanks for your feedback.

It’s a bug introduced in version 1.7.0. It will be fixed in the upcoming version.

The workaround for this issue is as you mentioned above, **remove the await keyword** , but it’s indeed not a good practice.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 18, 2023, 11:56am UTC](https://devforum.zoom.us/t/switchcamera-function-never-return-on-android-web/86805/3 "2023-05-18T11:56:22Z")

</div>

Closed on May 18, 2023, 11:56am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
