Skip to content

Commit

Permalink
Updated README and library to version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wqian94 committed Jun 22, 2016
1 parent 7cf36d0 commit ecb9453
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AuO version 1.1 (stable)
AuO version 1.2 (stable)
===
AuO (IPA: /ao/), a browser-based audio recording and editing application. Uses browser-native
technologies to avoid third-party dependencies.
Expand All @@ -16,11 +16,15 @@ Include AuO in any application by including AuO.js. Then, create an instance wit
const auo = new AuO(link_to_server_url, save_callback_function);
```

where `link_to_server` is the URL to upload audio clips and `save_callback_function` is the
callback function used to process the server's response after uploading the saved audio file.
To use the default callback (a prompt box that displays the server's response), only set
`link_to_server_url`. To disable online saving, create an instance without any parameters, e.g.
`new AuO()`.
where `link_to_server` is the URL to upload audio clips and `save_callback_function` is the callback
function used to process the server's response after uploading the saved audio file. To use the
default callback (a prompt box that displays the server's response), only set `link_to_server_url`.

If `link_to_server_url` is null, then `save_callback_function` is called with the audio Blob as its
sole parameter, instead of a server response. If both `link_to_server_url` and
`save_callback_function` are omitted or null (both default to null), then the default local save
handler is invoked on save. This triggers the download of the audio recording with the name
`recording.ext` where `ext` is the appropriate extension for the save format chosen from the UI.

To launch AuO, simply call

Expand Down Expand Up @@ -172,7 +176,12 @@ position as it can.

By clicking the `Save` button, the user can upload the trimmed audio recording to the server, which
should reply with a link to the saved audio clip. The user can retrieve this link from the dialog
box that pops up when the saving has succeeded.
box that pops up when the saving has succeeded. Both of these behaviors can be changed by altering
the server code as well as the callback handler.

If the server URL has been omitted or set to null, then clicking the `Save` button will instead
trigger a local file download by default, though this can also be altered by passing in a callback
handler that receives the audio Blob.

Users can choose the format in which AuO will save the audio recording by selecting the format from
the dropdown menu next to the `Save` button.
Expand Down
2 changes: 1 addition & 1 deletion lib/AuO.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* AuO.js
*
* Version 1.1 (stable) distribution.
* Version 1.2 (stable) distribution.
*
* Main entry point for the AuO library. Create a new instance of AuO by calling new AuO(). Calling
* launch() adds the instance to the DOM tree, and calling suspend() removes the instance from the
Expand Down

0 comments on commit ecb9453

Please sign in to comment.