react-native-twilio-video-webrtc
react-native-twilio-video-webrtc copied to clipboard
Switching Participant to Local and vice versa not working
Switching Participant View to Local and at the same time Switching the thumbnail respectively doesn't work in android, IOS it works fine, need help with this, is there any thing additional I have to do in Android?
the local and participant views are changing fine but when Local Video View is switch to primary then it overlaps the participant thumbnail, need help to change the default zindex or the default overlap of Local Video
Hi, just wanted to get some clarification. Are you saying that the views do not respect the zIndex style property?
Yes Exactly, when I make LocalVideo as primary it overlaps the Peer's Video thumbnail, and I changed the applyZorder to false in "twilioVideoPreview" file of android and it worked fine then, need to make applyZorder dynamic for android.
Oh yeah, that makes sense! I'm a bit busy at the moment; it sounds like you know where the issue is so if you wanna send a PR I'd be happy to merge.
Sure, I'll make a PR.
@codemeall Hey, did you already create the PR?
I have the same issue. Does anyone have any solutions?
@RonicleyNuvidio More of a workaround, but this seems to work:
change your node_modules/react-native-twilio-video-webrtc/android/src/main/java/com/twiliorn/library/TwilioVideoPreview.java
to:
package com.twiliorn.library;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.uimanager.ThemedReactContext;
public class TwilioVideoPreview extends RNVideoViewGroup {
private static final String TAG = "TwilioVideoPreview";
public TwilioVideoPreview(ThemedReactContext themedReactContext) {
super(themedReactContext);
CustomTwilioVideoView.registerThumbnailVideoView(this.getSurfaceViewRenderer());
this.getSurfaceViewRenderer()
.applyZOrder(false); // <==== THIS IS IMPORTANT!!
}
}
And build again
@DanielMenke Just changing to false works on both ios and android?
@RonicleyNuvidio No it just fixes the Android build. Had no problems with iOS, luckily.
Tks @DanielMenke
@DanielMenke Do you know if someone makes a pull request to fix this problem?
@RonicleyNuvidio I don't think that this is a proper solution. Its more of a workaround. @slycoder what do you say?
Hey all, please give #375 a try and see if that fixes the issue for you. That PR adds a new prop to configure the z indexes on android.