Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] When the JS thread reloads, the room is left hanging until either you trigger a manual disconnect or restart the app #559

Open
marqroldan opened this issue Oct 1, 2021 · 1 comment · May be fixed by #560

Comments

@marqroldan
Copy link
Contributor

marqroldan commented Oct 1, 2021

componentWillUnmount doesn't get called when you restart the JS thread

Steps to reproduce

  1. Join a room
  2. Either trigger a reload by pressing R inside the metro bundler, or by doing () => DevSettings.reload?.() from {DevSettings} from 'react-native'
  3. You'll notice the call is still 'active' in the background, if you join again you will only see black feeds (either from the remote and/or local view)

Expected behaviour

  • It would be nice if the room is destroyed if it's not null when the component is instantiated again (on iOS, the room is cleared)

Actual behaviour

  1. When participants are in the room for the first time

  1. When one participant have their JS thread reload and attempt to join again

Environment

  • Node.js version: 16.5.0
  • React Native version: 0.65.1, 0.63.4
  • React Native platform + platform version: Android 7.0 and Android API 30

react-native-twilio-video-webrtc

Version: master

I'll be opening a PR within a few minutes but I'm opening an issue here just so people are aware of the situation (?) sorry didn't thoroughly check the existing issues but i feel like those black feeds are related to this one

Edit:

Question/Concern:

  • There might be cases where we want the room to still be connected, but I'm not sure how to properly handle this
    • For example launching a native UI when you receive a call, and then continuing in the JS thread.
      • Maybe such functionality can be added in the future by exposing a boolean or something (not an Android developer hehe)
@devlove1C
Copy link

Hi team,
I tried the given solution, but still occurring the same issue.
I checked, updated code is not available in the master Branch,
I replaced the "CustomTwilioVideoView.java" file in my project, even tried with the piece of code which you added for the issue, But it's giving the same error.
Team when you will merge this code to the master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants