Skip to content

allow passing configuration for mediaRecorder #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasonpraful
Copy link

Changes

  • Update useVoiceVisualizer() hook to accept and use mediaRecorderOptions when creating MediaRecorder instance.

Usage

const recorderControls = useVoiceVisualizer({
  mediaRecorderOptions: {
    mimeType: 'audio/mp4',
    bitsPerSecond: 128000,
  }
});

Notes

Hook now validates mimeType when passed and throws an error if the specified mimeType is not supported by the browser.

Closes: #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update hook to allow supporting custom mime-types/config options for MediaRecorder
1 participant