Gregor Menih
Gregor Menih

Reputation: 5126

Hide HTML5 Audio/Video notification in Android Chrome

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

Answers (2)

Amit Bhagra
Amit Bhagra

Reputation: 11

Below code works for me

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

Upvotes: 1

Prabhakar
Prabhakar

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

Related Questions