Replay video from start when play is pressed at end

Closes #510
This commit is contained in:
Shadowfacts 2024-07-20 10:33:08 -07:00
parent 47b9ac890a
commit 870d0c8404
1 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,9 @@ class VideoOverlayViewController: UIViewController {
if player.rate > 0 {
player.rate = 0
} else {
if player.currentTime() >= player.currentItem!.duration {
player.seek(to: .zero)
}
#if os(visionOS)
player.play()
#else