Commit 9dae5fd2 by ibaker Committed by tonihei

Rename PlayerView to LegacyPlayerView in media3

The old name is kept in exoplayer2.

PiperOrigin-RevId: 417378759
parent d0041d46
...@@ -44,7 +44,7 @@ import androidx.media3.exoplayer.drm.FrameworkMediaDrm; ...@@ -44,7 +44,7 @@ import androidx.media3.exoplayer.drm.FrameworkMediaDrm;
import androidx.media3.exoplayer.drm.HttpMediaDrmCallback; 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.ui.PlayerControlView; import androidx.media3.ui.LegacyPlayerControlView;
import java.util.UUID; import java.util.UUID;
/** Activity that demonstrates use of {@link SurfaceControl} with ExoPlayer. */ /** Activity that demonstrates use of {@link SurfaceControl} with ExoPlayer. */
...@@ -61,7 +61,7 @@ public final class MainActivity extends Activity { ...@@ -61,7 +61,7 @@ public final class MainActivity extends Activity {
private static final String OWNER_EXTRA = "owner"; private static final String OWNER_EXTRA = "owner";
private boolean isOwner; private boolean isOwner;
@Nullable private PlayerControlView playerControlView; @Nullable private LegacyPlayerControlView playerControlView;
@Nullable private SurfaceView fullScreenView; @Nullable private SurfaceView fullScreenView;
@Nullable private SurfaceView nonFullScreenView; @Nullable private SurfaceView nonFullScreenView;
@Nullable private SurfaceView currentOutputView; @Nullable private SurfaceView currentOutputView;
...@@ -146,7 +146,7 @@ public final class MainActivity extends Activity { ...@@ -146,7 +146,7 @@ public final class MainActivity extends Activity {
setCurrentOutputView(nonFullScreenView); setCurrentOutputView(nonFullScreenView);
PlayerControlView playerControlView = Assertions.checkNotNull(this.playerControlView); LegacyPlayerControlView playerControlView = Assertions.checkNotNull(this.playerControlView);
playerControlView.setPlayer(player); playerControlView.setPlayer(player);
playerControlView.show(); playerControlView.show();
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
android:layout_weight="1" android:layout_weight="1"
android:columnCount="3"/> android:columnCount="3"/>
<androidx.media3.ui.PlayerControlView <androidx.media3.ui.LegacyPlayerControlView
android:id="@+id/player_control_view" android:id="@+id/player_control_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -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 `PlayerView` or `StyledPlayerView`, * If you are using `ExoPlayer` with `LegacyPlayerView` or
enable this option by setting `surface_type` of view to be `StyledPlayerView`, enable this option by setting `surface_type` of view
`video_decoder_gl_surface_view`. to be `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` message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
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
`(Styled)PlayerView`. `(Styled)PlayerView`.
* Native rendering using `ANativeWindow` * Native rendering using `ANativeWindow`
* If you are using `ExoPlayer` with `PlayerView` or `StyledPlayerView`, * If you are using `ExoPlayer` with `LegacyPlayerView` or
this option is enabled by default. `StyledPlayerView`, 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 `PlayerView` or `StyledPlayerView`, * If you are using `ExoPlayer` with `LegacyPlayerView` or
enable this option by setting `surface_type` of view to be `StyledPlayerView`, enable this option by setting `surface_type` of view
`video_decoder_gl_surface_view`. to be `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 of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
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
`(Styled)PlayerView`. `(Styled)PlayerView`.
* Native rendering using `ANativeWindow` * Native rendering using `ANativeWindow`
* If you are using `ExoPlayer` with `PlayerView` or `StyledPlayerView`, * If you are using `ExoPlayer` with `LegacyPlayerView` or
this option is enabled by default. `StyledPlayerView`, 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 PlayerView # Constructor method accessed via reflection in StyledPlayerView 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);
......
...@@ -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 PlayerView and StyledPlayerView --> <!-- Must be kept in sync with LegacyPlayerView and StyledPlayerView -->
<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>
<!-- PlayerView and StyledPlayerView attributes --> <!-- LegacyPlayerView and StyledPlayerView 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"/>
<!-- PlayerControlView and StyledPlayerControlView attributes --> <!-- LegacyPlayerControlView and StyledPlayerControlView 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"/>
...@@ -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"/>
<!-- PlayerControlView attributes --> <!-- LegacyPlayerControlView 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"/>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
--> -->
<resources> <resources>
<declare-styleable name="PlayerView"> <declare-styleable name="LegacyPlayerView">
<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"/>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<attr name="surface_type"/> <attr name="surface_type"/>
<!-- AspectRatioFrameLayout attributes --> <!-- AspectRatioFrameLayout attributes -->
<attr name="resize_mode"/> <attr name="resize_mode"/>
<!-- PlayerControlView attributes --> <!-- LegacyPlayerControlView 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"/>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<attr name="played_ad_marker_color"/> <attr name="played_ad_marker_color"/>
</declare-styleable> </declare-styleable>
<declare-styleable name="PlayerControlView"> <declare-styleable name="LegacyPlayerControlView">
<attr name="show_timeout"/> <attr name="show_timeout"/>
<attr name="repeat_toggle_modes"/> <attr name="repeat_toggle_modes"/>
<attr name="show_rewind_button"/> <attr name="show_rewind_button"/>
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
limitations under the License. limitations under the License.
--> -->
<resources> <resources>
<drawable name="exo_controls_play">@drawable/exo_icon_play</drawable> <drawable name="exo_legacy_controls_play">@drawable/exo_icon_play</drawable>
<drawable name="exo_controls_pause">@drawable/exo_icon_pause</drawable> <drawable name="exo_legacy_controls_pause">@drawable/exo_icon_pause</drawable>
<drawable name="exo_controls_next">@drawable/exo_icon_next</drawable> <drawable name="exo_legacy_controls_next">@drawable/exo_icon_next</drawable>
<drawable name="exo_controls_previous">@drawable/exo_icon_previous</drawable> <drawable name="exo_legacy_controls_previous">@drawable/exo_icon_previous</drawable>
<drawable name="exo_controls_fastforward">@drawable/exo_icon_fastforward</drawable> <drawable name="exo_legacy_controls_fastforward">@drawable/exo_icon_fastforward</drawable>
<drawable name="exo_controls_rewind">@drawable/exo_icon_rewind</drawable> <drawable name="exo_legacy_controls_rewind">@drawable/exo_icon_rewind</drawable>
<drawable name="exo_controls_repeat_all">@drawable/exo_icon_repeat_all</drawable> <drawable name="exo_legacy_controls_repeat_all">@drawable/exo_icon_repeat_all</drawable>
<drawable name="exo_controls_repeat_off">@drawable/exo_icon_repeat_off</drawable> <drawable name="exo_legacy_controls_repeat_off">@drawable/exo_icon_repeat_off</drawable>
<drawable name="exo_controls_repeat_one">@drawable/exo_icon_repeat_one</drawable> <drawable name="exo_legacy_controls_repeat_one">@drawable/exo_icon_repeat_one</drawable>
<drawable name="exo_controls_shuffle_off">@drawable/exo_icon_shuffle_off</drawable> <drawable name="exo_legacy_controls_shuffle_off">@drawable/exo_icon_shuffle_off</drawable>
<drawable name="exo_controls_shuffle_on">@drawable/exo_icon_shuffle_on</drawable> <drawable name="exo_legacy_controls_shuffle_on">@drawable/exo_icon_shuffle_on</drawable>
<drawable name="exo_controls_fullscreen_enter">@drawable/exo_icon_fullscreen_enter</drawable> <drawable name="exo_legacy_controls_fullscreen_enter">@drawable/exo_icon_fullscreen_enter</drawable>
<drawable name="exo_controls_fullscreen_exit">@drawable/exo_icon_fullscreen_exit</drawable> <drawable name="exo_legacy_controls_fullscreen_exit">@drawable/exo_icon_fullscreen_exit</drawable>
<drawable name="exo_controls_vr">@drawable/exo_icon_vr</drawable> <drawable name="exo_legacy_controls_vr">@drawable/exo_icon_vr</drawable>
</resources> </resources>
...@@ -22,37 +22,37 @@ ...@@ -22,37 +22,37 @@
</style> </style>
<style name="ExoMediaButton.Previous"> <style name="ExoMediaButton.Previous">
<item name="android:src">@drawable/exo_controls_previous</item> <item name="android:src">@drawable/exo_legacy_controls_previous</item>
<item name="android:contentDescription">@string/exo_controls_previous_description</item> <item name="android:contentDescription">@string/exo_controls_previous_description</item>
</style> </style>
<style name="ExoMediaButton.Next"> <style name="ExoMediaButton.Next">
<item name="android:src">@drawable/exo_controls_next</item> <item name="android:src">@drawable/exo_legacy_controls_next</item>
<item name="android:contentDescription">@string/exo_controls_next_description</item> <item name="android:contentDescription">@string/exo_controls_next_description</item>
</style> </style>
<style name="ExoMediaButton.FastForward"> <style name="ExoMediaButton.FastForward">
<item name="android:src">@drawable/exo_controls_fastforward</item> <item name="android:src">@drawable/exo_legacy_controls_fastforward</item>
<item name="android:contentDescription">@string/exo_controls_fastforward_description</item> <item name="android:contentDescription">@string/exo_controls_fastforward_description</item>
</style> </style>
<style name="ExoMediaButton.Rewind"> <style name="ExoMediaButton.Rewind">
<item name="android:src">@drawable/exo_controls_rewind</item> <item name="android:src">@drawable/exo_legacy_controls_rewind</item>
<item name="android:contentDescription">@string/exo_controls_rewind_description</item> <item name="android:contentDescription">@string/exo_controls_rewind_description</item>
</style> </style>
<style name="ExoMediaButton.Play"> <style name="ExoMediaButton.Play">
<item name="android:src">@drawable/exo_controls_play</item> <item name="android:src">@drawable/exo_legacy_controls_play</item>
<item name="android:contentDescription">@string/exo_controls_play_description</item> <item name="android:contentDescription">@string/exo_controls_play_description</item>
</style> </style>
<style name="ExoMediaButton.Pause"> <style name="ExoMediaButton.Pause">
<item name="android:src">@drawable/exo_controls_pause</item> <item name="android:src">@drawable/exo_legacy_controls_pause</item>
<item name="android:contentDescription">@string/exo_controls_pause_description</item> <item name="android:contentDescription">@string/exo_controls_pause_description</item>
</style> </style>
<style name="ExoMediaButton.VR"> <style name="ExoMediaButton.VR">
<item name="android:src">@drawable/exo_controls_vr</item> <item name="android:src">@drawable/exo_legacy_controls_vr</item>
<item name="android:contentDescription">@string/exo_controls_vr_description</item> <item name="android:contentDescription">@string/exo_controls_vr_description</item>
</style> </style>
</resources> </resources>
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