Closed yash1898-coder closed 1 year ago
Please help me solve this issue my token and appId details are right and the remote user channel connects successfully but shows a black screen, also video enable issue is not there because I added ClientRoleType.ClientRoleBroadcaster then the camera is shown but I was using ClientRoleType.ClientRoleAudience then shows a black screen.
Hello ! I am also facing the same issue when the clients joins the channel it’s shows up with the black screen and the version I am using is the same
"react": "18.2.0", "react-native": "0.71.8", "react-native-agora": "^4.2.0",
please help me to solve this issue.
is our example working?
is our example working?
I have tried example too the same issue occurs client or audience shows up with black screen
the same issue faced in the example. working fine in the host device but a black screen is shown in the remote user (audience) device.
we have finally solved this issue pacakage used : react-native --version 0.72.0 and react-native-agora --version 4.2.0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug import { ClientRoleType, createAgoraRtcEngine, IRtcEngine, RtcSurfaceView, ChannelProfileType, } from 'react-native-agora';
const LiveStreamingScreen = ({navigation,route}) => { const agoraEngineRef = useRef(IRtcEngine);
const [isJoined, setIsJoined] = useState(false); // Indicates if the local user has joined the channel const [audience, setAudience] = useState(false); const [remoteUid, setRemoteUid] = useState(0); // Uid of the remote user const [message, setMessage] = useState(''); // Message to the user const [isCoHost, setIsCoHost] = useState(false);
const setupVideoSDKEngine = async () => { try { // use the helper function to get permissions if (Platform.OS === 'android') { await getPermission(); } agoraEngineRef.current = createAgoraRtcEngine(); const agoraEngine = agoraEngineRef.current;
const join = async () => { if (isJoined) { return; } try { if (agoraEngineRef.current) { console.log("Get Response Data:::::",token, channelName, remoteUid,route.params?.isHost) agoraEngineRef.current.setChannelProfile( ChannelProfileType.ChannelProfileLiveBroadcasting ); if (route.params?.isHost) { agoraEngineRef.current.startPreview(); agoraEngineRef.current.joinChannel(token, channelName, 0, { clientRoleType: isCoHost? ClientRoleType.ClientRoleBroadcaster:ClientRoleType.ClientRoleAudience }); } else { setAudience(true) agoraEngineRef.current.joinChannel(token, channelName, remoteUid, { clientRoleType: ClientRoleType.ClientRoleAudience, }); } setIsJoined(true); } } catch (e) { console.log(e); } };
{isCoHost &&