Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Samiruddin Syed
Samiruddin Syed
3,136 Points

Record Video from User Webcam

I have been working on a small project of mine, I got stuck where I wanted to add a functionality where a particular script does the following :

  1. asks the user to Allow or Deny to enable his webcam
  2. and then on click of a record button, the webcam should record the video of the user and on clicking stop, the script should ask the user whether to submit or re-record.
  3. the video should be submitted if the user chooses to submit and should be uploaded to the server.

I want to achieve this using PHP, the video uploading can be done using the input type="file" but the functionality involved in between is my main hurdle.

I hope someone around can help me in this, I would be highly grateful.

2 Answers

Hey there, first of all i have no idea how to achieve this but looking at your general structure i think you can store the files using PHP but the part of the user won't involve any PHP at all. As PHP is a SERVER side programming language and you certainly want to be using a CLIENT side language.

I would recommend taking a look at YouTube My Webcam or Red5 Recorder Demo

Goodluck !

Samiruddin Syed
Samiruddin Syed
3,136 Points

Yes i understand that PHP is a server side language but i will be using it because I will also be inserting few records in the MySQL database when this video is uploaded.