Skip to content

Add the ability to repeat a single video in a playlist#779

Open
HankFreeman1 wants to merge 1 commit intodamontecres:mainfrom
HankFreeman1:feature/repeat-single-video
Open

Add the ability to repeat a single video in a playlist#779
HankFreeman1 wants to merge 1 commit intodamontecres:mainfrom
HankFreeman1:feature/repeat-single-video

Conversation

@HankFreeman1
Copy link
Contributor

For #766, this PR adds a "repeat current video" toggle to the player controls when playing a playlist.

Notes

  • When playing a single video, no repeat button is shown as the repeat behavior is controlled by the existing setting in preferences.
  • When playing a playlist, a repeat button appears in the player controls. Tapping it loops the current video indefinitely, and tapping again resumes normal playlist progression.

Demo

Apologies that the demo is very clunky. My CCwGTV is already slow, and the debug version of the app runs even slower, and then I'm trying to capture video over adb. 😆

scrcpy_uddWI9zApB.mp4

@HankFreeman1 HankFreeman1 force-pushed the feature/repeat-single-video branch 2 times, most recently from a26352f to 545880b Compare March 4, 2026 14:32
@WasmachenDennSachenSo
Copy link

Very cool, thank you! It might be a good idea tho to also add the loop toggle to single videos to temporary overwrite the global setting. Many video players do it that way.

@HankFreeman1
Copy link
Contributor Author

Very cool, thank you!

Glad you like it!

It might be a good idea tho to also add the loop toggle to single videos to temporary overwrite the global setting.

Not a bad idea, but is there any reason as a user not to choose "loop" as the default option in this case? If you don't want to watch it again, you just back out after it loops. You'd back to back out anyway, right?

Maybe @damontecres will have an opinion! It shouldn't be too hard to always show the loop button if that's what we want. 😊

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not make any changes to the old UI. I don't want to vet any new functionality in it.

onControllerInteraction = onControllerInteraction,
)
if (isPlaylist) {
PlaybackButton(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want another button on the main playback controls. But this could be moved to the More menu on the left.

Copy link
Contributor Author

@HankFreeman1 HankFreeman1 Mar 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. Unfortunately I find that placement super convenient. I probably wouldn't even use this feature if it were tucked in a menu. Maybe it could be optional to display it with the main controls?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did these vectors come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were AI-generated based on the existing vectors you had. Apologies, I probably should've called that out.

@damontecres
Copy link
Owner

Very cool, thank you! It might be a good idea tho to also add the loop toggle to single videos to temporary overwrite the global setting. Many video players do it that way.

Sorry, I'm not sure I understand this idea. Can you elaborate?

PlaybackAction.ToggleRepeatOne -> {
repeatOneEnabled = !repeatOneEnabled
player.repeatMode =
if (repeatOneEnabled) Player.REPEAT_MODE_ONE else Player.REPEAT_MODE_OFF
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reset back to the global setting. Which is either OFF or REPEAT I believe

@HankFreeman1
Copy link
Contributor Author

Hey, thanks for the feedback, I really appreciate, and totally understand your concerns.

That said, this change is working perfectly for my use case, so I think most likely I'll just close this PR and keep the change locally. Of course if you or anyone else wants to take anything I did and modify it to work better for your project, by all means please do! I will keep the branch around.

@HankFreeman1 HankFreeman1 force-pushed the feature/repeat-single-video branch from 545880b to d4ea2f6 Compare March 14, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants