1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-19 13:21:22 +00:00

Add field START_PAUSED to the Player Intent

This allows fixing spurious playback resume when minimizing to the background player.
This commit is contained in:
Raphaël Jakse
2020-01-16 20:44:08 +01:00
parent 9f47a274a8
commit 570dded8d6
7 changed files with 27 additions and 10 deletions

View File

@@ -109,12 +109,14 @@ public class NavigationHelper {
final float playbackPitch,
final boolean playbackSkipSilence,
@Nullable final String playbackQuality,
final boolean resumePlayback) {
final boolean resumePlayback,
final boolean startPaused) {
return getPlayerIntent(context, targetClazz, playQueue, playbackQuality, resumePlayback)
.putExtra(BasePlayer.REPEAT_MODE, repeatMode)
.putExtra(BasePlayer.PLAYBACK_SPEED, playbackSpeed)
.putExtra(BasePlayer.PLAYBACK_PITCH, playbackPitch)
.putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence);
.putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence)
.putExtra(BasePlayer.START_PAUSED, startPaused);
}
public static void playOnMainPlayer(final Context context, final PlayQueue queue, final boolean resumePlayback) {