Skip to content
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

recorderOptions 'appendTo' option w/ constructor reformatting #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

sebscholl
Copy link

Hey guest271314 -

I've been using you're npm package for a project and thought I'd help make some improvements.

I added a new option to the recorderOptions keyword argument. The user can specify a dom selector to which the audio node element will be appended. It defaults to body.

Also, I did a little bit of organizing in the constructor and moved certain code into three prototype methods:

createAudioNode()
setMediaRecorder(stream, mime)
setMimeType()

This is simply to clean up the constructor a bit, as well as give the option in the future of cleanly allowing the user to specify options for the recorder or audio node and pass them as options.

best -
S

…derOption of 'appendTo', allowing the user to specify a dom element to which the created audio node can be appended
@guest271314
Copy link
Owner

@sebscholl There is an open issue which suggests to not add elements to the DOM #8. We should leave it to the developer to decide if and where to add elements to the DOM or not.

@guest271314
Copy link
Owner

@sebscholl Should not setMimeType() allow passing the MIME type as a parameter?

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.

None yet

3 participants