From 495a79d4bfe7434bf9951570ae4b47c10cd26ba0 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Thu, 11 Jan 2018 17:51:58 +0100 Subject: [PATCH] Implemented setRate method --- src/sound/html5/HTML5AudioSound.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index b55068b44..9d911cba7 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -79,6 +79,12 @@ var HTML5AudioSound = new Class({ if (this.audio) { this.audio.volume = this.currentConfig.volume * this.manager.volume; } + }, + setRate: function () { + BaseSound.prototype.setRate.call(this); + if (this.audio) { + this.audio.playbackRate = this.totalRate; + } } }); module.exports = HTML5AudioSound;