How to loop video in watchOS 2?

85 Views Asked by At

How do you loop a watchOS 2 video so it plays over and over forever?

All I have right now is the video playing once. What code should I add to change that?

1

There are 1 best solutions below

0
On BEST ANSWER

You can loop a WKInterfaceMovie by setting setLoops to YES/true.

Sets a Boolean value indicating whether the movie plays in a continuous loop. Specify YES to play the movie in a continuous loop or NO to play the movie once and then stop playback.

Swift sample code:

@IBOutlet weak var moviePlayer: WKInterfaceMovie!
...
moviePlayer.setLoops(true)