waveform_recorder 2.0.0
waveform_recorder: ^2.0.0 copied to clipboard
A Flutter package for recording audio with real-time waveform visualization, ideal for voice messaging and audio recording features in chat applications.
2.0.0 #
- Breaking: move to cross_file
0.4, whose
XFiledropspath,mimeTypeand the synchronousname.WaveformRecorderController.fileis now aFileSystemXFileon native platforms (use itspath) and aScopedStorageXFilewrapping the blob URL on the web (use itsuri). See "Upgrading to 2.0" in the README. - Add
WaveformRecorderController.fileNameandmimeType, which carry the name and content type that used to live on theXFile. - Re-export
XFile,FileSystemXFileandScopedStorageXFile, so apps don't need their own cross_file dependency. - Breaking: require Dart 3.11 / Flutter 3.41 or later, as cross_file 0.4 does.
- Add on-device integration tests to the example for starting a recording with
the microphone permission denied and granted; see
example/integration_test/README.md. - Also includes everything listed for 1.8.2, which was never published on its own.
1.8.2 #
- Fix #12 again, this
time on the start side:
startRecording()marked the controller as recording before the amplitude stream existed, so anything that rebuilt during the (potentially long) permission prompt readamplitudeStreamand gotException('Not recording')thrown out ofbuild. The recording session is now published in a single step, soisRecordingis never true without a liveamplitudeStream. amplitudeStreamnow returns an empty stream instead of throwing when not recording, makingWaveformRecordersafe to mount in any controller state.- Add
WaveformRecorderController.isStartingso apps can disable a record button or show a spinner while the recorder spins up. - A failed
startRecording()(e.g. a denied permission) now leaves the controller idle and reusable instead of stuck reportingAlready recording. startRecording()now throwsException('Microphone permission denied')when the user denies microphone access, instead of ignoring the denial and starting a recorder that captures nothing (or, on the web, failing with a bareNotAllowedError). Thanks to @dorklein for the PR.- The example app now shows a
SnackBarwhen recording can't start, and its macOS runner declaresNSMicrophoneUsageDescription; without it, macOS killed the example the first time it asked for the microphone. onRecordingStoppednow fires only on an actual recording -> stopped transition.- Reset the elapsed-time stopwatch on
startRecording()so a recording that followsclear()reports the correct length. - Bump the
cross_fileandpath_providerconstraints to the versions they already resolve to. - Update the example's platform projects so it builds on Flutter 3.47: the iOS runner drops CocoaPods for Swift Package Manager (as macOS did in 1.8.1) and picks up the UIScene lifecycle; Android moves to Gradle 9.3.1, AGP 9.1.0, Kotlin 2.4.0 and NDK 28.2.
1.8.1 #
- Fix #12:
prevent
WaveformRecorderfrom throwing when it rebuilds after recording stops. - Fix macOS playback immediately after recording by waiting for the temporary audio file to be readable before exposing it.
- Update to
record7.1.1 and migrate the macOS example away from CocoaPods plugin integration.
1.8.0 #
- Thanks to @dickverweij for the PR to add audio interruption support.
1.7.0 #
1.6.3 #
- another screenshot tweak
1.6.2 #
- README screenshot tweak
1.6.1 #
-
fix #8: Display waveform if not recording; exposed
amplitudeStreamfrom theWaveformRecorderControlleras a broadcast stream to enable listeners to gather the amplitudes for their own purpose, e.g. to show their own waveform -
added a
WaveformController.clear()method to reset the controller back to the original state -
updated the example app to show the waveform after it's been recorded (although it's pretty ugly as it is; PRs appreciated!)
-
updated the example app to allow for deleted the recorded file
-
updated the example app to allow for downloading the recorded file
1.3.1 #
-
Add an on waveController.cancel option to it #3
-
README tweak
1.3.0 #
- downgraded the SDK requiredment to allow for more users
1.2.2 #
- setting file name extension and mimetype based on audio encoder
- moved
Uri url=>XFile filefor split of path and name (necessary on the web) - downgraded the SDK requiredment to allow for more users
1.2.1 #
- improved audio playback in the sample
1.2 #
- change onStartRecording => onRecordingStarted
- change onEndRecording => onRecordingStopped
- fixed issue on second recording -- yay asserts!
1.0.1 #
- fix missing file.
1.0.0 #
- initial release.