Files
cromite/autoplay.html
2020-11-09 17:43:37 +01:00

37 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<iframe src="https://upload.wikimedia.org/wikipedia/commons/8/83/Artis%2C_enkele_flamingo%27s_-_SoundCloud_-_Beeld_en_Geluid.ogg" allow="autoplay" id="iframeAudio"></iframe>
<audio controls autoplay id="myAudio">
<!-- One or more source files, each referencing the same audio but in a different file format.
The browser will choose the first file which it is able to play. -->
<source src="https://upload.wikimedia.org/wikipedia/commons/8/83/Artis%2C_enkele_flamingo%27s_-_SoundCloud_-_Beeld_en_Geluid.ogg">
You will see this text if native audio playback is not supported.
<!-- You could use this fall-back feature to insert a JavaScript-based audio player. -->
</audio>
<small>Audio by <a href="https://soundcloud.com/beeldengeluid">Beeld en Geluid</a>
[<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a>],
<a href="https://commons.wikimedia.org/wiki/File%3AArtis%2C_enkele_flamingo&#039;s_-_SoundCloud_-_Beeld_en_Geluid.ogg">via Wikimedia Commons</a>
</small>
<style>
#audio-example {
display: block;
}
</style>
Read more: https://html.com/attributes/audio-autoplay/#ixzz6dCxFrzCr
<script type="text/javascript">
document.getElementById("myAudio").play();
</script>
</body>
</html>