From e8d93b5054c0a9acf2049b02d80add9af0e4e78b Mon Sep 17 00:00:00 2001 From: entonbiba Date: Fri, 27 Jan 2017 19:50:22 -0500 Subject: [PATCH] add wavesurfer.getPlaybackRate() (#939) add getPlaybackRate method and return playback rate. --- src/wavesurfer.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wavesurfer.js b/src/wavesurfer.js index b3f6df678..dbbd296cf 100755 --- a/src/wavesurfer.js +++ b/src/wavesurfer.js @@ -736,6 +736,15 @@ export default class WaveSurfer extends util.Observer { this.backend.setPlaybackRate(rate); } + /** + * Get the playback rate. + * + * @return {number} + */ + getPlaybackRate() { + return this.backend.getPlaybackRate(); + } + /** * Toggle the volume on and off. It not currenly muted it will save the * current volume value and turn the volume off. If currently muted then it