blackuy / react-native-twilio-video-webrtc

Twilio Video (WebRTC) for React Native
https://www.twilio.com/docs/video
MIT License
609 stars 403 forks source link

ERROR:TwilioVideo:[Core]:Unable to add video track with an ended source. #136

Open ngodonghong opened 6 years ago

ngodonghong commented 6 years ago

Steps to reproduce

1.Build Succeed on devices IPad

  1. When loading component <TwilioVideo ref="twilioVideo" onRoomDidConnect={this._onRoomDidConnect} onRoomDidDisconnect={this._onRoomDidDisconnect} onRoomDidFailToConnect={this._onRoomDidFailToConnect} onParticipantAddedVideoTrack={this._onParticipantAddedVideoTrack} onParticipantRemovedVideoTrack={this._onParticipantRemovedVideoTrack} /> 2.1 ERROR:TwilioVideo:[Core]:Unable to add video track with an ended source. 2.2 ERROR:TwilioVideo:[Platform]:Failed to create a local video track. The provided video constraints are invalid.

Expected behaviour

It shoud have this.refs.twilioVideo

Actual behaviour

It fail when I run on IOS devices (example: IPAD) this.refs.twilioVideo is empty. this.refs = {} It work when I run on IOS emulator or android devices this.refs = { twilioVideo }

Environment

react-native-twilio-video-webrtc

Version: "https://github.com/blackuy/react-native-twilio-video-webrtc"

slycoder commented 6 years ago

Does it run ok for non-ipad devices? Just trying to narrow down if it's specific to the library or to the device. Do you know what ipad version it is?

ngodonghong commented 6 years ago

Running on Android devices ok. I run on ipad2 ios 9.3. Let me try to run on Iphone 7

hangkimduyen commented 5 years ago

do you fix it? I have same issue with you, this.refs.twilioVideo is empty. this.refs = {}

slycoder commented 5 years ago

No matter what, this.refs.twilioVideo shouldn't be falsey; as long as the object is mounted the ref should be set. Are you sure there isn't a race condition?