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
Copy file name to clipboardExpand all lines: docs/API.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -220,6 +220,11 @@ Player.isPrepared true if player is prepared
220
220
// Quality of the recording, iOS only.
221
221
// Possible values: 'min', 'low', 'medium', 'high', 'max'
222
222
quality : String (default: 'medium')
223
+
224
+
// Optional argument to activate metering events
225
+
// this will cause 'meter' event to fire everi given milliseconds.
226
+
// i.e. 250 will fire 4 time in a second.
227
+
meteringInterval : Number (default: undefined)
223
228
}
224
229
```
225
230
@@ -310,6 +315,15 @@ are supported:
310
315
311
316
* `looped` - Playback of a file has looped.
312
317
318
+
* `meter` - recurring event during recording session (see `meteringInterval` in `recorderOptions`). `data` associated to this event follows the format:
319
+
```js
320
+
{
321
+
"id", // frame number
322
+
"value", // sound level in decibels, -160 is a silence level
323
+
"rawValue" // raw level value, OS-dependent
324
+
}
325
+
```
326
+
**Currently, only one recored at a time generates meter events. Last prepared Recorder wins.**
313
327
314
328
Listen to these events with `player.on('eventname', callback(data))`. Data
315
329
may contain additional information about the event, for example a more detailed
0 commit comments