-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Currently, the library creates a MediaRecorder instance with browser defaults, which limits users ability to control specific recording parameters.
While this works in most cases, it may not work for all use cases, especially ones where a shared backend is used for app and web - for instance:
- iOS doesn't support for
webmwithin apps without using something like MediaVLCKit from VLC - Some applications require specific formats for compatibility.
- Server-side conversion may be needed to convert from
webmto universally supported formats with something likeffmpegwhich raises another bottleneck for low compute instances
Proposed Solution
Add support for configuring the MediaRecorder defaults:
useVoiceVisualizer({
mediaRecorderOptions: {
mimeType: 'audio/mp4', // or other supported types
// ... other MediaRecorder optiosn
bitsPerSecond: 128000,
}
})This would give users the flexibility to choose their preferred mime type - if that mime type isn't supported by the browser (for instance firefox doesn't support audio/mp4 and Safari recently added support for audio/webm) the hook throws an error.
The current implementation would still be the default scenario if no options are provided.
Metadata
Metadata
Assignees
Labels
No labels