AbreezaSaleem / react-voice-recorder-player

Voice Recorder Component for React
MIT License
23 stars 5 forks source link

Allow clients to execute custom code on specific events #2

Closed Fanoflix closed 1 year ago

Fanoflix commented 1 year ago

Hello @AbreezaSaleem!

I loved this little package and the idea behind it. I can see it being used by many people as it is a quick plug and play recording solution with a customizable player included.

The Basic Idea

Currently there is no way for the users to execute custom code right after starting recording, during recording, after recording ends etc. To solve this we can provide events as props, such as:

So that consumers are allowed to execute code on these events as a feature of the npm-package instead of doing it by themselves. This will help consumers to reduce custom boilerplate code that they will inevitably have to write to do such things. Moreover, this feature is a usual feature among other great packages.

AbreezaSaleem commented 1 year ago

This is a great suggestion @Fanoflix i'll be getting to this soon :)

AbreezaSaleem commented 1 year ago

Here's the proposal for implementing this feature:

Requirement

The requirement of this request is that we expose custom events to the user so they can execute code on their end as per their use cases.

Solution

Expose the following events to the user:

Fanoflix commented 1 year ago

@AbreezaSaleem This seems good enough. I am eager to see your implementation of it!

AbreezaSaleem commented 1 year ago

Feature deployed v1.1.0