fix(player): 使用雪碧图预热首帧兜底
This commit is contained in:
1 parent
48b4e67d34
commit
70d8e0f982
13 files changed
+207
-322
No files matched your search
@@ -67,13 +67,11 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
expect(loader.calls, 1);
|
||||
expect(find.byKey(const Key('scrub-preview-poster')), findsOneWidget);
|
||||
expect(find.byKey(const Key('scrub-preview-background')), findsOneWidget);
|
||||
expect(find.byKey(const Key('scrub-preview-sprite')), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('should_keep_poster_when_axis_and_local_frame_both_fail', (
|
||||
tester,
|
||||
) async {
|
||||
testWidgets('should_keep_background_when_frames_both_fail', (tester) async {
|
||||
final loader = _CountingThumbnailLoader();
|
||||
final localService = _localService(loader);
|
||||
final axis = _FakeAxisSource(axisReady: true);
|
||||
@@ -90,7 +88,7 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
expect(loader.calls, 1);
|
||||
expect(find.byKey(const Key('scrub-preview-poster')), findsOneWidget);
|
||||
expect(find.byKey(const Key('scrub-preview-background')), findsOneWidget);
|
||||
expect(find.byKey(const Key('scrub-preview-sprite')), findsNothing);
|
||||
expect(find.byKey(const Key('scrub-preview-frame')), findsNothing);
|
||||
});
|
||||
@@ -109,7 +107,6 @@ Widget _card({
|
||||
spriteAxisService: axis,
|
||||
thumbnailsUrl: thumbnailsUrl,
|
||||
episodeId: 'episode-1',
|
||||
posterUrl: '',
|
||||
position: const Duration(seconds: 1),
|
||||
duration: const Duration(seconds: 10),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user