rico345100 / react-multimedia-capture

react-multimedia-capture is Multimedia capturing module via React, using HTML5 MediaDevice and MediaRecorder API
49 stars 14 forks source link

Customization on start(handleStart) function #8

Closed sravanshty closed 6 years ago

sravanshty commented 6 years ago

Hello,

In MediaCapturer tag we have in-built functions like onGranted, onDenied, onStart, onStop, onPause.....for invoking these functions we are using like (). Now my query is like i wanted to invoke same start function but i just want to pass a value in Onclick, this is just because i just wanted to know that click fired from which button. Could you please help me out. Thanks in advance.

Thanks & Regards, Sravan Kumar Shetty

rico345100 commented 6 years ago

Why don't you just seperate handler for onstart and invoke manually when you needed?

sravanshty commented 6 years ago

Thanks for your reponse @rico345100 . Could you please give sample snippet because as i am new to react. Which would be helpfull to me.

Thanks & Regards, Sravan Kumar Shetty

sravanshty commented 6 years ago

but to call this.handleStart directly where ever i required this function is accepting the stream as parameter to the function right. So if we call outside how do i pass stream. could you tell me.

rico345100 commented 6 years ago

@sravanshty There's no way to send stream from onclick handler. I don't know what you are actually trying to do, however you can just check the first parameter has stream interface or not. JS is dynamic language and you can check property or add property in runtime. If you just directly add handler to same handler using onstart props, of course it won't work because onclick handler receives event parameter.

rico345100 commented 6 years ago

This place is talking about the issue which some sort of bug reporting or improvements, however your issue doesn't seems like both. If you have lack of knowledge about your programming skill, you can ask in Stackoverflow.

I'm closing this because it's not an issue, however if you think this is an issue, you can freely re-open. Thanks.

sravanshty commented 6 years ago

Thanks @rico345100 I need some customization when using this plugin and asking regarding that. You speaking something out of it. please dont