How to capture video from device video on mobile using HTML or javascript

Ideally, what I want to do is capture and record a video on my site, but be mobile and mobile, so users with a mobile can save the video to their mobile device and upload it to my site. I need to be able to input the webcam from the camera on any device as the mobile will show live preview, recording and playback. then download it. I don't think any flash will help as the iphone doesn't read flash. I've tried some html5 examples http://www.html5rocks.com/en/tutorials/getusermedia/intro/ but it doesn't work on iphone or mobile. any help would be appreciated

+3


source to share


2 answers


The standard HTML Media Capture

is just an HTML solution that works great on all mobile browsers. To record video use:

<input type="file" accept="video/*" capture >

This is what the code above looks like on iOS8: HTML Media Capture on iOs Image courtesy of https://addpipe.com/blog/the-new-video-recording-prompt-for-media-capture-in-ios9/



The only problem is you will get .mov videos from iOS devices and .mp4 / .3gp videos from Android devices. These .mov files will not play on Android.

HTML Media Capture

is a mobile solution, it is not implemented in desktop browsers.

+3


source


with the phonegap framework you can do this



http://docs.phonegap.com/en/1.5.0/phonegap_media_capture_capture.md.html#Capture

      

0


source







All Articles