You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked at the "Examples" folder in the repo but it's not very clear how this would work with a playing audio. I am able to display the waveform and I can tap to change the highlighted part of the waveform, but I can't figure out how to connect this progress to the playing audio file. Please help.
The text was updated successfully, but these errors were encountered:
I know this is probably no longer needed by either of you but perhaps this can help a future user:
In viewDidLoad(), add your FDWaveformView as per your specification (in this example, I used interface builder and my IBOutlet is called waveView). Ensure scrolling is enabled for your waveform:
I'm using a button to trigger playback in this example. Upon pressing the button when no file is playing, I call this function. The animation time parameter is set to equal the length of the audio file for fairly obvious reasons. (NOTE: without the .curveLinear option, the 'scroll' will be out-of-sync. This was unfortunately not apparent in the example project but thankfully I realised it was a non-linear response after some trial and error):
Upon finishing the audio playback, I reset the 'progress' by triggering this method:
Hopefully this helps! I'm fairly new to software development so forgive me if there's any glaring 'no-no's.
EDIT:
I've found that stopping this animation in the middle can be glitchy at best. My code is now using UIViewPropertyAnimator which is working perfectly:
fulldecent
changed the title
Are there any examples of the waveform progress updating as an audio file plays?
BLOCKED ON ISSUE 139 ## Are there any examples of the waveform progress updating as an audio file plays?
Sep 13, 2020
I looked at the "Examples" folder in the repo but it's not very clear how this would work with a playing audio. I am able to display the waveform and I can tap to change the highlighted part of the waveform, but I can't figure out how to connect this progress to the playing audio file. Please help.
The text was updated successfully, but these errors were encountered: