JSFiddle - React, Tailwind, and code Playground

by Grant Pax

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.2/modernizr.min.js"></script>
<p id="output">not run</p>

JavaScript

// If you want more documentation, scroll to the bottom.

// "waitTime" is the time (ms) to wait for the audio listener to run before returning.
var waitTime = 100; //This could be as low as 5ms (on a great day) and as high as 1000ms to get consistent results.

console.time("time to check for audio autoplay");
console.log("checking if Audio().autoplay is enabled...");
document.getElementById("output").innerHTML = "running...";

// Audio file data URIs from comments in
// [this gist](https://gist.github.com/westonruter/253174)
// via [mudcube](https://github.com/mudcube)
var mp3 = 'data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';
var ogg =...