blackuy / react-native-twilio-video-webrtc

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

Participant Video does not resume back on website, when user comes to foreground from background on android device #514

Open vaishnavtn opened 3 years ago

vaishnavtn commented 3 years ago

Steps to reproduce

  1. Start Video conference from Android with Website
  2. Go in background on android and come back to foreground
  3. Video of android participant is not resuming back at website.

Note: Same scenario works fine, while video conference is in between android to android/android to iPhone/iPhone to iPhone/iPhone to Website. Issue is only if VC is in between android and website.

Expected behaviour

Android participant video should resume back on website, when android user comes back to foreground from background.

Actual behaviour

Android participant video does not resume back on website, when android user comes back to foreground from background.

Environment

react-native-twilio-video-webrtc

Version: "master"

slycoder commented 3 years ago

Does the website give any diagnostics? I.e. in the erroneous case does it not see the track published / enabled?

vaishnavtn commented 3 years ago

No, not triggering any event at all.

slycoder commented 3 years ago

Do you know if there are any differences in the room settings (e.g. peer-to-peer vs group, preferred codec, etc.)? Can you tell if the android side thinks it's successfully republished the track in onHostResume?

vaishnavtn commented 3 years ago

We are using room type - 'group'. Will confirm on onHostResume soon.

Balasnest commented 3 years ago

@vaishnavtn is it resolved?

CaptainJeff commented 3 years ago

@vaishnavtn you can pass maintainVideoTrackInBackground if its okay to not release the vdieo track when you go to the background. I was having the same issue before that. Just pass the value when you connect

twilioRef.current?.connect({
      roomName: room,
      accessToken: token,
      maintainVideoTrackInBackground: true,
      enableVideo: false,
      enableAudio: true
    })