The reason I suggested wtu.startPlayingAndWaitForVideo rather than wtu.registerVideoPlayingCallback is the steps required to get video to start have changed over time.

For example, if video can not play by default (Android, iOS) then wrapping "play" in a function lets us do stuff across all tests to get around that (like testRunner.allowVideoWithoutUserGesture = true) etc...

In other words, I'm suggesting

    video.loop = true;
    video.play(); 

should be inside a shared function.