-
Notifications
You must be signed in to change notification settings - Fork 206
feat: ✨Add waveform extraction controller #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ✨Add waveform extraction controller #416
Conversation
407dfb8 to
2e69aea
Compare
lib/src/audio_file_waveforms.dart
Outdated
| } else { | ||
| if (playerController.waveformData.isNotEmpty) { | ||
| _addWaveformData(playerController.waveformData); | ||
| if (playerController.waveformExtraction.waveformData.isNotEmpty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take waveformExtraction into separate variable
| @@ -0,0 +1,56 @@ | |||
| part of 'player_controller.dart'; | |||
|
|
|||
| class WaveformExtractionController { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please docs above this and also above constructor.
|
|
||
| final List<double> _waveformData = []; | ||
|
|
||
| List<double> get waveformData => _waveformData.toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here as well
7605f27 to
11044ca
Compare
2e69aea to
92c9821
Compare
11044ca to
6367e36
Compare
92c9821 to
70f5191
Compare
fff12e1 to
171339b
Compare
| /// An unique key string associated with [this] player only | ||
| final playerKey = shortHash(UniqueKey()); | ||
|
|
||
| late final waveformExtraction = WaveformExtractionController._(playerKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add smaller docs comments here as well
|
|
||
| /// WaveformExtractionController is used for | ||
| /// extraction of waveform data as List<double>, | ||
| /// which can be used to show [AudioWaveforms] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// which can be used to show [AudioWaveforms] | |
| /// which can be used to show **Audio Waveforms** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In dart documentation comment if we add class name as [AudioWaveforms], then user can easily navigate to that class, so instead using [AudioFileWaveforms] here, which is a proper widget class ref.
171339b to
ec51d36
Compare
ec51d36 to
5c92ffc
Compare
Add WaveformExtractionController and migrate below methods and getters into it.