changeQuality method
Implementation
Future<void> changeQuality(QualityModel itemQualitySelected) async {
_currentHeight = itemQualitySelected.height;
_currentWidth = itemQualitySelected.width;
_currentUrlQuality = itemQualitySelected.urlQuality;
try {
final HashMap<String, dynamic> itemQualitySelectedHashMap = HashMap();
itemQualitySelectedHashMap[Constant.KEY_WIDTH] =
itemQualitySelected.width;
itemQualitySelectedHashMap[Constant.KEY_HEIGHT] =
itemQualitySelected.height;
itemQualitySelectedHashMap[Constant.KEY_BITRATE] =
itemQualitySelected.bitrate;
itemQualitySelectedHashMap[Constant.KEY_URL_QUALITY] =
itemQualitySelected.urlQuality;
await methodChannel.invokeMethod(
Constant.METHOD_CHANGE_QUALITY, itemQualitySelectedHashMap);
} on PlatformException catch (_) {}
}