Prechádzať zdrojové kódy

showRecordingLength option was removed, always clearInterval (#3351)

Artur Paikin 3 rokov pred
rodič
commit
f65317465d
1 zmenil súbory, kde vykonal 3 pridanie a 8 odobranie
  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)
       })
     }