merge a
This commit is contained in:
parent
c15be05246
commit
41cc0560d0
15 changed files with 87 additions and 64 deletions
|
|
@ -38,7 +38,7 @@ class ImageViewerController extends State<ImageViewer> {
|
|||
(event) => {
|
||||
MessageTypes.Image,
|
||||
MessageTypes.Sticker,
|
||||
if (PlatformInfos.supportsVideoPlayer) MessageTypes.Video,
|
||||
MessageTypes.Video,
|
||||
}.contains(event.messageType),
|
||||
)
|
||||
.toList()
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import 'package:path_provider/path_provider.dart';
|
|||
import 'package:video_player/video_player.dart';
|
||||
|
||||
import 'package:fluffychat/utils/localized_exception_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/event_extension.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/widgets/blur_hash.dart';
|
||||
import '../../../utils/error_reporter.dart';
|
||||
import '../../widgets/mxc_image.dart';
|
||||
|
|
@ -30,16 +28,7 @@ class EventVideoPlayerState extends State<EventVideoPlayer> {
|
|||
|
||||
double? _downloadProgress;
|
||||
|
||||
// The video_player package only doesn't support Windows and Linux.
|
||||
final _supportsVideoPlayer =
|
||||
!PlatformInfos.isWindows && !PlatformInfos.isLinux;
|
||||
|
||||
Future<void> _downloadAction() async {
|
||||
if (!_supportsVideoPlayer) {
|
||||
widget.event.saveFile(context);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
final fileSize = widget.event.content
|
||||
.tryGetMap<String, Object?>('info')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue