mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-04-20 13:51:24 +00:00
All players in one place
- main, background, popup players now connected via one service, one view, one fragment, one activity and one gesture listener - playback position is synchronized between players. Easy to switch from one to another - expandable player at the bottom of the screen with cool animation and additional features like long click to open channel of a video, play/pause/close buttons and swipe down to dismiss - in-player integrated buttons for opening in browser, playing with Kodi, sharing a video - better background playback that can be activated in settings. Allows to automatically switch to audio-only mode when going to background and then switching to video-mode when returning to the app.
This commit is contained in:
@@ -546,7 +546,7 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||
onPlayBackgroundButtonClicked();
|
||||
break;
|
||||
case PlayerHelper.MinimizeMode.MINIMIZE_ON_EXIT_MODE_POPUP:
|
||||
onFullScreenButtonClicked();
|
||||
toggleFullscreen();
|
||||
break;
|
||||
case PlayerHelper.MinimizeMode.MINIMIZE_ON_EXIT_MODE_NONE:
|
||||
default:
|
||||
@@ -593,8 +593,8 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@Override
|
||||
public void onFullScreenButtonClicked() {
|
||||
super.onFullScreenButtonClicked();
|
||||
public void toggleFullscreen() {
|
||||
super.toggleFullscreen();
|
||||
|
||||
if (DEBUG) Log.d(TAG, "onFullScreenButtonClicked() called");
|
||||
if (simpleExoPlayer == null) return;
|
||||
@@ -678,7 +678,7 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||
onScreenRotationClicked();
|
||||
|
||||
} else if (v.getId() == switchPopupButton.getId()) {
|
||||
onFullScreenButtonClicked();
|
||||
toggleFullscreen();
|
||||
|
||||
} else if (v.getId() == switchBackgroundButton.getId()) {
|
||||
onPlayBackgroundButtonClicked();
|
||||
@@ -746,7 +746,7 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||
@Override
|
||||
public void onPlaybackSpeedClicked() {
|
||||
PlaybackParameterDialog
|
||||
.newInstance(getPlaybackSpeed(), getPlaybackPitch(), getPlaybackSkipSilence())
|
||||
.newInstance(getPlaybackSpeed(), getPlaybackPitch(), getPlaybackSkipSilence(), MainVideoPlayer.this)
|
||||
.show(getSupportFragmentManager(), TAG);
|
||||
}
|
||||
|
||||
@@ -909,6 +909,9 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideSystemUIIfNeeded() { }
|
||||
|
||||
private void updatePlaybackButtons() {
|
||||
if (repeatButton == null || shuffleButton == null ||
|
||||
simpleExoPlayer == null || playQueue == null) return;
|
||||
|
||||
Reference in New Issue
Block a user