Skip to content

Commit

Permalink
showRecordingLength option was removed, always clearInterval (#3351)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturi committed Dec 9, 2021
1 parent 12e2fab commit f653174
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/@uppy/audio/src/index.js
Expand Up @@ -166,11 +166,8 @@ module.exports = class Audio extends UIPlugin {
})
this.#recorder.stop()

if (this.opts.showRecordingLength) {
// Stop the recordingLengthTimer if we are showing the recording length.
clearInterval(this.recordingLengthTimer)
this.setPluginState({ recordingLengthSeconds: 0 })
}
clearInterval(this.recordingLengthTimer)
this.setPluginState({ recordingLengthSeconds: 0 })
})

return stopped.then(() => {
Expand Down Expand Up @@ -230,9 +227,7 @@ module.exports = class Audio extends UIPlugin {
this.#recorder.addEventListener('stop', resolve, { once: true })
this.#recorder.stop()

if (this.opts.showRecordingLength) {
clearInterval(this.recordingLengthTimer)
}
clearInterval(this.recordingLengthTimer)
})
}

Expand Down

0 comments on commit f653174

Please sign in to comment.