Media Preview V2 Visual Redesign

This commit is contained in:
Nicholas
2022-10-21 17:31:50 -04:00
committed by Alex Hart
parent 6c0b63d72c
commit 469cab284e
13 changed files with 254 additions and 87 deletions

View File

@@ -90,8 +90,7 @@ public class VideoPlayer extends FrameLayout {
this.mediaSourceFactory = new DefaultMediaSourceFactory(context);
this.exoView = findViewById(R.id.video_view);
this.exoControls = new PlayerControlView(getContext());
this.exoControls.setShowTimeoutMs(-1);
this.exoControls = createPlayerControls(getContext());
this.exoPlayerListener = new ExoPlayerListener();
this.playerListener = new Player.Listener() {
@@ -129,6 +128,14 @@ public class VideoPlayer extends FrameLayout {
};
}
private PlayerControlView createPlayerControls(Context context) {
final PlayerControlView playerControlView = new PlayerControlView(context);
playerControlView.setShowTimeoutMs(-1);
playerControlView.setShowNextButton(false);
playerControlView.setShowPreviousButton(false);
return playerControlView;
}
private MediaItem mediaItem;
public void setVideoSource(@NonNull VideoSlide videoSource, boolean autoplay, String poolTag) {