A couple things to note. There is a way to carousel, but there's a known bug with that. That would be the optimal way to do this, as it's a property you'd set in the playlist's constructor and no other code would be necessary. In the meantime you could do the above. It's essentially the same thing, just more code.
We have a patch for that and some other things that we are going to release soon. One of the other known issues is the engine crashing when trying to switch to another stream when one is currently playing. This shouldn't effect your use case.
Sadly not working for me, simulator ( Gstreamer specifically) crashes when i do that and trying to load that on the tv just makes it stop and reset, i've found away around it in the meantime, on playlist end i just set a boolean videoEnded to true, and on the onTransportButtonPress event ot the mediatransport overlay i check for the payload 'playpause'. If i'm there and videoEnded is true i reset the flag to false and recall my function for loading the video. Just a little hack that seems to work for now :D