|
@@ -5,8 +5,6 @@ import 'package:flutter/foundation.dart';
|
|
|
import 'package:logging/logging.dart';
|
|
|
|
|
|
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
|
|
-bool disableMediaKit = false;
|
|
|
-
|
|
|
// https://gist.github.com/adamawolf/3048717
|
|
|
final Set<String> iOSLowEndMachineCodes = <String>{
|
|
|
"iPhone5,1", //iPhone 5 (GSM)
|
|
@@ -31,21 +29,6 @@ final Set<String> iOSLowEndMachineCodes = <String>{
|
|
|
"iPhone10,5", // iPhone 8
|
|
|
};
|
|
|
|
|
|
-Future<void> initDeviceSpec() async {
|
|
|
- if (Platform.isAndroid) {
|
|
|
- // Note: The current version of media_kit crashes while playing video when
|
|
|
-// hardware malloc is enabled. Users either need to disable the hardware
|
|
|
-// malloc for our app or we need to disable the media_kit for these devices.
|
|
|
-// Currently, we have disabled the media_kit for these devices. and in the
|
|
|
-// future if needed we can add a setting.
|
|
|
- final androidInfo = await deviceInfoPlugin.androidInfo;
|
|
|
- disableMediaKit = androidInfo.toString().contains('graphene') ||
|
|
|
- androidInfo.toString().contains('divest');
|
|
|
- } else {
|
|
|
- disableMediaKit = false;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
Future<bool> isLowSpecDevice() async {
|
|
|
try {
|
|
|
if (Platform.isIOS) {
|
|
@@ -67,7 +50,3 @@ Future<bool> isAndroidSDKVersionLowerThan(int inputSDK) async {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-bool isCompatibleWithMediaKit() {
|
|
|
- return disableMediaKit == false;
|
|
|
-}
|