Anyone got sample code for using AVPlayerLooper in SwiftUI?
Code i see are not for SwiftUI
I only wish to have the option to turn on auto-repeat on and off.
I could use AVQueuePlayer as replacement for AVPlayer but it does not have a way to loop.
So these are what I am looking for
- Loop video in SwiftUI
- If Using AVPlayerLooper, it has a disableLooping() function (possibly to turn off looping). But how can it be turned back on? There is no enableLooping(). Or does it need a new instance?
- since i am new to iOS, the code there are all linked to no swift ui code so I have no clue (sorry) the equivalent of them in SwiftUI
Thoughts?