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);