From cfcbf944ffaccffcec3a90e5a9080ab16471fdc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Hirsch?= Date: Wed, 2 Apr 2025 21:04:01 +0200 Subject: [PATCH] feat: support inline video playback on macOS It turns out that video_player supports macOS, so we can simply enable it. --- lib/pages/chat/events/video_player.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pages/chat/events/video_player.dart b/lib/pages/chat/events/video_player.dart index 59bb06694..dd7917b34 100644 --- a/lib/pages/chat/events/video_player.dart +++ b/lib/pages/chat/events/video_player.dart @@ -41,8 +41,12 @@ class EventVideoPlayerState extends State { VideoPlayerController? _videoPlayerController; bool _isDownloading = false; + // The video_player package only doesn't support Windows and Linux. + final _supportsVideoPlayer = + !PlatformInfos.isWindows && !PlatformInfos.isLinux; + void _downloadAction() async { - if (PlatformInfos.isDesktop) { + if (!_supportsVideoPlayer) { widget.event.saveFile(context); return; }