Skip to content

Instantly share code, notes, and snippets.

@Meherdeep
Created July 28, 2020 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Meherdeep/007b79bc2f2b2070f98bb1bef17ea8e2 to your computer and use it in GitHub Desktop.
Save Meherdeep/007b79bc2f2b2070f98bb1bef17ea8e2 to your computer and use it in GitHub Desktop.
@override
void initState() {
super.initState();
// initialize agora sdk
initialize();
}
Future<void> initialize() async {
if (appID.isEmpty) {
setState(() {
_infoStrings.add(
'APP_ID missing, please provide your APP_ID in settings.dart',
);
_infoStrings.add('Agora Engine is not starting');
});
return;
}
await _initAgoraRtcEngine();
_addAgoraEventHandlers();
await AgoraRtcEngine.enableWebSdkInteroperability(true);
VideoEncoderConfiguration configuration = VideoEncoderConfiguration();
configuration.dimensions = Size(1920, 1080);
await AgoraRtcEngine.joinChannel(null, widget.channelName, null, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment