prefix file paths, add getUserMedia check, remove unused libs and shims, add getUserMedia module, button image and style to make it show up
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
"html5-boilerplate": "~4.3.0",
|
"html5-boilerplate": "~4.3.0",
|
||||||
"requirejs": "~2.1.11",
|
"requirejs": "~2.1.11",
|
||||||
"less": "~1.7.0",
|
"less": "~1.7.0",
|
||||||
"backbone": "~1.1.2",
|
|
||||||
"lodash": "~2.4.1",
|
"lodash": "~2.4.1",
|
||||||
"jquery": "~2.1.0",
|
"jquery": "~2.1.0",
|
||||||
"bluebird": "~1.2.3",
|
"bluebird": "~1.2.3",
|
||||||
|
|||||||
BIN
public/img/button.jpg
Normal file
BIN
public/img/button.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -12,9 +12,11 @@
|
|||||||
|
|
||||||
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/normalize.css">
|
<link rel="stylesheet" href="/css/normalize.css">
|
||||||
<link rel="stylesheet" href="css/main.css">
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
<script src="vendor/modernizr/modernizr.js"></script>
|
<link rel="stylesheet" href="/css/app.css">
|
||||||
|
<script src="/vendor/modernizr/modernizr.js"></script>
|
||||||
|
<script src="/vendor/modernizr/feature-detects/getusermedia.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--[if lt IE 8]>
|
<!--[if lt IE 8]>
|
||||||
@@ -22,9 +24,10 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<!-- Add your site or application content here -->
|
<!-- Add your site or application content here -->
|
||||||
<p>Hello world! This is prototool.</p>
|
<p>Record all the audio</p>
|
||||||
|
|
||||||
|
<div class="button record"><input type="file" accept="audio/*;capture=microphone"></div>
|
||||||
|
|
||||||
<script src="vendor/requirejs/require.js" data-main="js/main"></script>
|
<script src="/vendor/requirejs/require.js" data-main="js/main"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
define (require) ->
|
define (require) ->
|
||||||
console.log('hello');
|
if (! Modernizr.getusermedia)
|
||||||
|
alert("Can't access your media :(")
|
||||||
|
return
|
||||||
|
|
||||||
|
getUserMedia = require('getUserMedia')
|
||||||
|
|||||||
3
src/coffee/getUserMedia.coffee
Normal file
3
src/coffee/getUserMedia.coffee
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
define (require) ->
|
||||||
|
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia
|
||||||
|
return navigator.getUserMedia
|
||||||
@@ -9,42 +9,16 @@ requirejs.config
|
|||||||
baseUrl: "/js"
|
baseUrl: "/js"
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
jsx: BOWERPATH + "require-jsx/jsx"
|
|
||||||
text: BOWERPATH + "requirejs-plugins/lib/text"
|
text: BOWERPATH + "requirejs-plugins/lib/text"
|
||||||
async: BOWERPATH + "requirejs-plugins/src/async"
|
async: BOWERPATH + "requirejs-plugins/src/async"
|
||||||
json: BOWERPATH + "requirejs-plugins/src/json"
|
json: BOWERPATH + "requirejs-plugins/src/json"
|
||||||
backbone: BOWERPATH + "backbone/backbone"
|
|
||||||
lodash: BOWERPATH + "lodash/dist/lodash.underscore"
|
lodash: BOWERPATH + "lodash/dist/lodash.underscore"
|
||||||
jquery: BOWERPATH + "jquery/dist/jquery"
|
jquery: BOWERPATH + "jquery/dist/jquery"
|
||||||
bluebird: BOWERPATH + "bluebird/js/browser/bluebird"
|
bluebird: BOWERPATH + "bluebird/js/browser/bluebird"
|
||||||
react: BOWERPATH + "react/react"
|
|
||||||
JSXTransformer: BOWERPATH + "react/JSXTransformer"
|
|
||||||
bacon: BOWERPATH + "bacon/dist/Bacon"
|
|
||||||
"react-bacon": NODEPATH + "react-bacon/dist/react-bacon"
|
|
||||||
|
|
||||||
shim:
|
|
||||||
backbone:
|
|
||||||
deps: [
|
|
||||||
"jquery"
|
|
||||||
"lodash"
|
|
||||||
]
|
|
||||||
exports: "Backbone"
|
|
||||||
|
|
||||||
JSXTransformer:
|
|
||||||
exports: "JSXTransformer"
|
|
||||||
|
|
||||||
"react-bacon":
|
|
||||||
deps: [
|
|
||||||
"bacon"
|
|
||||||
"react"
|
|
||||||
]
|
|
||||||
|
|
||||||
urlArgs: (new Date()).getTime() # Disable caching
|
urlArgs: (new Date()).getTime() # Disable caching
|
||||||
|
|
||||||
|
|
||||||
# Add Google Maps shim
|
# Add Google Maps shim
|
||||||
define "gmaps", ["async!//maps.google.com/maps/api/js?client=gme-colonyamericanhomes&v=3.exp&sensor=false"], ->
|
define (require) ->
|
||||||
"use strict"
|
|
||||||
return window.google.maps
|
|
||||||
|
|
||||||
require ['app']
|
require ['app']
|
||||||
6
src/less/app.less
Normal file
6
src/less/app.less
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.button.record {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background: 0 0 url(/img/button.jpg) no-repeat;
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user