What I'm trying to do is have it so that when the page loads have it play highpitchsound.wav (or .mp3) for x amount of seconds the user defines in an alertbox on page load.
In the alertbox there's a textbox, and a button "Confirm". The default text is 5 for 5s, or 5000 for 5000ms.
I've used intervals with jquery before, messed with audio in html5 a couple times here, and there, not sure how to combine the two for this, and also don't know how I'd make a custom alertbox onload.
<html>
<head>
<title>Audio Play Interval</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
});
</script>
</head>
<body>
<audio autoplay="true">
<source src="sounds/highpitchsound.mp3" type="audio/mpeg" />
<source src="sounds/highpitchsound.wav" type="audio/wav" />
<source src="sounds/highpitchsound.ogg" type="audio/ogg" />
Your browser does not support the audio element.
</audio>
</body>
</html>