I need to Loop the video. How to get a callback when video has been ended. I need to loop it till user is tracking that video
private func addVideoNode(bundleFileName: String, forTrackableImage imageTrackable: ARImageTrackable?){
// Initialise video node
let videoNode = ARVideoNode(bundledFile: bundleFileName)
// Add video node to image trackable
imageTrackable?.world.addChild(videoNode)
// Video scale
let scale = Float(imageTrackable?.width ?? 0) / Float(videoNode?.videoTexture.width ?? 0)
videoNode?.scale(byUniform: scale)
videoNode?.visible = false
videoNode?.play()
}
Register as a delegate on the ARPlayableTexture property of your video node.
The delegate gets a callback once the video is finished playing: https://www.kudan.eu/docs-reference/iOSDocs/protocol_a_r_playable_texture_delegate_01-p.html.