ionic-audio
ionic-audio copied to clipboard
Pause while fast-forwarding
Oops, sorry about the typo in the headline. The enter key posted way before I was finished :)
Anyway, thanks for this nice plugin. I have one thing that though. Is it possible to pause the audio automatic while fast-forwarding? It seems the knob jumps around trying to figure out where my finger is and where the audio is currently at. Pausing the audio manually first solves this.
Thanks in advance
To answer my own question this seems to do what I want
In view
<div item-content style="width:100%;" (touchstart)="touchstart($event) (touchend)="touchend($event)">
<audio-track-progress-bar duration progress [audioTrack]="track"></audio-track-progress-bar>
</div>
In component
public touchstart($event)
{
let track = this._audioProvider.tracks[this._audioProvider.current];
if ( track )
{
track.pause();
}
}
public touchend($event)
{
let track = this._audioProvider.tracks[this._audioProvider.current];
if ( track )
{
track.play();
}
}
Hi @betatools Great that you figured that out! I would have never guessed that one 😃