Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit e590801

Browse files
committed
[video_player]add integration test for video player plugin's inverted aspect ratio bug
1 parent 5c11747 commit e590801

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,19 @@ void main() {
177177
expect(livestreamController.value.duration,
178178
(Duration duration) => duration != Duration.zero);
179179
});
180+
181+
testWidgets('rotated m3u8 has correct aspect ratio',
182+
(WidgetTester tester) async {
183+
// Some m3u8 files contain rotation data that may incorrectly invert the aspect ratio.
184+
// More info [here](https://github.com/flutter/flutter/issues/109116).
185+
final MiniController livestreamController = MiniController.network(
186+
'https://flutter.github.io/assets-for-api-docs/assets/videos/hls/rotated_nail_manifest.m3u8',
187+
);
188+
await livestreamController.initialize();
189+
190+
expect(livestreamController.value.isInitialized, true);
191+
expect(livestreamController.value.size.width,
192+
lessThan(livestreamController.value.size.height));
193+
});
180194
});
181195
}

0 commit comments

Comments
 (0)