Commit bfce8f54 by ibaker Committed by Ian Baker

Rename StyledPlayerView to PlayerView

This commit leaves some 'styled' references, specifically:
* exo_styled_XXX dimension names
* exo_styled_controls_XXX drawable IDs
* exo_styled_XXX color names
* ExoStyledControls.XXX style names

PiperOrigin-RevId: 421576554
parent 4d5bf7c0
Showing with 60 additions and 60 deletions
...@@ -36,7 +36,7 @@ import androidx.media3.common.MediaItem; ...@@ -36,7 +36,7 @@ import androidx.media3.common.MediaItem;
import androidx.media3.common.util.Assertions; import androidx.media3.common.util.Assertions;
import androidx.media3.common.util.Util; import androidx.media3.common.util.Util;
import androidx.media3.exoplayer.ExoPlayer; import androidx.media3.exoplayer.ExoPlayer;
import androidx.media3.ui.StyledPlayerView; import androidx.media3.ui.PlayerView;
import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
...@@ -52,7 +52,7 @@ import com.google.android.gms.dynamite.DynamiteModule; ...@@ -52,7 +52,7 @@ import com.google.android.gms.dynamite.DynamiteModule;
public class MainActivity extends AppCompatActivity public class MainActivity extends AppCompatActivity
implements OnClickListener, PlayerManager.Listener { implements OnClickListener, PlayerManager.Listener {
private StyledPlayerView playerView; private PlayerView playerView;
private PlayerManager playerManager; private PlayerManager playerManager;
private RecyclerView mediaQueueList; private RecyclerView mediaQueueList;
private MediaQueueListAdapter mediaQueueListAdapter; private MediaQueueListAdapter mediaQueueListAdapter;
......
...@@ -28,8 +28,8 @@ import androidx.media3.common.Player.TimelineChangeReason; ...@@ -28,8 +28,8 @@ import androidx.media3.common.Player.TimelineChangeReason;
import androidx.media3.common.Timeline; import androidx.media3.common.Timeline;
import androidx.media3.common.TracksInfo; import androidx.media3.common.TracksInfo;
import androidx.media3.exoplayer.ExoPlayer; import androidx.media3.exoplayer.ExoPlayer;
import androidx.media3.ui.StyledPlayerControlView; import androidx.media3.ui.PlayerControlView;
import androidx.media3.ui.StyledPlayerView; import androidx.media3.ui.PlayerView;
import com.google.android.gms.cast.framework.CastContext; import com.google.android.gms.cast.framework.CastContext;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -51,7 +51,7 @@ import java.util.ArrayList; ...@@ -51,7 +51,7 @@ import java.util.ArrayList;
} }
private final Context context; private final Context context;
private final StyledPlayerView playerView; private final PlayerView playerView;
private final Player localPlayer; private final Player localPlayer;
private final CastPlayer castPlayer; private final CastPlayer castPlayer;
private final ArrayList<MediaItem> mediaQueue; private final ArrayList<MediaItem> mediaQueue;
...@@ -66,11 +66,11 @@ import java.util.ArrayList; ...@@ -66,11 +66,11 @@ import java.util.ArrayList;
* *
* @param context A {@link Context}. * @param context A {@link Context}.
* @param listener A {@link Listener} for queue position changes. * @param listener A {@link Listener} for queue position changes.
* @param playerView The {@link StyledPlayerView} for playback. * @param playerView The {@link PlayerView} for playback.
* @param castContext The {@link CastContext}. * @param castContext The {@link CastContext}.
*/ */
public PlayerManager( public PlayerManager(
Context context, Listener listener, StyledPlayerView playerView, CastContext castContext) { Context context, Listener listener, PlayerView playerView, CastContext castContext) {
this.context = context; this.context = context;
this.listener = listener; this.listener = listener;
this.playerView = playerView; this.playerView = playerView;
...@@ -270,7 +270,7 @@ import java.util.ArrayList; ...@@ -270,7 +270,7 @@ import java.util.ArrayList;
R.drawable.ic_baseline_cast_connected_400, R.drawable.ic_baseline_cast_connected_400,
/* theme= */ null)); /* theme= */ null));
} else { // currentPlayer == localPlayer } else { // currentPlayer == localPlayer
playerView.setControllerShowTimeoutMs(StyledPlayerControlView.DEFAULT_SHOW_TIMEOUT_MS); playerView.setControllerShowTimeoutMs(PlayerControlView.DEFAULT_SHOW_TIMEOUT_MS);
playerView.setDefaultArtwork(null); playerView.setDefaultArtwork(null);
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:keepScreenOn="true"> android:keepScreenOn="true">
<androidx.media3.ui.StyledPlayerView android:id="@+id/player_view" <androidx.media3.ui.PlayerView android:id="@+id/player_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
......
...@@ -42,7 +42,7 @@ import androidx.media3.exoplayer.drm.HttpMediaDrmCallback; ...@@ -42,7 +42,7 @@ import androidx.media3.exoplayer.drm.HttpMediaDrmCallback;
import androidx.media3.exoplayer.source.MediaSource; import androidx.media3.exoplayer.source.MediaSource;
import androidx.media3.exoplayer.source.ProgressiveMediaSource; import androidx.media3.exoplayer.source.ProgressiveMediaSource;
import androidx.media3.exoplayer.util.EventLogger; import androidx.media3.exoplayer.util.EventLogger;
import androidx.media3.ui.StyledPlayerView; import androidx.media3.ui.PlayerView;
import java.util.UUID; import java.util.UUID;
/** /**
...@@ -61,7 +61,7 @@ public final class MainActivity extends Activity { ...@@ -61,7 +61,7 @@ public final class MainActivity extends Activity {
private static final String DRM_SCHEME_EXTRA = "drm_scheme"; private static final String DRM_SCHEME_EXTRA = "drm_scheme";
private static final String DRM_LICENSE_URL_EXTRA = "drm_license_url"; private static final String DRM_LICENSE_URL_EXTRA = "drm_license_url";
@Nullable private StyledPlayerView playerView; @Nullable private PlayerView playerView;
@Nullable private VideoProcessingGLSurfaceView videoProcessingGLSurfaceView; @Nullable private VideoProcessingGLSurfaceView videoProcessingGLSurfaceView;
@Nullable private ExoPlayer player; @Nullable private ExoPlayer player;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:keepScreenOn="true"> android:keepScreenOn="true">
<androidx.media3.ui.StyledPlayerView <androidx.media3.ui.PlayerView
android:id="@+id/player_view" android:id="@+id/player_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -52,15 +52,15 @@ import androidx.media3.exoplayer.source.ads.AdsLoader; ...@@ -52,15 +52,15 @@ import androidx.media3.exoplayer.source.ads.AdsLoader;
import androidx.media3.exoplayer.trackselection.DefaultTrackSelector; import androidx.media3.exoplayer.trackselection.DefaultTrackSelector;
import androidx.media3.exoplayer.util.DebugTextViewHelper; import androidx.media3.exoplayer.util.DebugTextViewHelper;
import androidx.media3.exoplayer.util.EventLogger; import androidx.media3.exoplayer.util.EventLogger;
import androidx.media3.ui.StyledPlayerControlView; import androidx.media3.ui.PlayerControlView;
import androidx.media3.ui.StyledPlayerView; import androidx.media3.ui.PlayerView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
/** An activity that plays media using {@link ExoPlayer}. */ /** An activity that plays media using {@link ExoPlayer}. */
public class PlayerActivity extends AppCompatActivity public class PlayerActivity extends AppCompatActivity
implements OnClickListener, StyledPlayerControlView.VisibilityListener { implements OnClickListener, PlayerControlView.VisibilityListener {
// Saved instance state keys. // Saved instance state keys.
...@@ -69,7 +69,7 @@ public class PlayerActivity extends AppCompatActivity ...@@ -69,7 +69,7 @@ public class PlayerActivity extends AppCompatActivity
private static final String KEY_POSITION = "position"; private static final String KEY_POSITION = "position";
private static final String KEY_AUTO_PLAY = "auto_play"; private static final String KEY_AUTO_PLAY = "auto_play";
protected StyledPlayerView playerView; protected PlayerView playerView;
protected LinearLayout debugRootView; protected LinearLayout debugRootView;
protected TextView debugTextView; protected TextView debugTextView;
protected @Nullable ExoPlayer player; protected @Nullable ExoPlayer player;
...@@ -234,7 +234,7 @@ public class PlayerActivity extends AppCompatActivity ...@@ -234,7 +234,7 @@ public class PlayerActivity extends AppCompatActivity
} }
} }
// StyledPlayerControlView.VisibilityListener implementation // PlayerControlView.VisibilityListener implementation
@Override @Override
public void onVisibilityChange(int visibility) { public void onVisibilityChange(int visibility) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:keepScreenOn="true"> android:keepScreenOn="true">
<androidx.media3.ui.StyledPlayerView android:id="@+id/player_view" <androidx.media3.ui.PlayerView android:id="@+id/player_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:show_shuffle_button="true" app:show_shuffle_button="true"
......
...@@ -34,7 +34,7 @@ import androidx.media3.common.MediaMetadata ...@@ -34,7 +34,7 @@ import androidx.media3.common.MediaMetadata
import androidx.media3.common.Player import androidx.media3.common.Player
import androidx.media3.session.MediaController import androidx.media3.session.MediaController
import androidx.media3.session.SessionToken import androidx.media3.session.SessionToken
import androidx.media3.ui.StyledPlayerView import androidx.media3.ui.PlayerView
import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.ListenableFuture
import com.google.common.util.concurrent.MoreExecutors import com.google.common.util.concurrent.MoreExecutors
...@@ -43,7 +43,7 @@ class PlayerActivity : AppCompatActivity() { ...@@ -43,7 +43,7 @@ class PlayerActivity : AppCompatActivity() {
private val controller: MediaController? private val controller: MediaController?
get() = if (controllerFuture.isDone) controllerFuture.get() else null get() = if (controllerFuture.isDone) controllerFuture.get() else null
private lateinit var playerView: StyledPlayerView private lateinit var playerView: PlayerView
private lateinit var mediaList: ListView private lateinit var mediaList: ListView
private lateinit var mediaListAdapter: PlayingMediaItemArrayAdapter private lateinit var mediaListAdapter: PlayingMediaItemArrayAdapter
private val subItemMediaList: MutableList<MediaItem> = mutableListOf() private val subItemMediaList: MutableList<MediaItem> = mutableListOf()
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
android:layout_height="300dp" android:layout_height="300dp"
android:layout_width="match_parent" android:layout_width="match_parent"
> >
<androidx.media3.ui.StyledPlayerView <androidx.media3.ui.PlayerView
android:id="@+id/player_view" android:id="@+id/player_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
......
...@@ -104,20 +104,20 @@ gets from the libgav1 decoder: ...@@ -104,20 +104,20 @@ gets from the libgav1 decoder:
* GL rendering using GL shader for color space conversion * GL rendering using GL shader for color space conversion
* If you are using `ExoPlayer` with `LegacyPlayerView` or * If you are using `ExoPlayer` with `LegacyPlayerView` or `PlayerView`,
`StyledPlayerView`, enable this option by setting `surface_type` of view enable this option by setting `surface_type` of view to be
to be `video_decoder_gl_surface_view`. `video_decoder_gl_surface_view`.
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a * Otherwise, enable this option by sending `Libgav1VideoRenderer` a
message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`VideoDecoderOutputBufferRenderer` as its object. `VideoDecoderOutputBufferRenderer` as its object.
`VideoDecoderGLSurfaceView` is the concrete `VideoDecoderGLSurfaceView` is the concrete
`VideoDecoderOutputBufferRenderer` implementation used by `VideoDecoderOutputBufferRenderer` implementation used by `PlayerView`
`StyledPlayerView` and `LegacyPlayerView`. and `LegacyPlayerView`.
* Native rendering using `ANativeWindow` * Native rendering using `ANativeWindow`
* If you are using `ExoPlayer` with `LegacyPlayerView` or * If you are using `ExoPlayer` with `LegacyPlayerView` or `PlayerView`,
`StyledPlayerView`, this option is enabled by default. this option is enabled by default.
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a * Otherwise, enable this option by sending `Libgav1VideoRenderer` a
message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`SurfaceView` as its object. `SurfaceView` as its object.
......
...@@ -117,20 +117,20 @@ gets from the libvpx decoder: ...@@ -117,20 +117,20 @@ gets from the libvpx decoder:
* GL rendering using GL shader for color space conversion * GL rendering using GL shader for color space conversion
* If you are using `ExoPlayer` with `LegacyPlayerView` or * If you are using `ExoPlayer` with `LegacyPlayerView` or `PlayerView`,
`StyledPlayerView`, enable this option by setting `surface_type` of view enable this option by setting `surface_type` of view to be
to be `video_decoder_gl_surface_view`. `video_decoder_gl_surface_view`.
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message * Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`VideoDecoderOutputBufferRenderer` as its object. `VideoDecoderOutputBufferRenderer` as its object.
`VideoDecoderGLSurfaceView` is the concrete `VideoDecoderGLSurfaceView` is the concrete
`VideoDecoderOutputBufferRenderer` implementation used by `VideoDecoderOutputBufferRenderer` implementation used by `PlayerView`
`StyledPlayerView` and `LegacyPlayerView`. and `LegacyPlayerView`.
* Native rendering using `ANativeWindow` * Native rendering using `ANativeWindow`
* If you are using `ExoPlayer` with `LegacyPlayerView` or * If you are using `ExoPlayer` with `LegacyPlayerView` or `PlayerView`,
`StyledPlayerView`, this option is enabled by default. this option is enabled by default.
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message * Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`SurfaceView` as its object. `SurfaceView` as its object.
......
# Proguard rules specific to the UI module. # Proguard rules specific to the UI module.
# Constructor method accessed via reflection in StyledPlayerView and LegacyPlayerView # Constructor method accessed via reflection in PlayerView and LegacyPlayerView
-dontnote androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView -dontnote androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView
-keepclassmembers class androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView { -keepclassmembers class androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView {
<init>(android.content.Context); <init>(android.content.Context);
......
...@@ -158,7 +158,7 @@ import java.util.concurrent.CopyOnWriteArrayList; ...@@ -158,7 +158,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
* below for more details. * below for more details.
* <ul> * <ul>
* <li>Corresponding method: None * <li>Corresponding method: None
* <li>Default: {@code R.layout.exo_styled_player_control_view} * <li>Default: {@code R.layout.exo_player_control_view}
* </ul> * </ul>
* <li>All attributes that can be set on {@link DefaultTimeBar} can also be set on a * <li>All attributes that can be set on {@link DefaultTimeBar} can also be set on a
* StyledPlayerControlView, and will be propagated to the inflated {@link DefaultTimeBar} * StyledPlayerControlView, and will be propagated to the inflated {@link DefaultTimeBar}
...@@ -193,7 +193,7 @@ import java.util.concurrent.CopyOnWriteArrayList; ...@@ -193,7 +193,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
* <h2>Overriding the layout file</h2> * <h2>Overriding the layout file</h2>
* *
* To customize the layout of StyledPlayerControlView throughout your app, or just for certain * To customize the layout of StyledPlayerControlView throughout your app, or just for certain
* configurations, you can define {@code exo_styled_player_control_view.xml} layout files in your * configurations, you can define {@code exo_player_control_view.xml} layout files in your
* application {@code res/layout*} directories. But, in this case, you need to be careful since the * application {@code res/layout*} directories. But, in this case, you need to be careful since the
* default animation implementation expects certain relative positions between children. See also <a * default animation implementation expects certain relative positions between children. See also <a
* href="CustomLayout">Specifying a custom layout file</a>. * href="CustomLayout">Specifying a custom layout file</a>.
...@@ -297,18 +297,18 @@ import java.util.concurrent.CopyOnWriteArrayList; ...@@ -297,18 +297,18 @@ import java.util.concurrent.CopyOnWriteArrayList;
* *
* <h2 id="CustomLayout">Specifying a custom layout file</h2> * <h2 id="CustomLayout">Specifying a custom layout file</h2>
* *
* Defining your own {@code exo_styled_player_control_view.xml} is useful to customize the layout of * Defining your own {@code exo_player_control_view.xml} is useful to customize the layout of
* StyledPlayerControlView throughout your application. It's also possible to customize the layout * StyledPlayerControlView throughout your application. It's also possible to customize the layout
* for a single instance in a layout file. This is achieved by setting the {@code * for a single instance in a layout file. This is achieved by setting the {@code
* controller_layout_id} attribute on a StyledPlayerControlView. This will cause the specified * controller_layout_id} attribute on a StyledPlayerControlView. This will cause the specified
* layout to be inflated instead of {@code exo_styled_player_control_view.xml} for only the instance * layout to be inflated instead of {@code exo_player_control_view.xml} for only the instance on
* on which the attribute is set. * which the attribute is set.
* *
* <p>You need to be careful when you set the {@code controller_layout_id}, because the default * <p>You need to be careful when you set the {@code controller_layout_id}, because the default
* animation implementation expects certain relative positions between children. * animation implementation expects certain relative positions between children.
*/ */
@UnstableApi @UnstableApi
public class StyledPlayerControlView extends FrameLayout { public class PlayerControlView extends FrameLayout {
static { static {
MediaLibraryInfo.registerModule("media3.ui"); MediaLibraryInfo.registerModule("media3.ui");
...@@ -426,7 +426,7 @@ public class StyledPlayerControlView extends FrameLayout { ...@@ -426,7 +426,7 @@ public class StyledPlayerControlView extends FrameLayout {
private boolean[] extraPlayedAdGroups; private boolean[] extraPlayedAdGroups;
private long currentWindowOffset; private long currentWindowOffset;
private StyledPlayerControlViewLayoutManager controlViewLayoutManager; private PlayerControlViewLayoutManager controlViewLayoutManager;
private Resources resources; private Resources resources;
private RecyclerView settingsView; private RecyclerView settingsView;
...@@ -448,15 +448,15 @@ public class StyledPlayerControlView extends FrameLayout { ...@@ -448,15 +448,15 @@ public class StyledPlayerControlView extends FrameLayout {
@Nullable private View playbackSpeedButton; @Nullable private View playbackSpeedButton;
@Nullable private View audioTrackButton; @Nullable private View audioTrackButton;
public StyledPlayerControlView(Context context) { public PlayerControlView(Context context) {
this(context, /* attrs= */ null); this(context, /* attrs= */ null);
} }
public StyledPlayerControlView(Context context, @Nullable AttributeSet attrs) { public PlayerControlView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, /* defStyleAttr= */ 0); this(context, attrs, /* defStyleAttr= */ 0);
} }
public StyledPlayerControlView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { public PlayerControlView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, attrs); this(context, attrs, defStyleAttr, attrs);
} }
...@@ -466,13 +466,13 @@ public class StyledPlayerControlView extends FrameLayout { ...@@ -466,13 +466,13 @@ public class StyledPlayerControlView extends FrameLayout {
"nullness:method.invocation", "nullness:method.invocation",
"nullness:methodref.receiver.bound" "nullness:methodref.receiver.bound"
}) })
public StyledPlayerControlView( public PlayerControlView(
Context context, Context context,
@Nullable AttributeSet attrs, @Nullable AttributeSet attrs,
int defStyleAttr, int defStyleAttr,
@Nullable AttributeSet playbackAttrs) { @Nullable AttributeSet playbackAttrs) {
super(context, attrs, defStyleAttr); super(context, attrs, defStyleAttr);
int controllerLayoutId = R.layout.exo_styled_player_control_view; int controllerLayoutId = R.layout.exo_player_control_view;
showTimeoutMs = DEFAULT_SHOW_TIMEOUT_MS; showTimeoutMs = DEFAULT_SHOW_TIMEOUT_MS;
repeatToggleModes = DEFAULT_REPEAT_TOGGLE_MODES; repeatToggleModes = DEFAULT_REPEAT_TOGGLE_MODES;
timeBarMinUpdateIntervalMs = DEFAULT_TIME_BAR_MIN_UPDATE_INTERVAL_MS; timeBarMinUpdateIntervalMs = DEFAULT_TIME_BAR_MIN_UPDATE_INTERVAL_MS;
...@@ -646,7 +646,7 @@ public class StyledPlayerControlView extends FrameLayout { ...@@ -646,7 +646,7 @@ public class StyledPlayerControlView extends FrameLayout {
updateButton(/* enabled= */ false, vrButton); updateButton(/* enabled= */ false, vrButton);
} }
controlViewLayoutManager = new StyledPlayerControlViewLayoutManager(this); controlViewLayoutManager = new PlayerControlViewLayoutManager(this);
controlViewLayoutManager.setAnimationEnabled(animationEnabled); controlViewLayoutManager.setAnimationEnabled(animationEnabled);
String[] settingTexts = new String[2]; String[] settingTexts = new String[2];
...@@ -1767,7 +1767,7 @@ public class StyledPlayerControlView extends FrameLayout { ...@@ -1767,7 +1767,7 @@ public class StyledPlayerControlView extends FrameLayout {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@Nullable Player player = StyledPlayerControlView.this.player; @Nullable Player player = PlayerControlView.this.player;
if (player == null) { if (player == null) {
return; return;
} }
......
...@@ -31,7 +31,7 @@ import androidx.annotation.Nullable; ...@@ -31,7 +31,7 @@ import androidx.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/* package */ final class StyledPlayerControlViewLayoutManager { /* package */ final class PlayerControlViewLayoutManager {
private static final long ANIMATION_INTERVAL_MS = 2_000; private static final long ANIMATION_INTERVAL_MS = 2_000;
private static final long DURATION_FOR_HIDING_ANIMATION_MS = 250; private static final long DURATION_FOR_HIDING_ANIMATION_MS = 250;
private static final long DURATION_FOR_SHOWING_ANIMATION_MS = 250; private static final long DURATION_FOR_SHOWING_ANIMATION_MS = 250;
...@@ -48,7 +48,7 @@ import java.util.List; ...@@ -48,7 +48,7 @@ import java.util.List;
// Int for defining the UX state where the views are being animated to be shown. // Int for defining the UX state where the views are being animated to be shown.
private static final int UX_STATE_ANIMATING_SHOW = 4; private static final int UX_STATE_ANIMATING_SHOW = 4;
private final StyledPlayerControlView playerControlView; private final PlayerControlView playerControlView;
@Nullable private final View controlsBackground; @Nullable private final View controlsBackground;
@Nullable private final ViewGroup centerControls; @Nullable private final ViewGroup centerControls;
...@@ -84,7 +84,7 @@ import java.util.List; ...@@ -84,7 +84,7 @@ import java.util.List;
private boolean animationEnabled; private boolean animationEnabled;
@SuppressWarnings({"nullness:method.invocation", "nullness:methodref.receiver.bound"}) @SuppressWarnings({"nullness:method.invocation", "nullness:methodref.receiver.bound"})
public StyledPlayerControlViewLayoutManager(StyledPlayerControlView playerControlView) { public PlayerControlViewLayoutManager(PlayerControlView playerControlView) {
this.playerControlView = playerControlView; this.playerControlView = playerControlView;
showAllBarsRunnable = this::showAllBars; showAllBarsRunnable = this::showAllBars;
hideAllBarsRunnable = this::hideAllBars; hideAllBarsRunnable = this::hideAllBars;
......
...@@ -136,12 +136,12 @@ ...@@ -136,12 +136,12 @@
<ImageButton android:id="@id/exo_prev" <ImageButton android:id="@id/exo_prev"
style="@style/ExoStyledControls.Button.Center.Previous"/> style="@style/ExoStyledControls.Button.Center.Previous"/>
<include layout="@layout/exo_styled_player_control_rewind_button" /> <include layout="@layout/exo_player_control_rewind_button" />
<ImageButton android:id="@id/exo_play_pause" <ImageButton android:id="@id/exo_play_pause"
style="@style/ExoStyledControls.Button.Center.PlayPause"/> style="@style/ExoStyledControls.Button.Center.PlayPause"/>
<include layout="@layout/exo_styled_player_control_ffwd_button" /> <include layout="@layout/exo_player_control_ffwd_button" />
<ImageButton android:id="@id/exo_next" <ImageButton android:id="@id/exo_next"
style="@style/ExoStyledControls.Button.Center.Next"/> style="@style/ExoStyledControls.Button.Center.Next"/>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<enum name="zoom" value="4"/> <enum name="zoom" value="4"/>
</attr> </attr>
<!-- Must be kept in sync with LegacyPlayerView and StyledPlayerView --> <!-- Must be kept in sync with LegacyPlayerView and PlayerView -->
<attr name="surface_type" format="enum"> <attr name="surface_type" format="enum">
<enum name="none" value="0"/> <enum name="none" value="0"/>
<enum name="surface_view" value="1"/> <enum name="surface_view" value="1"/>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<flag name="all" value="2"/> <flag name="all" value="2"/>
</attr> </attr>
<!-- LegacyPlayerView and StyledPlayerView attributes --> <!-- LegacyPlayerView and PlayerView attributes -->
<attr name="use_artwork" format="boolean"/> <attr name="use_artwork" format="boolean"/>
<attr name="shutter_background_color" format="color"/> <attr name="shutter_background_color" format="color"/>
<attr name="default_artwork" format="reference"/> <attr name="default_artwork" format="reference"/>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<attr name="keep_content_on_player_reset" format="boolean"/> <attr name="keep_content_on_player_reset" format="boolean"/>
<attr name="player_layout_id" format="reference"/> <attr name="player_layout_id" format="reference"/>
<!-- LegacyPlayerControlView and StyledPlayerControlView attributes --> <!-- LegacyPlayerControlView and PlayerControlView attributes -->
<attr name="show_timeout" format="integer"/> <attr name="show_timeout" format="integer"/>
<attr name="show_rewind_button" format="boolean"/> <attr name="show_rewind_button" format="boolean"/>
<attr name="show_fastforward_button" format="boolean"/> <attr name="show_fastforward_button" format="boolean"/>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<attr name="ad_marker_color" format="color"/> <attr name="ad_marker_color" format="color"/>
<attr name="played_ad_marker_color" format="color"/> <attr name="played_ad_marker_color" format="color"/>
<declare-styleable name="StyledPlayerView"> <declare-styleable name="PlayerView">
<attr name="use_artwork"/> <attr name="use_artwork"/>
<attr name="shutter_background_color"/> <attr name="shutter_background_color"/>
<attr name="default_artwork"/> <attr name="default_artwork"/>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<attr name="surface_type"/> <attr name="surface_type"/>
<!-- AspectRatioFrameLayout attributes --> <!-- AspectRatioFrameLayout attributes -->
<attr name="resize_mode"/> <attr name="resize_mode"/>
<!-- StyledPlayerControlView attributes --> <!-- PlayerControlView attributes -->
<attr name="show_timeout"/> <attr name="show_timeout"/>
<attr name="repeat_toggle_modes"/> <attr name="repeat_toggle_modes"/>
<attr name="show_shuffle_button"/> <attr name="show_shuffle_button"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment