From e59080199816fbefc4736bcb4ffae2dd70206e2c Mon Sep 17 00:00:00 2001 From: Huan Lin Date: Wed, 2 Nov 2022 16:33:06 -0700 Subject: [PATCH 1/2] [video_player]add integration test for video player plugin's inverted aspect ratio bug --- .../integration_test/video_player_test.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart b/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart index 5027973a660d..408eebbbc730 100644 --- a/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart @@ -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)); + }); }); } From 5d37f4399e0f7a0fa1274436946266a7226d639f Mon Sep 17 00:00:00 2001 From: Huan Lin Date: Wed, 2 Nov 2022 16:59:01 -0700 Subject: [PATCH 2/2] updates changelog --- packages/video_player/video_player_avfoundation/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index ed2f345784bd..da5e6ae74fa4 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -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.