Video getProgress() problem

I am trying to auto switch scene once the video finished (e.g. progress = 1). I am able to get the duration of my video, but somehow the progress is always 0. Is there anyway I can fix this?

 this.vid = this.add.video(gameWidth/2, gameHeight/2, 'sink');
 this.vid.play(false); //no loop
 this.vid.getDuration()); // duration = 3.19 sec
 this.vid.getProgress(); //somehow always 0

Best,
QN

I don’t think the video plays immediately. You’d have to check getProgress() later.

But probably you could use the VIDEO_COMPLETE event for this instead.

2 Likes