expo / config-plugins

Out-of-tree Expo config plugins for packages that haven't adopted the config plugin system yet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest supported react-native-webrtc version for @config-plugins/react-native-webrtc

fobos531 opened this issue · comments

Summary

Hey there, the documentation for the react-native-webrtc config plugin states the latest compatible react-native-webrtc version for the 2.0.0 version of the config plugin. However, since the latest config plugin version is 2.1.1, can you state which is the latest supported version of react-native-webrtc? I tried with version 1.100.0, but I'm getting a TypeError: undefined is not an object (evaluating '_eventTargetShim.defineCustomEventTarget.apply') when running mediaDevices.enumerateDevices()

Thanks in advance!

Config Plugin

@config-plugins/react-native-webrtc

What platform(s) does this occur on?

iOS

SDK Version

44

Reproducible demo

  • initialize an expo project
  • install react-native-webrtc and the config plugin by following the provided instructions in this repo. Version 1.100.0 will be installed.
  • Add the following to your app:
 let isFront = true;
  mediaDevices.enumerateDevices().then((sourceInfos) => {
    console.log(sourceInfos);
    let videoSourceId;
    for (let i = 0; i < sourceInfos.length; i++) {
      const sourceInfo = sourceInfos[i];
      if (sourceInfo.kind == 'videoinput' && sourceInfo.facing == (isFront ? 'front' : 'environment')) {
        videoSourceId = sourceInfo.deviceId;
      }
    }
  });

I just updated @config-plugins/react-native-webrtc and it appears to work with the latest.