Reputation: 5126
I have an HTML5 Audio element on my web app. At some point, I programmatically stop the playback, using this code:
audioElement.pause();
audioElement.currentTime = 0;
When the audio is playing, there is a notification on my Android device (using Google Chrome). I would expect this notification to disappear once I stop the playback, but it doesn't.
How do I remove the notification?
Upvotes: 2
Views: 1659
Reputation: 11
Below code works for me
audioElement.pause();
audioElement.currentTime = 0;
audioElement.load();
Upvotes: 1
Reputation: 11
you can do this by setting src attribute to blank and load it again. below is line of code
audioElement.setAttribute('src', ''); audioElement.load();
it worked for me for Video element but for same problem. Happy Coding.....
Upvotes: 1