# Standard media contraint for exact deviceId not working

**URL:** <https://react-native-webrtc.discourse.group/t/standard-media-contraint-for-exact-deviceid-not-working/271>\
**Category:** Help\
**Created:** [September 20, 2019, 1:50pm UTC](https://react-native-webrtc.discourse.group/t/standard-media-contraint-for-exact-deviceid-not-working/271 "2019-09-20T13:50:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BabaDEE](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@BabaDEE](https://react-native-webrtc.discourse.group/u/BabaDEE)\
**Post date:** [September 20, 2019, 1:50pm UTC](https://react-native-webrtc.discourse.group/t/standard-media-contraint-for-exact-deviceid-not-working/271/1 "2019-09-20T13:50:30Z")

</div>

I am trying to create a simple Livestream implementation. Everything works fine on the Web (Chrome Browser) but there is no way to choose the media device on react native. I have tried different variants of the contraint implemetations but none worked. I am testing on Android (6.0 Marshmallow real device debug mode) and react-native-webrtc 1.75.0. My react-native version is 0.60.5 and react version is 16.8.6

```
import {mediaDevices} from 'react-native-webrtc';

// mediaDevices.enumerateDevices returns one audio deviceId 'audio-1'
// and two video deviceIds '0' and '1'

mediaDevices.getUserMedia({
   // Tried 'audio-1' but crashed the app so I removed it
    audio: true,
   // Tried both '0' and '1' but returns only the front camera no matter what
    video: {deviceId: {exact: '1'}},
}).then((stream) => {
   // Always returns the front camera for both '0' and '1'. 
    console.log(stream);
}).catch((reason) => {
    // There is no error
    console.log(reason);
});

```

Is it impossible to choose camera and microphone with react-native-webrtc?
