Agora Live Streaming 5.3.1

Custom Code

So i have this use case where there is a streamer and viewer more like facebook live where people will just watch the streamer no interaction i use agora 5.3.0 and successfully able to do a video call but these are the problems that i face

1 - on mobile downloaded the apk it ask me for camera and microphone permision for the streamer side and then its just white screen not even showing my local camera

2- on view sometimes it has the remote video sometime nothing

3- on the web same as the view sometimes its there and need to refresh alot

What have you tried so far?

i tried to update it to 5.3.1 and add some changes to the code

this is the streamer code
if (!kIsWeb) {

await [Permission.microphone, Permission.camera].request();

}

// Create the Agora engine using the App ID provided by Agora.io

_engine = await RtcEngine.create(widget.appId);

// Enable the video module

VideoEncoderConfiguration configuration = VideoEncoderConfiguration();

configuration.orientationMode = VideoOutputOrientationMode.Adaptative;

configuration.frameRate = VideoFrameRate.Fps30;

await _engine!.setVideoEncoderConfiguration(configuration);

await _engine!.setChannelProfile(ChannelProfile.LiveBroadcasting);

await _engine!.setClientRole(ClientRole.Broadcaster);

await _engine!.enableAudio();

await _engine!.enableVideo();

// Define the event handler to handle events such as user joining, user offline, etc.

_engine!.setEventHandler(RtcEngineEventHandler(

error: (code) {

final info = 'LOG::onError: $code';

debugPrint(info);

},

joinChannelSuccess: (String channel, int uid, int elapsed) {

print("Local user $uid joined channel: $channel");

setState(() {

_localUserJoined = true;

});

},

));

// await _engine!.setClientRole(ClientRole.Broadcaster);

// Join the channel with a token, channel name, and optional additional information (empty string here)

await _engine!.joinChannel(widget.token, widget.channelName, null, 0);

Did you check FlutterFlow's Documentation for this topic?
Yes
1
2 replies