Revert "merge: 合并 K95.2 首切频道封面过渡"

This reverts commit a2a491d056, reversing
changes made to 838ca2ce2a.
This commit is contained in:
Zhou Weidong committed 2026-10-21 18:07:25 +08:00
1 parent a2a491d056
commit f8769f2e1d
5 files changed
+19 -111

No files matched your search

+1 -2
View File
@@ -378,7 +378,6 @@ class _PlayerPageState extends State<PlayerPage>
PlayerVideoSurface(
controller: videoPort?.controller,
videoUrl: videoPort?.controller.dataSource ?? episode.videoUrl,
posterUrl: drama.posterUrl,
theater: theater,
onTap: () =>
logic.session.setUserWantsPlay(!logic.session.userWantsPlay),
@@ -428,7 +427,7 @@ class _PlayerPageState extends State<PlayerPage>
),
),
),
if (selected && logic.session.loading && !widget.homeMode)
if (selected && logic.session.loading)
const Center(
child: CircularProgressIndicator(
key: Key('player-session-loading'),
@@ -4,26 +4,22 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
import '../../../core/widgets/remote_image.dart';
const Duration _videoFadeDuration = Duration(milliseconds: 200);
const double _errorHorizontal = 32;
const int _errorMaxLines = 3;
/// 封面或黑色底层与视频层共用同一控制器,视频首帧就绪后再淡入。
/// 黑色底层与视频层共用同一控制器,视频首帧就绪后再淡入。
class PlayerVideoSurface extends StatefulWidget {
const PlayerVideoSurface({
super.key,
required this.controller,
required this.videoUrl,
this.posterUrl = '',
required this.theater,
required this.onTap,
});
final VideoPlayerController? controller;
final String videoUrl;
final String posterUrl;
final bool theater;
final VoidCallback onTap;
@@ -57,17 +53,10 @@ class _PlayerVideoSurfaceState extends State<PlayerVideoSurface> {
return Stack(
fit: StackFit.expand,
children: [
if (widget.posterUrl.isEmpty)
const ColoredBox(
key: Key('player-fallback-background'),
color: Colors.black,
)
else
RemoteImage(
widget.posterUrl,
key: const Key('player-video-poster'),
fit: BoxFit.cover,
),
const ColoredBox(
key: Key('player-fallback-background'),
color: Colors.black,
),
AnimatedOpacity(
key: const Key('player-video-opacity'),
opacity: reveal ? 1 : 0,