Created
July 28, 2020 21:20
-
-
Save Meherdeep/007b79bc2f2b2070f98bb1bef17ea8e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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