Merge pull request #315 from mdrazak2001/video-preview-hotfix

add video preview with updated logic
This commit is contained in:
Ankit Mahato
2024-03-28 21:16:21 +05:30
committed by GitHub
6 changed files with 228 additions and 7 deletions

View File

@ -21,7 +21,7 @@ final kIsLinux = !kIsWeb && Platform.isLinux;
final kIsApple = !kIsWeb && (Platform.isIOS || Platform.isMacOS);
final kIsDesktop =
!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux);
final kIsRunningTests = Platform.environment.containsKey('FLUTTER_TEST');
final kIsIOS = !kIsWeb && Platform.isIOS;
final kIsAndroid = !kIsWeb && Platform.isAndroid;
final kIsMobile = !kIsWeb && (Platform.isIOS || Platform.isAndroid);
@ -403,7 +403,7 @@ const Map<String, Map<String, List<ResponseBodyView>>>
kSubTypeDefaultViewOptions: kPreviewBodyViewOptions,
},
kTypeVideo: {
kSubTypeDefaultViewOptions: kNoBodyViewOptions,
kSubTypeDefaultViewOptions: kPreviewBodyViewOptions,
},
kTypeText: {
kSubTypeDefaultViewOptions: kRawBodyViewOptions,
@ -512,6 +512,9 @@ const kMimeTypeRaiseIssue =
const kUnexpectedRaiseIssue =
"\nIf the behaviour is unexpected, please raise an issue in API Dash GitHub repo so that we can resolve it.";
const kVideoError =
"There seems to be an issue playing this video. Please raise an issue in API Dash GitHub repo so that we can resolve it.";
const kImageError =
"There seems to be an issue rendering this image. Please raise an issue in API Dash GitHub repo so that we can resolve it.";