Learn iOS with Examples, Code Snippets and Video Tutorials

How to Make an SKVideoNode Loop Forever

How to Make an SKVideoNode Loop Forever

Sprite Kit has a handy feature for showing video in your game or app, with the SKVideoNode class.  The advantage of using  SKVideoNode is that you can position it behind other nodes in your scene.  Getting it to loop though involves using AVPlayer and adding an observer to notify the class when the video ends. Here’s the code…

 

 

 

Check out our premium Swift and Sprite Kit Tutorial content!

Visit CartoonSmart.com