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

Video attach/detach not worked properly at browser side on video on/off from mobile(android) app side respectively multiple time. #728

Open
hardikpatel6030 opened this issue Oct 2, 2023 · 1 comment

Comments

@hardikpatel6030
Copy link

Steps to reproduce

  1. Connect a video call from Mobile(Android) to Browser
  2. on/off video from mobile app side. Browser side got to know that, they have on/off video from app side(bind/unbind video at browser side on participant on/off accodingly)
  3. after a first time. do camera on/off again. so, Video Didn't bind at browser side.

[Note : Worked properly in Iphone and Google pixel phone, try in other andrid phone. Like samsung, oneplus, Realme, Vivo, Redmi...]

Expected behaviour

  • when remote participant on/off camera from Android Mobile phone then video of remote participant should be bind/unbind properly at browser side.

Actual behaviour

  • when remote participant on/off camera from Android Mobile phone then, video of remote participant bind /unbind not worked properly at browser side.

Environment

  • Node.js version: 14.18.2
  • React Native version: 0.64.4
  • React Native platform + platform version: Android

Reactjs Environment

  • ** React Js Version : "react": "^17.0.2"
  • ** Twilio Package version : "twilio-video": "^2.27.0"

react-native-twilio-video-webrtc

Version: 2.27.0

2023-10-02_12h03_42.1.mp4
@hardikpatel6030 hardikpatel6030 changed the title Video attach/detach not worked properly at browser side on video on/off from Mobile app side respectively. Video attach/detach not worked properly at browser side on video on/off from mobile(android) app side respectively multiple time. Oct 2, 2023
@JavyMB
Copy link

JavyMB commented Aug 28, 2024

I faced the same and my (Android) solution was to modify the project it self:
node_modules/react-native-twilio-video-webrtc/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java
Remove Line 720

https://github.com/blackuy/react-native-twilio-video-webrtc/blob/d3aed6f64efd476e50cc302dbb13de94fc5f9943/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java#L720C13-L720C30

from:

if (localVideoTrack != null) {
            localVideoTrack.enable(enabled);
            publishLocalVideo(enabled);

            WritableMap event = new WritableNativeMap();
            event.putBoolean("videoEnabled", enabled);
            pushEvent(CustomTwilioVideoView.this, ON_VIDEO_CHANGED, event);
        }

to

if (localVideoTrack != null) {
            localVideoTrack.enable(enabled);

            WritableMap event = new WritableNativeMap();
            event.putBoolean("videoEnabled", enabled);
            pushEvent(CustomTwilioVideoView.this, ON_VIDEO_CHANGED, event);
        }

Basically I just removed publishLocalVideo(enabled);

I hope this helps

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

No branches or pull requests

2 participants