Skip to content

Commit bcb6dae

Browse files
committed
Update readme
1 parent 72b7d1e commit bcb6dae

File tree

1 file changed

+43
-13
lines changed

1 file changed

+43
-13
lines changed

README.md

+43-13
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,58 @@ and whose source code can be found on our [Github](https://github.com/audiocogs/
2020
Aurora.js was written by [@jensnockert](https://github.com/jensnockert) and [@devongovett](https://github.com/devongovett)
2121
of [Audiocogs](https://github.com/audiocogs/).
2222

23-
## Building
23+
## Usage
24+
25+
You can use Aurora.js both in the browser, as well as in Node.js. In the browser,
26+
you can either download a prebuilt [release](https://github.com/audiocogs/aurora.js/releases)
27+
or use [browserify](https://github.com/substack/node-browserify) to build it into your own
28+
app bundle (see below for Node.js usage - it's the same for browserify).
29+
30+
```html
31+
<script src="aurora.js"></script>
32+
<script src="mp3.js"></script>
33+
<!-- more codecs here -->
34+
```
2435

25-
Currently, the [importer](https://github.com/devongovett/importer) module is used to build Aurora.js. You can run
26-
the development server by first installing `importer` with npm, and then running it like this:
36+
To use Aurora.js in Node.js or a browserify build, you can install it from `npm`:
2737

28-
npm install importer -g
29-
importer browser.coffee -p 8080
38+
npm install av
3039

31-
You can also build a static version like this:
40+
Then, require the module and codecs you need:
41+
42+
```javascript
43+
var AV = require('av');
44+
require('mp3');
45+
// more codecs here...
46+
```
47+
48+
For much more detailed information on how to use Aurora.js, check out the
49+
[documentation](https://github.com/audiocogs/aurora.js/wiki).
50+
51+
## Building
52+
53+
We use [browserify](https://github.com/substack/node-browserify) to build Aurora.js. To build Aurora.js
54+
for the browser yourself, use the following commands:
3255

33-
importer browser.coffee aurora.js
56+
npm install
57+
make browser
3458

35-
By itself, Aurora will play LPCM, uLaw and aLaw files in a number of containers. Be sure to add additional codec support
36-
by including some of our other decoders such as [FLAC.js](https://github.com/audiocogs/flac.js),
37-
[ALAC.js](https://github.com/audiocogs/alac.js), and [MP3.js](https://github.com/devongovett/mp3.js).
59+
This will place a built `aurora.js` file, as well as a source map in the `build/` directory.
60+
61+
By itself, Aurora will play LPCM, uLaw and aLaw files in a number of containers.
62+
Be sure to add additional codec support by including some of our other decoders:
3863

39-
If you want to build Aurora without the default codecs, you can use the "browser_slim.coffee" profile:
64+
* [FLAC.js](https://github.com/audiocogs/flac.js)
65+
* [ALAC.js](https://github.com/audiocogs/alac.js)
66+
* [MP3.js](https://github.com/audiocogs/mp3.js)
67+
* [AAC.js](https://github.com/audiocogs/aac.js)
4068

41-
importer browser_slim.coffee aurora.js
69+
If you want to build Aurora without the default codecs, you can use the "browser_slim" profile:
70+
71+
make browser_slim
4272

4373
This can help shave off approx. 30 KB from the joined file, or 20 KB when minified.
44-
74+
4575
## License
4676

4777
Aurora.js is released under the MIT license.

0 commit comments

Comments
 (0)