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

Commit 45533c0

Browse files
committed
Fixes for format and publishable checks.
1 parent 22747a8 commit 45533c0

File tree

6 files changed

+27
-20
lines changed

6 files changed

+27
-20
lines changed

packages/video_player/video_player/android/src/test/java/io/flutter/plugins/videoplayer/VideoPlayerTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ public void videoPlayerSendInitializedSetsRotationCorrectionForRotationDegrees18
3030
Format format = new Format.Builder().setRotationDegrees(180).build();
3131
SimpleExoPlayer mockExoPlayer = mock(SimpleExoPlayer.class);
3232
when(mockExoPlayer.getVideoFormat()).thenReturn(format);
33-
final VideoPlayer player = new VideoPlayer(
33+
final VideoPlayer player =
34+
new VideoPlayer(
3435
mock(EventChannel.class),
3536
mock(TextureRegistry.SurfaceTextureEntry.class),
3637
mock(VideoPlayerOptions.class),
37-
mockExoPlayer
38-
);
38+
mockExoPlayer);
3939
QueuingEventSink mockEventSink = mock(QueuingEventSink.class);
4040
player.eventSink = mockEventSink;
4141
player.isInitialized = true;
@@ -44,8 +44,8 @@ public void videoPlayerSendInitializedSetsRotationCorrectionForRotationDegrees18
4444

4545
ArgumentCaptor<Object> eventCaptor = ArgumentCaptor.forClass(Object.class);
4646
verify(mockEventSink).success(eventCaptor.capture());
47-
@SuppressWarnings("unchecked") Map<String, Object> capturedEventMap =
48-
(Map<String, Object>) eventCaptor.getValue();
47+
@SuppressWarnings("unchecked")
48+
Map<String, Object> capturedEventMap = (Map<String, Object>) eventCaptor.getValue();
4949
assertEquals(Math.PI, capturedEventMap.get("rotationCorrection"));
5050
}
5151

@@ -54,12 +54,12 @@ public void videoPlayerSendInitializedDoesNotSetRotationCorrectionForRotationDeg
5454
Format format = new Format.Builder().setRotationDegrees(90).build();
5555
SimpleExoPlayer mockExoPlayer = mock(SimpleExoPlayer.class);
5656
when(mockExoPlayer.getVideoFormat()).thenReturn(format);
57-
final VideoPlayer player = new VideoPlayer(
57+
final VideoPlayer player =
58+
new VideoPlayer(
5859
mock(EventChannel.class),
5960
mock(TextureRegistry.SurfaceTextureEntry.class),
6061
mock(VideoPlayerOptions.class),
61-
mockExoPlayer
62-
);
62+
mockExoPlayer);
6363
QueuingEventSink mockEventSink = mock(QueuingEventSink.class);
6464
player.eventSink = mockEventSink;
6565
player.isInitialized = true;
@@ -68,8 +68,8 @@ public void videoPlayerSendInitializedDoesNotSetRotationCorrectionForRotationDeg
6868

6969
ArgumentCaptor<Object> eventCaptor = ArgumentCaptor.forClass(Object.class);
7070
verify(mockEventSink).success(eventCaptor.capture());
71-
@SuppressWarnings("unchecked") Map<String, Object> capturedEventMap =
72-
(Map<String, Object>) eventCaptor.getValue();
71+
@SuppressWarnings("unchecked")
72+
Map<String, Object> capturedEventMap = (Map<String, Object>) eventCaptor.getValue();
7373
assertFalse(capturedEventMap.containsKey("rotationCorrection"));
7474
}
7575
}

packages/video_player/video_player/test/video_player_test.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,13 @@ void main() {
147147
});
148148

149149
testWidgets('no transform when rotationCorrection is zero',
150-
(WidgetTester tester) async {
151-
final FakeController controller = FakeController.value(VideoPlayerValue(
152-
duration: Duration.zero,
153-
rotationCorrection: 0));
154-
controller.textureId = 1;
155-
await tester.pumpWidget(VideoPlayer(controller));
156-
expect(find.byType(Transform), findsNothing);
157-
});
150+
(WidgetTester tester) async {
151+
final FakeController controller = FakeController.value(
152+
VideoPlayerValue(duration: Duration.zero, rotationCorrection: 0));
153+
controller.textureId = 1;
154+
await tester.pumpWidget(VideoPlayer(controller));
155+
expect(find.byType(Transform), findsNothing);
156+
});
158157

159158
group('ClosedCaption widget', () {
160159
testWidgets('uses a default text style', (WidgetTester tester) async {

packages/video_player/video_player_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.2.1
2+
3+
* Added rotation on Android for videos recorded in landscapeRight Fixes [#60327](https://github.com/flutter/flutter/issues/60327).
4+
15
## 4.2.0
26

37
* Add `contentUri` to `DataSourceType`.

packages/video_player/video_player_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/master/packages/video_player
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 4.2.0
7+
version: 4.2.1
88

99
environment:
1010
sdk: ">=2.12.0 <3.0.0"

packages/video_player/video_player_web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.5
2+
3+
* Added rotation on Android for videos recorded in landscapeRight Fixes [#60327](https://github.com/flutter/flutter/issues/60327).
4+
15
## 2.0.4
26

37
* Adopt `video_player_platform_interface` 4.2 and opt out of `contentUri` data source.

packages/video_player/video_player_web/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_web
22
description: Web platform implementation of video_player.
33
repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player_web
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
5-
version: 2.0.4
5+
version: 2.0.5
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"

0 commit comments

Comments
 (0)