-
ThulaniMAsked on January 4, 2018 at 7:54 AM
How can I make my form recognize the upload media length (audio or video) and count the price according to those minutes.
-
aubreybourkeReplied on January 4, 2018 at 9:35 AM
Unfortunately we don't have a way to do what you are asking. But you can create your own way of doing it. Note that this will not be easy. And involve a bit of programming.
You would have to edit the full source code.
How-to-get-the-Full-Source-Code-of-your-Form
And you would need to host this edited code on your own web host.
For example:
First you would need to program your own file upload field to capture the media file. You can do this with PHP.
https://www.w3schools.com/php/php_file_upload.asp
Then get the duration with JavaScript
https://www.w3schools.com/tags/av_prop_duration.asp
-
aubreybourkeReplied on January 4, 2018 at 3:34 PM
I managed to put together a demo for you.
You can see it working here:
http://thulanim.byethost7.com/
You need to upload an mp4 movie and when it fully loads press the button to get the duration in seconds.
You can download this small test movie:
https://www.w3schools.com/html/mov_bbb.mp4
And You can download my php project here (if you want to modify it)
http://thulanim.byethost7.com/File-Upload-Media-Length.zip