Have a WordPress Gravity Forms standard upload field where users can upload a video file.
I'd like to limit uploads to be 60 seconds or less. If I can get the number of seconds of the uploaded video into a php variable, I should be able to take care of the validation from there.
This SO shows how to do it in javascript (though that example seems to work in Chrome but not Safari) How to Check Length / Duration of an Uploaded Video in JavaScript. Getting that javascript value to php would be a challenge I imagine, so hoping to find more a php solution if possible to be used in a custom wordpress function?
Unless there is a way to get that javascript seconds value into php. I saw a question using, "ffmpeg" but that was for a video already uploaded this would be for validating before form submission.
While noted above, just adding again this is in regards to accomplishing it in PHP (the other questions I've seen are in regards to accomplishing in javascript) and ultimately I need the value sent to a php wordpress function.