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

added audio recorder - onStop doesn't pick up #20

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

Conversation

urosran
Copy link

@urosran urosran commented Jul 17, 2020

No description provided.

@danigb
Copy link
Contributor

danigb commented Oct 20, 2020

Hello!

Thank @0x006F you for this library and @urosran for collaborating in it 👏

I know it's not my business, but a couple of things makes me think that this PR should not be merged in its current state:

  • It adds a polyfill that, and IMO it should be the library user who decides if include it or not. Maybe I know all my devices can record, or maybe I was want to detect it and skip recording. @urosran Is it possible to implement this functionality without the polyfill?
  • There are some console.logs and alert calls that can be annoying for the end user

My two cents.

@DeltaCircuit
Copy link
Owner

Besides the console.logs and alerts (we can clean up at any time), I guess @danigb has a valid point in this case. As we discussed in #19 , even though this polyfill kinda work, it doesn't support video capturing yet. So, we're losing one of our key features in here.

I sincerely apologize for this delayed replies. I'm having numerous meetings / plannings at my full-time + work. Sorry!

@@ -60,7 +61,8 @@ export const ReactMediaRecorder = ({
screen = false,
mediaRecorderOptions = null,
}: ReactMediaRecorderProps) => {
const mediaRecorder = useRef<MediaRecorder | null>(null);
window.MediaRecorder = AudioRecorder
Copy link

@no-1ne no-1ne Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be overwrite only if mediarecorder doesn’t exist

( As suggested in the audio recorder polyfill readme)

if (!window.MediaRecorder) {
document.write(
decodeURI('%3Cscript defer src="/polyfill.js">%3C/script>')
}

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.

4 participants