Hide HTML5 audio / video notification in Android Chrome

I have an HTML5 Audio element in my web application. At some point, I programmatically stop playback using this code:

audioElement.pause(); audioElement.currentTime = 0; 

When sound plays, a notification appears on my Android device (using Google Chrome). I expect this notification to disappear as soon as I stop playback, but it is not.

How to delete a notification?

+1
javascript html5 google-chrome html5-audio
source share
2 answers

you can do this by setting the src attribute to empty and reload. below is a line of code

audioElement.setAttribute ('src', ''); audioElement.load ();

it worked for me for the Video element, but for the same problem. Happy coding .....

+1
source share

Below code works for me

 audioElement.pause(); audioElement.currentTime = 0; audioElement.load(); 
0
source share

All Articles