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

Commit 1b66881

Browse files
camsim99KyleFin
authored andcommitted
Fix tests, add fix
1 parent ffb787d commit 1b66881

File tree

1 file changed

+8
-0
lines changed
  • packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer

1 file changed

+8
-0
lines changed

packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,14 @@ void sendInitialized() {
304304
}
305305
event.put("width", width);
306306
event.put("height", height);
307+
308+
// Rotating the video with ExoPlayer does not seem to be possible with a Surface,
309+
// so inform the Flutter code that the widget needs to be rotated to prevent
310+
// upside-down playback for videos with rotationDegrees of 180 (other orientations work
311+
// correctly without correction).
312+
if (rotationDegrees == 180) {
313+
event.put("rotationCorrection", rotationDegrees);
314+
}
307315
}
308316

309317
eventSink.success(event);

0 commit comments

Comments
 (0)