Skip to content

Loop replay takes a while to start #7

Description

@normanr

If the loop is 10s long, then it only starts playing 10s after recordStop. This is because window.setInterval doesn't run the function immediately, but rather only after interval.

So I would recommend changing recordStop to have:

if (data.length) {
    loopInterval = window.setInterval(playLoop, totalTime, data);
    playLoop(data);
}

and remove the setInterval logic from playLoop, so that the loop is played as soon as the recording is stopped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions