Created
January 13, 2012 23:54
-
-
Save temperatio/1609432 to your computer and use it in GitHub Desktop.
Audio Test with Lungo.JS
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
var App = (function(lng, undefined) { | |
//Define your LungoJS Application Instance | |
lng.App.init({ | |
name: 'Audio Test', | |
version: '0.1' | |
}); | |
return { | |
}; | |
})(LUNGO); |
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
App.Events = (function(lng, app, undefined) { | |
LUNGO.Dom.Event.bind('#playbtn', 'TAP', function(event){ | |
var s = $('#snd').get(0); | |
console.log('S: %o', s); | |
s.play(); | |
} ) | |
return { | |
} | |
})(LUNGO, App); |
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 manifest="index.appcache"> | |
<head> | |
<meta charset="utf-8"> | |
<title>LungoJS</title> | |
<meta name="description" content=""> | |
<meta name="author" content="Javier Jim�nez Villar (@soyjavi)"> | |
<!-- Mobile viewport optimization http://goo.gl/b9SaQ --> | |
<meta name="HandheldFriendly" content="True"> | |
<meta name="MobileOptimized" content="320"> | |
<meta http-equiv="cleartype" content="on"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<!-- For iPhone 4 with high-resolution Retina display: --> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/[email protected]"> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/icon-72.png"> | |
<link rel="apple-touch-icon-precomposed" href="assets/images/icon.png"> | |
<link rel="apple-touch-startup-image" href="assets/images/default.png"> | |
<!-- Main Stylesheet --> | |
<link rel="stylesheet" href="./lungo.js/lungo-1.0.4.min.css"> | |
<link rel="stylesheet" href="./lungo.js/lungo-1.0.4.min.icons.css"> | |
<link rel="stylesheet" href="./lungo.js/lungo.theme.default.css"> | |
</head> | |
<body class="app"> | |
<!-- | |
First, you have to do is create a LungoJS Application instance in the file app.js. | |
...and use a Webkit browser as Chrome or Safari. | |
--> | |
<section id="hello_world"> | |
<header data-title="Hello world!"></header> | |
<article> | |
<audio id="snd"> | |
<source src="assets/gato01.m4a"> | |
<source src="assets/gato01.mp3"> | |
</audio> | |
<a href="#" class="button" data-icon="play" id="playbtn"></a> | |
</article> | |
<footer></footer> | |
</section> | |
<!-- LungoJS (Production mode) --> | |
<script src="lungo.js/lungo-1.0.4.packed.js"></script> | |
<!-- LungoJS - Sandbox App --> | |
<script src="app/app.js"></script> | |
<script src="app/data.js"></script> | |
<script src="app/events.js"></script> | |
<script src="app/services.js"></script> | |
<script src="app/view.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment