Need help with javascript webcam image capture

Job ID: 31472333

Budget: $10 – $30 USD

Example script that could possibly be modified to below specs:
https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript/#

Inputs:
$save_pic_as

Script function:
1) Will show users webcam preview.
2) When user taps webcam preview it will capture image, then show user the captured image with a retake or save button.
3) Retake will remove captured image and return back to step 1.
4) Save button will save the captured image to /images directory
5) Show confirmation message and return back to index.php
Related categories: PHP JavaScript AJAX HTML5 jQuery / Prototype