configResolutionAfterStart method

Future<void> configResolutionAfterStart({
  1. required TTVideoEngineResolutionType targetResolution,
  2. void completion(
    1. bool success,
    2. TTVideoEngineResolutionType completeResolution
    )?,
})

Set the initial playback clarity: Preset the clarity information before playing. If there is no corresponding clarity level, it will automatically downgrade and traverse the list of supported clarity to find a suitable level.

Implementation

Future<void> configResolutionAfterStart(
    {required TTVideoEngineResolutionType targetResolution,
    void Function(bool success, TTVideoEngineResolutionType completeResolution)? completion}) async {
  await engineInstanceMethodChannel.invokeMethod('configResolutionAfterStart', targetResolution.idx);
  if (completion != null) {
    resolutionConfigCompletion = completion;
  }
}