feature: Persisted the repeat mode flag using shared preferences#13387
feature: Persisted the repeat mode flag using shared preferences#13387arjun1194 wants to merge 3 commits intoTeamNewPipe:devfrom
Conversation
There was a problem hiding this comment.
Saying this now to save time saying it later: the code as it stands introduces a regression.
The repeat mode setting is properly updated in every player except the Main Video player.
If you switch between background and video player while repeat mode is set to anything but off, the video player does not retain the repeat setting as the background player (it shows off when you switch away from video and switch back to it).
This is because in VideoPlayerUi.initPlayback there needs to be a call to set the repeat mode as well as the shuffle, for the same reason that there's a call to setShuffleButton.
Some other less critical changes I will mention soon, but this one is the main blocker.
EDIT: changes you should make
// VideoPlayerUi
@Override
public void initPlayback() {
super.initPlayback();
// #6825 - Ensure that the shuffle-button is in the correct state on the UI
setShuffleButton(player.getExoPlayer().getShuffleModeEnabled());
// Do same for repeat button
setRepeatButton(player.getRepeatMode());
}
// ....
@Override
public void onRepeatModeChanged(@RepeatMode final int repeatMode) {
super.onRepeatModeChanged(repeatMode);
setRepeatButton(repeatMode);
}|
@absurdlylongusername resolved the comments |
What is it?
refactorbranchDescription of the changes in your PR
Before/After Screenshots/Screen Record
myvideo_2.mp4
myvideo.mp4
Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence