diff --git a/lib/app/changelog.dart b/lib/app/changelog.dart index b215bb1..7f2a7ab 100644 --- a/lib/app/changelog.dart +++ b/lib/app/changelog.dart @@ -1,4 +1,12 @@ const prismaChangelog = [ + PrismaChange( + version: '3.6.5', + title: 'Исправление наложения превью на видеоплеер', + bullets: [ + 'Устранение наложения превью-картинки на воспроизводимое видео: убран фоновый слой постера под видеоплеером и восстановлен классический черный бэкграунд для правильного отображения границ и леттербоксинга видео любого формата.', + 'Чистый рендеринг видео в карточках ленты: предпросмотр видео в ленте также изолирован от просвечивания подложки.', + ], + ), PrismaChange( version: '3.6.4', title: 'Полное исправление воспроизведения видео на ПК (устранение синего экрана)', diff --git a/lib/features/post/presentation/widgets/post_media_viewer.dart b/lib/features/post/presentation/widgets/post_media_viewer.dart index 2fc99cc..afe3701 100644 --- a/lib/features/post/presentation/widgets/post_media_viewer.dart +++ b/lib/features/post/presentation/widgets/post_media_viewer.dart @@ -230,9 +230,6 @@ class _PostMediaViewerState extends State aspectRatio: widget.post.width > 0 && widget.post.height > 0 ? widget.post.width / widget.post.height : 16 / 9, - previewUrl: widget.post.previewUrl.isNotEmpty - ? widget.post.previewUrl - : widget.post.sampleUrl, isSoftwareDecoding: _useSoftwareDecoding, onToggleDecoder: _toggleDecoderMode, controlsVisible: _controlsVisible, @@ -720,9 +717,6 @@ class _PostMediaViewerState extends State halfVolume: _halfVolume, coverVideo: _coverVideo, initialVolume: _currentVolume, - previewUrl: widget.post.previewUrl.isNotEmpty - ? widget.post.previewUrl - : widget.post.sampleUrl, isSoftwareDecoding: _useSoftwareDecoding, onToggleDecoder: _toggleDecoderMode, errorMessage: _videoError, @@ -921,7 +915,6 @@ class _FullscreenVideoPage extends StatefulWidget { required this.halfVolume, required this.coverVideo, this.initialVolume = 100.0, - this.previewUrl, required this.isSoftwareDecoding, required this.onToggleDecoder, required this.errorMessage, @@ -938,7 +931,6 @@ class _FullscreenVideoPage extends StatefulWidget { final bool halfVolume; final bool coverVideo; final double initialVolume; - final String? previewUrl; final bool isSoftwareDecoding; final VoidCallback onToggleDecoder; final String? errorMessage; @@ -1065,7 +1057,6 @@ class _FullscreenVideoPageState extends State<_FullscreenVideoPage> { player: widget.player, controller: widget.controller, aspectRatio: widget.aspectRatio, - previewUrl: widget.previewUrl, isSoftwareDecoding: widget.isSoftwareDecoding, onToggleDecoder: widget.onToggleDecoder, controlsVisible: _controlsVisible, @@ -1619,7 +1610,6 @@ class _VideoSurface extends StatefulWidget { required this.player, required this.controller, required this.aspectRatio, - this.previewUrl, required this.isSoftwareDecoding, required this.onToggleDecoder, required this.controlsVisible, @@ -1646,7 +1636,6 @@ class _VideoSurface extends StatefulWidget { final Player player; final VideoController controller; final double aspectRatio; - final String? previewUrl; final bool isSoftwareDecoding; final VoidCallback onToggleDecoder; final bool controlsVisible; @@ -1807,22 +1796,15 @@ class _VideoSurfaceState extends State<_VideoSurface> { return Stack( fit: StackFit.expand, children: [ - if (widget.previewUrl != null && widget.previewUrl!.isNotEmpty) - Positioned.fill( - child: CachedNetworkImage( - imageUrl: widget.previewUrl!, - fit: widget.coverVideo ? BoxFit.cover : BoxFit.contain, - memCacheWidth: 1920, - memCacheHeight: 1080, - ), + ColoredBox( + color: Colors.black, + child: Video( + controller: widget.controller, + fit: widget.coverVideo ? BoxFit.cover : BoxFit.contain, + controls: null, + pauseUponEnteringBackgroundMode: false, + resumeUponEnteringForegroundMode: false, ), - Video( - controller: widget.controller, - fit: widget.coverVideo ? BoxFit.cover : BoxFit.contain, - fill: Colors.transparent, - controls: null, - pauseUponEnteringBackgroundMode: false, - resumeUponEnteringForegroundMode: false, ), if (_currentBrightness < 0.99) Positioned.fill( diff --git a/lib/shared/widgets/app_shell.dart b/lib/shared/widgets/app_shell.dart index a7353ac..f7f6481 100644 --- a/lib/shared/widgets/app_shell.dart +++ b/lib/shared/widgets/app_shell.dart @@ -580,7 +580,7 @@ class _DesktopShellState extends State<_DesktopShell> ), ), child: Text( - 'v3.6.4', + 'v3.6.5', style: TextStyle( fontSize: 10, fontWeight: diff --git a/lib/shared/widgets/post_card.dart b/lib/shared/widgets/post_card.dart index bb277ef..3038ed3 100644 --- a/lib/shared/widgets/post_card.dart +++ b/lib/shared/widgets/post_card.dart @@ -642,13 +642,15 @@ class _FeedVideoPreviewState extends State<_FeedVideoPreview> { AnimatedOpacity( opacity: _ready ? 1 : 0, duration: AppMotion.duration(context, 180), - child: Video( - controller: _controller, - fit: BoxFit.cover, - fill: Colors.transparent, - controls: null, - pauseUponEnteringBackgroundMode: false, - resumeUponEnteringForegroundMode: false, + child: ColoredBox( + color: Colors.black, + child: Video( + controller: _controller, + fit: BoxFit.cover, + controls: null, + pauseUponEnteringBackgroundMode: false, + resumeUponEnteringForegroundMode: false, + ), ), ), ], diff --git a/pubspec.yaml b/pubspec.yaml index 58bcf24..95988aa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: gel_rule_app description: Local backend/core layer for a Flutter booru browser app. publish_to: "none" -version: 3.6.4+86 +version: 3.6.5+87 environment: sdk: ">=3.3.0 <4.0.0"