question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TwilioVideoLocalView black on Android

See original GitHub issue

Steps to reproduce

import React, { Component } from "react";
import { PermissionsAndroid, Platform, StyleSheet, View } from "react-native";
import { TwilioVideo, TwilioVideoLocalView } from "react-native-twilio-video-webrtc";

export default class App extends Component {
 componentDidMount() {
    if (Platform.OS !== "android") {
      return;
    }

    PermissionsAndroid.requestMultiple([
      PermissionsAndroid.PERMISSIONS.CAMERA,
      PermissionsAndroid.PERMISSIONS.RECORD_AUDIO
    ]);
  }

  render() {
    return (
      <View style={styles.container}>
        <TwilioVideoLocalView enabled={true} style={styles.container} />
        <TwilioVideo ref={c => (this.twilioVideo = c)} />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1
  }
});

Expected behaviour

Should show a live view of the camera

Actual behaviour

Shows a black screen while on iOS it shows the camera. No errors or anything else.

Environment

  • Node.js version: v8.11.2
  • React Native version: 0.55.4
  • Android Gradle Settings:
compileSdkVersion 26
buildToolsVersion "26.0.2"
minSdkVersion 16
targetSdkVersion 26

compile "com.android.support:appcompat-v7:26.1.0"

react-native-twilio-video-webrtc

Version: “master”

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
avhmcommented, Mar 14, 2019

Having this exact issue,

On Android, the TwilioVideoLocalView only shows the local camera feed once connected (in our use-case the call won’t always connect immediately) leaving the android user staring at a black screen, where on iOS it shows the camera feed.

What did you do to fix this @emin93 ?

[Edit] - after a call has been connected once, creating another call shows the camera view correctly until the app is restarted

0reactions
vaishnavtncommented, Mar 25, 2021

Any update on this issue?.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-twilio-video-webrtc-withandroid - npm
Twilio Video WebRTC for React Native with Android support. ... TwilioVideoLocalView / is responsible local camera feed view ...
Read more >
Other's side video is not showing in Twilio Video calling in ...
... in Twilio Video calling in react-native. Calling between Web and android ... The participant view is showing black after connection.
Read more >
blackuy - Bountysource
The browser participants video should stream on the android device ... TwilioVideoParticipant display a black screen instead of participant's video. $ 0.
Read more >
How to Add Video Calling to a React Native App
Twilio Account; Minimum of two iOS or Android devices for testing. ... Dimensions, } from 'react-native'; import { TwilioVideoLocalView, ...
Read more >
Video Calls in React Native backed by Twilio - VAIRIX
Twilio provides both JavaScript and IOS/Android SDKs. But when talking about React Native, there is no direct support from Twilio.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found