From 46687fecb187cc9736c32b07f8c5face813ac4d0 Mon Sep 17 00:00:00 2001 From: bachinger Date: Wed, 2 Jun 2021 19:38:14 +0100 Subject: [PATCH] Allow fast forward and rewind actions in compact view PiperOrigin-RevId: 377107132 --- RELEASENOTES.md | 3 + .../ui/PlayerNotificationManager.java | 84 +++++++++++++++++-- 2 files changed, 80 insertions(+), 7 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5554041b59..5a6afe1b58 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -66,6 +66,9 @@ * PlayerNotificationManager: * Add `PendingIntent.FLAG_IMMUTABLE` flag to BroadcastReceiver to support Android 12. + * Add `setUseFastForwardActionInCompactView(boolean)` and + `setUseRewindActionInCompactView(boolean)` to make it possible to show + seek actions in compact view mode. * DRM: * Don't restore offline keys before releasing them. In OEMCrypto v16+ keys must be released without restoring them first. diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java index 2c17a39ef7..dd84cc9d89 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java @@ -91,12 +91,24 @@ import java.util.Map; *
  • Corresponding setter: {@link #setControlDispatcher(ControlDispatcher)} *
  • Default: {@link DefaultControlDispatcher#DEFAULT_REWIND_MS} (5000) * + *
  • {@code useRewindActionInCompactView} - Sets whether the rewind action should be + * shown in compact view mode. + * *
  • {@code fastForwardIncrementMs} - Sets the fast forward increment. If set to zero the * fast forward action is not used. * + *
  • {@code useFastForwardActionInCompactView} - Sets whether the fast forward action + * should be shown in compact view mode. + * *
  • {@code usePreviousAction} - Whether the previous action is used. *