oney / RCTWebRTCDemo

MIT License
215 stars 142 forks source link

RTCSetting was removed? #14

Closed mattwkelly closed 8 years ago

mattwkelly commented 8 years ago

Hi, this example seems to no longer work because RTCSeting was removed from the core project (see https://github.com/oney/react-native-webrtc/issues/84).

Guidance on using the new project via this demo would be helpful. Thanks

mattwkelly commented 8 years ago

(I'll also follow up once I figure it out)

mattwkelly commented 8 years ago

Pretty simple, I just replaced this: RTCSetting.setAudioOutput('speaker'); RTCSetting.setKeepScreenOn(true); RTCSetting.setProximityScreenOff(true);

With this (after running through the setup steps in the readme): InCallManager.start({media: 'audio'}); InCallManager.start({media: 'video'}); InCallManager.requestRecordPermission(); InCallManager.requestCameraPermission(); InCallManager.setSpeakerphoneOn();

Note: this is for iOS, I haven't tried Android yet.

mattwkelly commented 8 years ago

I am hitting one more issue-- switch cameras isn't working.

mattwkelly commented 8 years ago

I'd prefer using the latest version+incallmanager, but for some reason the logic behind 'switch camera' is fundamentally broken. Once I get some spare time to investigate, I'll follow up. I'd love help on this issue though!

I ended up reverting to 0.6.0 (and also making these changes to RCTView.js in the react-native-webrtc module so it works with the latest version of react+react native):

-var React = require('react-native'); -var { requireNativeComponent, PropTypes } = React;

+var ReactNative = require('react-native'); +var React = require('react'); +var { requireNativeComponent } = ReactNative; +var { PropTypes } = React

oney commented 8 years ago

Yes, please use InCallManager. Let's talk about switch cameras issue on https://github.com/oney/RCTWebRTCDemo/issues/13