You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
default: $(LIBOPUS_ENCODER)$(LIBOPUS_ENCODER_MIN)$(LIBOPUS_DECODER)$(LIBOPUS_DECODER_MIN)$(RECORDER)$(RECORDER_MIN)$(WAVE_WORKER)$(WAVE_WORKER_MIN) test
Copy file name to clipboardexpand all lines: README.md
+39-19
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,8 @@ Creates a recorder instance.
33
33
---------
34
34
#### General Config options
35
35
36
-
-**bufferLength** - (*optional*) The length of the buffer that the internal JavaScriptNode uses to capture the audio. Can be tweaked if experiencing performance issues. Defaults to `4096`.
37
-
-**encoderPath** - (*optional*) Path to `encoderWorker.min.js` or `waveWorker.min.js` worker script. Defaults to `encoderWorker.min.js`
36
+
-**bufferLength** - (*optional*) The length of the buffer that the scriptProcessorNode uses to capture the audio. Defaults to `4096`.
37
+
-**encoderPath** - (*optional*) Path to desired worker script. Defaults to `encoderWorker.min.js`
38
38
-**mediaTrackConstraints** - (*optional*) Object to specify [media track constraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints). Defaults to `true`.
39
39
-**monitorGain** - (*optional*) Sets the gain of the monitoring output. Gain is an a-weighted value between `0` and `1`. Defaults to `0`
40
40
-**numberOfChannels** - (*optional*) The number of channels to record. `1` = mono, `2` = stereo. Defaults to `1`. Maximum `2` channels are supported.
@@ -52,7 +52,6 @@ Creates a recorder instance.
52
52
-**originalSampleRateOverride** - (*optional*) Override the ogg opus 'input sample rate' field. Google Speech API requires this field to be `16000`.
53
53
-**resampleQuality** - (*optional*) Value between 0 and 10 which determines latency and processing for resampling. `0` is fastest with lowest quality. `10` is slowest with highest quality. Defaults to `3`.
54
54
-**streamPages** - (*optional*) `dataAvailable` event will fire after each encoded page. Defaults to `false`.
55
-
-**reuseWorker** - (*optional*) If true, the worker is not automatically destroyed when `stop` is called. Instead, it is reused for subsequent `start` calls and must be explicitly destroyed after stopping by calling `destroyWorker`. Defaults to `false`.
56
55
57
56
58
57
#### Config options for WAV recorder
@@ -100,18 +99,6 @@ rec.stop()
100
99
101
100
**stop** will cease capturing audio and disable the monitoring and mic input stream. Will request the recorded data and then terminate the worker once the final data has been published. Will call the `onstop` callback when stopped.
102
101
103
-
```js
104
-
rec.destroyWorker()
105
-
```
106
-
107
-
**destroyWorker** will destroy the worker freeing up the browser resources. If the recorder is re-started, a new worker will be created. Note that `destroyWorker` is automatically called when stopping unless `reuseWorker` is true.
108
-
109
-
```js
110
-
rec.loadWorker()
111
-
```
112
-
113
-
**loadWorker** triggers pre-loading of the worker. This can reduce the startup latency when calling `start`. Call `destroyWorker` to clean the worker when the recorder is stopped/not started, or it will be automatically cleaned up after stopping unless `reuseWorker` is true.
0 commit comments