setScreen method
By passing videoProfile
and orientation
, the screen size and frame rate can be specified.
If Null is passed, the respective current value is retained.
videoProfile
とorientation
を渡すことによって、スクリーンサイズとフレームレートを指定することができます。
Nullが渡された場合、それぞれの現在の値が保持されます。
Implementation
Future<void> setScreen({
AgoraVideoProfile? videoProfile,
AgoraVideoOrientation? orientation,
}) async {
if (_engine == null) {
throw Exception(
"The engine is not initialized. [connect] the engine first.",
);
}
_videoProfile = videoProfile ?? _videoProfile;
_orientation = orientation ?? _orientation;
final videoConfig = VideoEncoderConfiguration(
orientationMode: _orientation.toVideoOutputOrientationMode(),
dimensions: videoDimensions,
frameRate: frameRate,
bitrate: bitRate,
);
await _engine?.setVideoEncoderConfiguration(videoConfig);
notifyListeners();
}