瀏覽代碼

showRecordingLength option was removed, always clearInterval (#3351)

Artur Paikin 3 年之前
父節點
當前提交
f65317465d
共有 1 個文件被更改,包括 3 次插入8 次删除
  1. 3 8
      packages/@uppy/audio/src/index.js

+ 3 - 8
packages/@uppy/audio/src/index.js

@@ -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(() => {
@@ -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)
       })
     }