binarykitchen / videomail-client

A wicked npm package to record videos directly in the browser, wohooo!
https://videomail.io
Creative Commons Zero v1.0 Universal
55 stars 19 forks source link

Document better how form submissions work #167

Closed binarykitchen closed 5 years ago

binarykitchen commented 5 years ago

Videomail-Client has a submission hook. It overrides the default form submission, submits the Videomail first to the Videomail server and only then resumes with the real form submission. Had to be like that. Hence the Videomail-Client needs to know the form tag and the submit button. For that there are options, i.E.

          selectors: {
            submitButtonSelector: 'body input[value="Submit"]',
            formId: 'someForm'
          }

See example at https://github.com/binarykitchen/videomail-client/blob/develop/examples/contact_form.html#L55\

For some it can be irritating why the form gets submitted without any vidoemail information because the onSubmitted event is called too late. Exactly because of this.

binarykitchen commented 5 years ago

done, good improvement