Prevent html5 video background to stop "spotify"

Hi guys,

I’m trying to figure it out how to prevent my html5 video background to stop “Spotify” stream.

Looked on internet, but unfortunately I didn’t found anything.

Any idea on how to achieve this ? I want to have a video as background, without stop the background music app such as “spotify”



I added this line

AVAudioSession *audioSession = [AVAudioSession sharedInstance];

BOOL ok;

NSError *setCategoryError = nil;

ok = [audioSession setCategory:AVAudioSessionCategoryAmbient


if (!ok) {

    NSLog(@"%s setCategoryError=%@", __PRETTY_FUNCTION__, setCategoryError);


to AppDelegate.m - remember also to:

#import <AVFoundation/AVFoundation.h>

In few words this option will move the audio session of all html5 video (and of the entire app) to another level in this way the main one (spotify) will continue play.

But what if am I executing this in Android? Does it not exists a solution directly in html ?

Have you tried with the “muted” property in the html tag ? Also removing the audio from the source file.