Created
November 14, 2014 11:48
-
-
Save tai2/e74fef5797f1d80f6147 to your computer and use it in GitHub Desktop.
web audio test 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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