From 4750785f5abe64a3f7c71ca88a4db24a65765c15 Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Fri, 13 Mar 2020 09:04:00 +0000 Subject: [PATCH] Add option for sensor rotation in 360 playbacks Issue: #6761 PiperOrigin-RevId: 300715682 --- RELEASENOTES.md | 3 ++ .../android/exoplayer2/ui/PlayerView.java | 27 ++++++++++++++ .../ui/spherical/SphericalGLSurfaceView.java | 35 +++++++++++++++---- library/ui/src/main/res/values/attrs.xml | 2 +- 4 files changed, 59 insertions(+), 8 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 98de3a6255..c9b986f731 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -5,6 +5,9 @@ * Text: Catch-and-log all fatal exceptions in `TextRenderer` instead of re-throwing, allowing playback to continue even if subtitles fail ([#6885](https://github.com/google/ExoPlayer/issues/6885)). +* UI: Add an option to set whether to use the orientation sensor for rotation + in spherical playbacks + ([#6761](https://github.com/google/ExoPlayer/issues/6761)). * DASH: * Update the manifest URI to avoid repeated HTTP redirects ([#6907](https://github.com/google/ExoPlayer/issues/6907)). diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java index 03168643cf..2eae9c1dde 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java @@ -143,6 +143,12 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; *
  • Corresponding method: None *
  • Default: {@code surface_view} * + *
  • {@code use_sensor_rotation} - Whether to use the orientation sensor for rotation + * during spherical playbacks (if available). + * *
  • {@code shutter_background_color} - The background color of the {@code exo_shutter} * view. *