diff --git a/engine/core/Engine.ts b/engine/core/Engine.ts index 89151f8..df79f52 100644 --- a/engine/core/Engine.ts +++ b/engine/core/Engine.ts @@ -117,6 +117,14 @@ export class Engine { .map(s => this.videoManager.resolveVideoUrl(s!, this.videoManager.streamingQuality)) this.videoManager.onEnd(() => { + if (this.loopActive && scene.loopEnd) { + this.videoManager.seekTo(scene.loopStart!) + return + } + if (scene.loopStart && !this.loopActive) { + this.checkLoop(scene.loopEnd || scene.loopStart) + return + } if (!this.qteTriggered || this.qteResolved) { this.emit('videoEnd', scene) this.onVideoEnd(scene)