Limiting video record length for input type file on mobile devices
<input id="file-camcorder" type="file" name="camcorder" accept="video/*" capture="camcorder"></input>
I’m wondering if there is a way to somehow limit the length of the video that gets recorded, or to somehow notify the user that their recording is taking too long. The problem is that when you choose to record on a mobile device, you are taken away from the web app, so I don’t know of any way to interact with the user while they’re in the phone’s native recording app.
If anyone’s got any ideas, that’d be great. Thanks!
2 Solutions collect form web for “Limiting video record length for input type file on mobile devices”
You will probably have to look into hybrid applications such as Phonegap. HTML 5 alone has a relatively limited access to the device’s functions.
Someone mentioned checking the video size or length from the metadata afterwards. That is most likely your only option, if you can not use, say, Phonegap.
To read the metadata, you can use FileReader.
Maybe you could try using the html5 tag, attaching your phone’s camera video stream as source of the video using getUserMedia like this, and then capturing images from video stream with some delay for a limited number of times (or even prompt the user that they’re recording too long after you reach a certain number of frames). Try skimming this and see if it solves your problem.