Skip to content

Commit

Permalink
Version bump: 0.7.19
Browse files Browse the repository at this point in the history
  • Loading branch information
kbumsik committed Jun 24, 2019
1 parent d7e4a12 commit 17a2465
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/node_modules/
yarn.lock
package-lock.json
build/
# Dist files
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.7.19]
### Fixed
- Makefile: Updated for emscripten 1.38.34. Fix minor bugs
- Fix that the umd encoder worker didn't correctly initiate. [#19]
- README.md: Use yarn instead of npm. Use UMD module in example, in response to [#19].

### Added
- Add `example/create-react-app`.
Expand All @@ -22,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#18]: https://github.com/kbumsik/opus-media-recorder/issues/18
[#16]: https://github.com/kbumsik/opus-media-recorder/issues/16

[Unreleased]: https://github.com/kbumsik/opus-media-recorder/compare/0.7.18...HEAD
[Unreleased]: https://github.com/kbumsik/opus-media-recorder/compare/0.7.19...HEAD
[0.7.19]: https://github.com/kbumsik/opus-media-recorder/compare/0.7.18...0.7.19
[0.7.18]: https://github.com/kbumsik/opus-media-recorder/compare/0.7.17...0.7.18
[0.7.17]: https://github.com/kbumsik/opus-media-recorder/releases/tag/0.7.17
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Change the port you like. You can run the dev server by using "make run"
DEV_SERVER_PORT := 9000
DEV_SERVER_URL := https://localhost
VERSION := $(shell echo "console.log(require('./package.json').version)" | node)
EMSCRIPTEN := $(dir $(shell which emcc))
EMCC_VERSION_REQUIRED := 1.38.34
Expand All @@ -14,7 +15,7 @@ ifdef PRODUCTION
export BASE_URL := https://cdn.jsdelivr.net/npm/opus-media-recorder@$(VERSION)
else
# export BASE_URL := https://cdn.jsdelivr.net/npm/opus-media-recorder@latest
export BASE_URL := https://localhost:$(DEV_SERVER_PORT)
export BASE_URL := $(DEV_SERVER_URL):$(DEV_SERVER_PORT)
endif

# Path Settings
Expand Down Expand Up @@ -73,7 +74,7 @@ EMCC_OPTS = -std=c++11 \
-s MODULARIZE=1 \
-s FILESYSTEM=0 \
-s MALLOC="emmalloc" \
--source-map-base http://localhost:$(DEV_SERVER_PORT)/ \
--source-map-base $(DEV_SERVER_URL):$(DEV_SERVER_PORT)/ \
-s ERROR_ON_UNDEFINED_SYMBOLS=0
# -s EXPORT_ES6=1 -- I'm not using ES6 import yet.
# -s ENVIRONMENT='worker' -- Enabling it will delete node.js
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ const options = { mimeType: 'audio/ogg' }
// Web worker and .wasm configuration. Note: This is NOT a part of W3C standard.
const workerOptions = {
encoderWorkerFactory: function () {
return new Worker('.../path/to/opus-media-recorder/encoderWorker.js')
// UMD should be used if you don't use a web worker bundler for this.
return new Worker('.../path/to/opus-media-recorder/encoderWorker.umd.js')
},
OggOpusEncoderWasmPath: '.../path/to/opus-media-recorder/OggOpusEncoder.wasm',
WebMOpusEncoderWasmPath: '.../path/to/opus-media-recorder/WebMOpusEncoder.wasm'
Expand All @@ -85,15 +86,15 @@ Bundler-specific examples:
```javascript
import OpusMediaRecorder from 'opus-media-recorder';
// Use worker-loader
import Worker from 'worker-loader!opus-media-recorder/encoderWorker.js';
import EncoderWorker from 'worker-loader!opus-media-recorder/encoderWorker.js';
// You should use file-loader in webpack.config.js.
// See webpack example link in the above section for more detail.
import OggOpusWasm from 'opus-media-recorder/OggOpusEncoder.wasm';
import WebMOpusWasm from 'opus-media-recorder/WebMOpusEncoder.wasm';

// Non-standard options
const workerOptions = {
encoderWorkerFactory: _ => new Worker(),
encoderWorkerFactory: _ => new EncoderWorker(),
OggOpusEncoderWasmPath: OggOpusWasm,
WebMOpusEncoderWasmPath: WebMOpusWasm
};
Expand Down Expand Up @@ -195,12 +196,12 @@ Browsers with issues:

## How to build

1. To build from the source, you need [Emscripten](https://github.com/kripken/emscripten) version 1.38.25, [NPM](https://www.npmjs.com/), [npx](https://www.npmjs.com/package/npx), Python 2.7 or higher, and basic C program build systems such as [GNU Make](https://www.gnu.org/software/make/). Environment variable `$EMSCRIPEN` must be set in order to build.
1. To build from the source, you need [Emscripten](https://github.com/kripken/emscripten), [yarn](https://yarnpkg.com), Python 2.7 or higher, and basic C program build systems such as [GNU Make](https://www.gnu.org/software/make/).

2. `npm install` to install JavaScript dependencies.
2. `yarn install` to install JavaScript dependencies.

3. `npm run build` to build. `npm run build:production` to build files for distribution.
3. `yarn run build` to build. `yarn run build:production` to build files for distribution.

4. `npm run serve` to run a test web server locally. Default URL is `https://localhost:9000` (It has to be HTTPS). You might have to change the `src` path of `<script>` at the bottom of `docs/index.html` to test it correctly (I'm finding a way to automate this.)
4. `yarn run serve` to run a test web server locally. Default URL is `https://localhost:9000` (It has to be HTTPS). You might have to change `DEV_SERVER_URL` and `DEV_SERVER_PORT` to change the address of the local test server.

5. `npm run clean` to clean up build files.
5. `yarn run clean` to clean up build files.
4 changes: 2 additions & 2 deletions docs/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// Non-standard options
const workerOptions = {
OggOpusEncoderWasmPath: 'https://cdn.jsdelivr.net/npm/[email protected].18/OggOpusEncoder.wasm',
WebMOpusEncoderWasmPath: 'https://cdn.jsdelivr.net/npm/[email protected].18/WebMOpusEncoder.wasm'
OggOpusEncoderWasmPath: 'https://cdn.jsdelivr.net/npm/[email protected].19/OggOpusEncoder.wasm',
WebMOpusEncoderWasmPath: 'https://cdn.jsdelivr.net/npm/[email protected].19/WebMOpusEncoder.wasm'
};

// Polyfill MediaRecorder
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ <h3>Console</h3>

<!-- <script src="example.js"></script> -->

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].18/OpusMediaRecorder.umd.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].18/encoderWorker.umd.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].19/OpusMediaRecorder.umd.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].19/encoderWorker.umd.js"></script>
<script type="text/javascript" src="example.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opus-media-recorder",
"version": "0.7.18",
"version": "0.7.19",
"author": "Bumsik Kim",
"license": "MIT",
"homepage": "https://github.com/kbumsik/opus-media-recorder",
Expand Down

0 comments on commit 17a2465

Please sign in to comment.