setQuality method

void setQuality(
  1. String quality
)

Implementation

void setQuality(String quality) async {
  final video = videosList.firstWhereOrNull((e) => e.quality == quality);
  if (video == null) {
    throw Exception("No video found for format");
  }
  _channel.setQuality(quality);
  _currentPlayingSink.add(video);
  getCurrentPlaying = video;
}