Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML embed autoplay="false", but still plays automatically

Tags:

html

audio

On the front page of this website, there is a sticky post titled "National Radio Advertising Campaign ForACURE" which contains the following HTML:

<embed type="audio/x-wav" src="http://www.foracure.org.au/wp-content/uploads/FOR-A-CURE-RADIO-Daniel-45sec.mp3" autoplay="false" height="20" width="200" autostart="false">

However, when I load this website in Chrome v31.0.1650.57 m, the audio plays automatically, even though both autoplay and autostart are set to false.

Is there a better cross browser method of embedding this audio?

like image 295
Steve Avatar asked Nov 29 '13 13:11

Steve


People also ask

How do I stop videos from playing automatically in HTML?

First, launch Chrome on your phone or tablet and go to Settings > Site Settings. Next, scroll down the menu and tap on Media, and then Autoplay and toggle the switch off.

How Do I Stop Autoplay from embedded tags?

To disable video autoplay, autoplay="false" will not work; the video will autoplay if the attribute is there in the <video> tag at all. To remove autoplay, the attribute needs to be removed altogether.

How do you embed an HTML file automatically?

The <vid eo> element allows us to embed video files into an HTML, very similar to the way images are embedded. Attributes we can include are: src This attribute stands for the source, which is very similar to the src attribute used in the image element. We will add the link to a video file in the src attribute.


1 Answers

Chrome doesn't seem to understand true and false. Use autostart="1" and autostart="0" instead.


Source: (Google Groups: https://productforums.google.com/forum/#!topic/chrome/LkA8FoBoleU)

like image 83
Esteban R V Avatar answered Sep 23 '22 18:09

Esteban R V