Casey Dwayne
Casey Dwayne

Reputation: 2169

Muting all browser audio with javascript

I'm doubting this is even possible but it would be a big help.

I'm throwing together a portfolio and bringing in external sites via ajax to fit in nice little "3D" containers.

The problem is.. 2 of them have audio that autostarts (yes, generally a bad practice but they work on these 2 pages).

One is html5 audio - simple enough, just .volume and set it to 0.

The other is an .swf. file. I'd like to mute ALL of the elements on the page, if possible.

Upvotes: 0

Views: 323

Answers (1)

stormdrain
stormdrain

Reputation: 7895

Do you control the swf's? If so, turn it off. Or add a variable to the swf take a parameter to control the volume (e.g. http://example.com/myswf.swf?volume=0).

Otherwise, it's not possible.

Upvotes: 1

Related Questions