Skip to content

Instantly share code, notes, and snippets.

@tai2
Created November 14, 2014 11:48
Show Gist options
  • Select an option

  • Save tai2/e74fef5797f1d80f6147 to your computer and use it in GitHub Desktop.

Select an option

Save tai2/e74fef5797f1d80f6147 to your computer and use it in GitHub Desktop.
web audio test 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Audio Test</title>
</head>
<body>
<h1>Web Audio Test</h1>
<div>
<audio id="music1" src="http://1.ice1.firststreaming.com:8000/gndr_fm.mp3" loop></audio>
</div>
<script>
(function() {
var music1 = document.getElementById('music1');
music1.isPlayed = false;
window.ontouchmove = function() {
console.log('touchmove');
if (!music1.isPlayed) {
music1.play();
music1.isPlayed = true;
}
}
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment