react-native-twilio-video-webrtc
react-native-twilio-video-webrtc copied to clipboard
onParticipantAddedVideoTrack is never called on HuaweiOS
Steps to reproduce
- Get a Huawei mobile phone (I use P40 Lite) in my case
- Create a basic Twilio application using the TwilioVideo component.
- Generate all your tokens, etc on the Twilio UI and connect two phones (the second phone can be anything)
- You can hear each others, but you can't see the video feed. onParticipantAddedVideoTrack is never called on each phone
- If you try with two phones who are not Huawei, it works perfectly
Phones used
- iPhone X, iOS 14.6
- OnePlus 5T, OxygenOS 10.0.1 Android 10
- Huawei P40 Lite, HuaweiOS 10.1.0
Expected behaviour
I should be able to get the VideoTrack from the other phone using the callback event onParticipantAddedVideoTrack. It works if I use two androids phones, two iOS phones, one android and one iOS, but it doesn't work with Huawei OS.
Actual behaviour (only Huawei)
The call start, I get the AudioTrack, DataTrack but never the VideoTrack. We can hear each other but not see each other. onParticipantAddedVideoTrack is never called when the other participant connect. I get onRoomDidConnect on both phones, but they never send each others their VideoTrack.
Environment
- Node.js version : lts/fernium
- React Native version : 0.62.2:
- OS versions: iOS 14.6, HuaweiOS 10.1.0 (Android 10), Android 10
react-native-twilio-video-webrtc
Version: 2.0.0
Thanks in advance guys if you have clues or got the same error !
Hi guys,
Any update on this subject ? Thanks in advance
I'm also facing the same issue in android 1+ 7t android version 10, @guillaume-g after minimising and maximise the app it's calling onParticipantAddedVideoTrack and streaming is available to another side.
also, this issue is reproducible in the new Twilio SDK (Upgrade to Android 6), in the older Twilio SDK it's working fine for me.
I wonder if this is related to the camera capturer issue in #537 . Does the local video feed get published and/or are cameras found on each local device initially?
Sorry, I never got the notification about your reply @Raghav-Sao !
I still have the issue on Android 11, I have a grey screen and the onParticipantAddedVideoTrack is also never fired. I think I got what you said about minimising and maximise the app and suddenly, it's fired.
It's really weird.
Do you have more intel ? I will try to look at @slycoder answer and the re-rendering "thing".
Thanks in advance, keep you up to date.
PS: I confirm the issue is still in the latest SDK
@guillaume-g plz check PR https://github.com/blackuy/react-native-twilio-video-webrtc/pull/536 It's already merged and for me, it's resolved after this PR merged, plz check the same.
I am also having this same issue on a Pixel 6 Pro. While a Pixel 4 is fine. onParticipantAddedVideoTrack is never called when joining the room or anytime afterwards.
Using Android OS 12.
On a Samsung S10 it is working correctly and I am on version 2.1.0 of this library.
I'm connecting via the web on one end and on the device on the other.
It looks like the video sub is failing. I added a Log at: https://github.com/blackuy/react-native-twilio-video-webrtc/blob/master/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java#L1060
And here is the exception:
No supported codec. Codec video/H264/90000/1,fmtps:[(level-asymmetry-allowed, 1), (packetization-mode, 1), (profile-level-id, 42e01f)] is not supported. Supported codecs: [video/VP8/90000/1,fmtps:[]]
I believe it has to do with the preferredVideoCodecs, that I'm using from the web. Will get back if setting only the supported one resolves the issue.
CC: @slycoder
The issue is because on the web side, I had the video codec preference in the order ['H264', 'V8']
while on the Pixel device, H264 is not supported. Because of this, the subscription fails. The solution is to swap the order of this to ['V8', 'H264']
https://www.twilio.com/docs/video/managing-codecs