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

[video_player]add integration test for inverted aspect ratio bug #6662

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Adds an integration test for a bug where the aspect ratios of some HLS videos are incorrectly inverted.

## 2.3.7

* Fixes a bug where the aspect ratio of some HLS videos are incorrectly inverted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,19 @@ void main() {
expect(livestreamController.value.duration,
(Duration duration) => duration != Duration.zero);
});

testWidgets('rotated m3u8 has correct aspect ratio',
(WidgetTester tester) async {
// Some m3u8 files contain rotation data that may incorrectly invert the aspect ratio.
// More info [here](https://github.com/flutter/flutter/issues/109116).
final MiniController livestreamController = MiniController.network(
'https://flutter.github.io/assets-for-api-docs/assets/videos/hls/rotated_nail_manifest.m3u8',
);
await livestreamController.initialize();

expect(livestreamController.value.isInitialized, true);
expect(livestreamController.value.size.width,
lessThan(livestreamController.value.size.height));
});
});
}