Skip to content

Commit

Permalink
fix: apply media3's legacy player control view
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun committed Nov 10, 2023
1 parent 2ab85b4 commit ab0a751
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
import android.widget.ImageButton;

import androidx.activity.OnBackPressedCallback;
import androidx.media3.ui.PlayerControlView;
import androidx.media3.ui.LegacyPlayerControlView;

public class FullScreenPlayerView extends Dialog {
private final PlayerControlView playerControlView;
private final LegacyPlayerControlView playerControlView;
private final ExoPlayerView exoPlayerView;
private ViewGroup parent;
private final FrameLayout containerView;
private final OnBackPressedCallback onBackPressedCallback;

public FullScreenPlayerView(Context context, ExoPlayerView exoPlayerView, PlayerControlView playerControlView, OnBackPressedCallback onBackPressedCallback) {
public FullScreenPlayerView(Context context, ExoPlayerView exoPlayerView, LegacyPlayerControlView playerControlView, OnBackPressedCallback onBackPressedCallback) {
super(context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);
this.playerControlView = playerControlView;
this.exoPlayerView = exoPlayerView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
import androidx.media3.extractor.metadata.emsg.EventMessage;
import androidx.media3.extractor.metadata.id3.Id3Frame;
import androidx.media3.extractor.metadata.id3.TextInformationFrame;
import androidx.media3.ui.PlayerControlView;
import androidx.media3.ui.LegacyPlayerControlView;

import com.brentvatne.common.API.ResizeMode;
import com.brentvatne.common.API.SubtitleStyle;
Expand Down Expand Up @@ -147,7 +147,7 @@ public class ReactExoplayerView extends FrameLayout implements
private final VideoEventEmitter eventEmitter;
private final ReactExoplayerConfig config;
private final DefaultBandwidthMeter bandwidthMeter;
private PlayerControlView playerControlView;
private LegacyPlayerControlView playerControlView;
private View playPauseControlContainer;
private Player.Listener eventListener;

Expand Down Expand Up @@ -391,7 +391,7 @@ private void togglePlayerControlVisibility() {
*/
private void initializePlayerControl() {
if (playerControlView == null) {
playerControlView = new PlayerControlView(getContext());
playerControlView = new LegacyPlayerControlView(getContext());
}

if (fullScreenPlayerView == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:includeFontPadding="false"
android:textColor="#FFBEBEBE"/>

<com.google.android.exoplayer2.ui.DefaultTimeBar
<androidx.media3.ui.DefaultTimeBar
android:id="@+id/exo_progress"
android:layout_width="0dp"
android:layout_weight="1"
Expand Down

0 comments on commit ab0a751

Please sign in to comment.