I have had this problem for quite some time, and need help. I will be sending the current implementation of the problem and then share the solution if I find one.
I have tried various other code snippets from all over the internet, and keep running into the same problem
This is my final solution I came up with, just modify and play around you will need to install the recordrtc package though.