Reputation: 3097
playbackRate is not working in mobile browsers (Iphone and Android). Following is the code. When playing in the desktop browsers everything seems to be ok.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<audio src="./audio/Kalimba.mp3" id="audio1" controls>Canvas not supported</audio>
<button id="playbutton" >Play</button>
</body>
<script type="text/javascript" >
$(document).ready(function (e) {
$('#playbutton').click(function () {
var audioElm = document.getElementById("audio1");
var playBackSpeed = 0.5;
audioElm = document.getElementById("audio1");
audioElm.playbackRate = playBackSpeed; // default speed 1
audioElm.play();
});
});
</script>
</html>
Upvotes: 1
Views: 733
Reputation: 667
Looks like the feature support is limited in few mobile devices.
Reference:
A screenshot from the above page below...
Upvotes: 2