react-native-twilio-video-webrtc
react-native-twilio-video-webrtc copied to clipboard
Cannot reenable video-track after disabling it
Steps to reproduce
- Follow the example app 1:1
- Add a function toggleVideo():
const toggleVideo = () => {
if(twilioVideo && twilioVideo.current){
twilioVideo.current.setLocalVideoEnabled(!isVideoEnabled).then(isEnabled => {
setIsVideoEnabled(isEnabled)
})
}
}
Expected behaviour
The video should stop/start
Actual behaviour
When I toggle off the video it stops for me and for the remote participant as well, but when I toggle it back ON, it goes on only for me, for the remote participant(web browser), the video-track is not being enabled.
Environment
- React Native version: 0.63.4
<TwilioVideoLocalView
enabled={isVideoEnabled}
style={styles.imgPatient}
/> it will work @gpavlov21
@mumer-saleem On Android it still doesn't work
@gpavlov21 did you find solution
@mumer-saleem no im still struggling to find a solution, almost 1 month later ....
I am facing same issue... any solution??
No, still no solution. After reviewing all the issues on github, i think this problem is around 2 years old .... @slycoder any idea ?
Hi all, sorry I haven't been able to actively work on it. If someone has a trace of events, that might help debug the issue. For example, what enable/disable publish/unpublish events is the remote participant seeing?
I'm getting this issue too and for me, remote participant is seeing 'disabled' event on the RemoteVideoTrack, and then 'started' with a new sid. Comparing this to when two browsers are performing the same actions which work, in that case the remote participant sees 'disabled' on the RemoteVideoTrack and then 'enabled' with the same sid.
I managed to fix it by removing this line https://github.com/blackuy/react-native-twilio-video-webrtc/blob/0231f730b049464c2b447acdce63341e61c6dcc9/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java#L720 I don't know what issues this may cause, but now my remote participant is seeing the expected events 'disabled' followed by 'enabled'.