I\'ve been experimenting with connecting an audio element to the web audio api using createMediaElementSource and got it to work but one thing I need to do is change the pla
You have to set the playback rate after the audio has started playing. The only portable way I have found to make this work, is by waiting until you get a timeupdate
event with valid currentTime
:
_audio.addEventListener('timeupdate', function(){
_if(!isNaN(audio.currentTime)) {
_audio.playbackRate = 0.6;
}
});
Note that playback rate isn't currently supported on android and that Chrome (on desktop) doesn't support playback rates lower than 0.5.
Which browser are you using to test this? It seems this is not yet implemented in Firefox, but should be working on Chrome.
Mozilla bug for implementing playbackRate: https://bugzilla.mozilla.org/show_bug.cgi?id=495040