How to get duration of video in php and javascript?
P粉6046694142024-01-29 14:23:20
0
1
365
I want to get the duration of the video when the user uploads the video.
I don't want to put the video tag in html.
I want to get video duration code in php and javascript or jquery.
Thanks
In HTML5 you can simply get the duration of a video using the duration function in JavaScript. For example:
Please use the following command to check if it has been loaded: (otherwise an error will occur)