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;
import androidx.media3.exoplayer.drm.HttpMediaDrmCallback;
import androidx.media3.exoplayer.source.MediaSource;
import androidx.media3.exoplayer.source.ProgressiveMediaSource;
import androidx.media3.ui.PlayerControlView;
import androidx.media3.ui.LegacyPlayerControlView;
import java.util.UUID;
/** Activity that demonstrates use of {@link SurfaceControl} with ExoPlayer. */
......@@ -61,7 +61,7 @@ public final class MainActivity extends Activity {
private static final String OWNER_EXTRA = "owner";
private boolean isOwner;
@Nullable private PlayerControlView playerControlView;
@Nullable private LegacyPlayerControlView playerControlView;
@Nullable private SurfaceView fullScreenView;
@Nullable private SurfaceView nonFullScreenView;
@Nullable private SurfaceView currentOutputView;
......@@ -146,7 +146,7 @@ public final class MainActivity extends Activity {
setCurrentOutputView(nonFullScreenView);
PlayerControlView playerControlView = Assertions.checkNotNull(this.playerControlView);
LegacyPlayerControlView playerControlView = Assertions.checkNotNull(this.playerControlView);
playerControlView.setPlayer(player);
playerControlView.show();
}
......
......@@ -32,7 +32,7 @@
android:layout_weight="1"
android:columnCount="3"/>
<androidx.media3.ui.PlayerControlView
<androidx.media3.ui.LegacyPlayerControlView
android:id="@+id/player_control_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -104,20 +104,20 @@ gets from the libgav1 decoder:
* GL rendering using GL shader for color space conversion
* If you are using `ExoPlayer` with `PlayerView` or `StyledPlayerView`,
enable this option by setting `surface_type` of view to be
`video_decoder_gl_surface_view`.
* If you are using `ExoPlayer` with `LegacyPlayerView` or
`StyledPlayerView`, enable this option by setting `surface_type` of view
to be `video_decoder_gl_surface_view`.
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a
message of type `Renderer.MSG_SET_VIDEO_OUTPUT`
with an instance of `VideoDecoderOutputBufferRenderer` as its object.
message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`VideoDecoderOutputBufferRenderer` as its object.
`VideoDecoderGLSurfaceView` is the concrete
`VideoDecoderOutputBufferRenderer` implementation used by
`(Styled)PlayerView`.
* Native rendering using `ANativeWindow`
* If you are using `ExoPlayer` with `PlayerView` or `StyledPlayerView`,
this option is enabled by default.
* If you are using `ExoPlayer` with `LegacyPlayerView` or
`StyledPlayerView`, this option is enabled by default.
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a
message of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`SurfaceView` as its object.
......
......@@ -117,20 +117,20 @@ gets from the libvpx decoder:
* GL rendering using GL shader for color space conversion
* If you are using `ExoPlayer` with `PlayerView` or `StyledPlayerView`,
enable this option by setting `surface_type` of view to be
`video_decoder_gl_surface_view`.
* If you are using `ExoPlayer` with `LegacyPlayerView` or
`StyledPlayerView`, enable this option by setting `surface_type` of view
to be `video_decoder_gl_surface_view`.
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an
instance of `VideoDecoderOutputBufferRenderer` as its object.
of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`VideoDecoderOutputBufferRenderer` as its object.
`VideoDecoderGLSurfaceView` is the concrete
`VideoDecoderOutputBufferRenderer` implementation used by
`(Styled)PlayerView`.
* Native rendering using `ANativeWindow`
* If you are using `ExoPlayer` with `PlayerView` or `StyledPlayerView`,
this option is enabled by default.
* If you are using `ExoPlayer` with `LegacyPlayerView` or
`StyledPlayerView`, this option is enabled by default.
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
of type `Renderer.MSG_SET_VIDEO_OUTPUT` with an instance of
`SurfaceView` as its object.
......
# 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
-keepclassmembers class androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView {
<init>(android.content.Context);
......
......@@ -24,7 +24,7 @@
<enum name="zoom" value="4"/>
</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">
<enum name="none" value="0"/>
<enum name="surface_view" value="1"/>
......@@ -40,7 +40,7 @@
<flag name="all" value="2"/>
</attr>
<!-- PlayerView and StyledPlayerView attributes -->
<!-- LegacyPlayerView and StyledPlayerView attributes -->
<attr name="use_artwork" format="boolean"/>
<attr name="shutter_background_color" format="color"/>
<attr name="default_artwork" format="reference"/>
......@@ -56,7 +56,7 @@
<attr name="keep_content_on_player_reset" format="boolean"/>
<attr name="player_layout_id" format="reference"/>
<!-- PlayerControlView and StyledPlayerControlView attributes -->
<!-- LegacyPlayerControlView and StyledPlayerControlView attributes -->
<attr name="show_timeout" format="integer"/>
<attr name="show_rewind_button" format="boolean"/>
<attr name="show_fastforward_button" format="boolean"/>
......@@ -105,7 +105,7 @@
<attr name="surface_type"/>
<!-- AspectRatioFrameLayout attributes -->
<attr name="resize_mode"/>
<!-- PlayerControlView attributes -->
<!-- LegacyPlayerControlView attributes -->
<attr name="show_timeout"/>
<attr name="repeat_toggle_modes"/>
<attr name="show_shuffle_button"/>
......
......@@ -15,7 +15,7 @@
-->
<resources>
<declare-styleable name="PlayerView">
<declare-styleable name="LegacyPlayerView">
<attr name="use_artwork"/>
<attr name="shutter_background_color"/>
<attr name="default_artwork"/>
......@@ -29,7 +29,7 @@
<attr name="surface_type"/>
<!-- AspectRatioFrameLayout attributes -->
<attr name="resize_mode"/>
<!-- PlayerControlView attributes -->
<!-- LegacyPlayerControlView attributes -->
<attr name="show_timeout"/>
<attr name="repeat_toggle_modes"/>
<attr name="show_shuffle_button"/>
......@@ -51,7 +51,7 @@
<attr name="played_ad_marker_color"/>
</declare-styleable>
<declare-styleable name="PlayerControlView">
<declare-styleable name="LegacyPlayerControlView">
<attr name="show_timeout"/>
<attr name="repeat_toggle_modes"/>
<attr name="show_rewind_button"/>
......
......@@ -14,18 +14,18 @@
limitations under the License.
-->
<resources>
<drawable name="exo_controls_play">@drawable/exo_icon_play</drawable>
<drawable name="exo_controls_pause">@drawable/exo_icon_pause</drawable>
<drawable name="exo_controls_next">@drawable/exo_icon_next</drawable>
<drawable name="exo_controls_previous">@drawable/exo_icon_previous</drawable>
<drawable name="exo_controls_fastforward">@drawable/exo_icon_fastforward</drawable>
<drawable name="exo_controls_rewind">@drawable/exo_icon_rewind</drawable>
<drawable name="exo_controls_repeat_all">@drawable/exo_icon_repeat_all</drawable>
<drawable name="exo_controls_repeat_off">@drawable/exo_icon_repeat_off</drawable>
<drawable name="exo_controls_repeat_one">@drawable/exo_icon_repeat_one</drawable>
<drawable name="exo_controls_shuffle_off">@drawable/exo_icon_shuffle_off</drawable>
<drawable name="exo_controls_shuffle_on">@drawable/exo_icon_shuffle_on</drawable>
<drawable name="exo_controls_fullscreen_enter">@drawable/exo_icon_fullscreen_enter</drawable>
<drawable name="exo_controls_fullscreen_exit">@drawable/exo_icon_fullscreen_exit</drawable>
<drawable name="exo_controls_vr">@drawable/exo_icon_vr</drawable>
<drawable name="exo_legacy_controls_play">@drawable/exo_icon_play</drawable>
<drawable name="exo_legacy_controls_pause">@drawable/exo_icon_pause</drawable>
<drawable name="exo_legacy_controls_next">@drawable/exo_icon_next</drawable>
<drawable name="exo_legacy_controls_previous">@drawable/exo_icon_previous</drawable>
<drawable name="exo_legacy_controls_fastforward">@drawable/exo_icon_fastforward</drawable>
<drawable name="exo_legacy_controls_rewind">@drawable/exo_icon_rewind</drawable>
<drawable name="exo_legacy_controls_repeat_all">@drawable/exo_icon_repeat_all</drawable>
<drawable name="exo_legacy_controls_repeat_off">@drawable/exo_icon_repeat_off</drawable>
<drawable name="exo_legacy_controls_repeat_one">@drawable/exo_icon_repeat_one</drawable>
<drawable name="exo_legacy_controls_shuffle_off">@drawable/exo_icon_shuffle_off</drawable>
<drawable name="exo_legacy_controls_shuffle_on">@drawable/exo_icon_shuffle_on</drawable>
<drawable name="exo_legacy_controls_fullscreen_enter">@drawable/exo_icon_fullscreen_enter</drawable>
<drawable name="exo_legacy_controls_fullscreen_exit">@drawable/exo_icon_fullscreen_exit</drawable>
<drawable name="exo_legacy_controls_vr">@drawable/exo_icon_vr</drawable>
</resources>
......@@ -22,37 +22,37 @@
</style>
<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>
</style>
<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>
</style>
<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>
</style>
<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>
</style>
<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>
</style>
<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>
</style>
<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>
</style>
</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