There is typically a way. The specifics depend on what code is outputting the thumbnails. For example, a HTML5 video node has a JS property .duration.
Thread Starter
rich20
(@rich20)
Thanks for this but im not sure how to work on that, im just using the basics of wordpress like uploading an image as thumbnail in videos, is there anyway I can add a code to make like a text form that ill input hh:mm:ss that will overlap on the uploaded image as thumbnail sort like that, Tia.
You wish to manually enter a duration value that will display over the thumbnail image? That may be more work than having it happen automatically! Ultimately nearly anything is possible with the right custom coding, but it may take more effort than is warranted.
How are you adding videos? The usual HTML5 <video> element takes the thumbnail from the video file, there’s not a separate thumbnail image. And the resulting player already shows the video duration after the current playback position. In the lower left corner of the player is something like:
▶ 0:00/12:34
just above the scrub bar that is at the very bottom.
Thread Starter
rich20
(@rich20)
Hello im not sure if thats the best way to do it or if there’s a plugin to make it faster. Since im just uploading video by Entering the link or embed code and then uploading a featured image.
Oh, of course. You’re embedding hosted videos like from YT or Vimeo, etc. They have their own embedded player versions, not the HTML5 player used for local files like .mp4. I’m unsure how available duration is to local scripts in that scenario. It likely varies by host, if it’s available at all. If it were available via local script, it could be placed in a div container and overlaid on the video frame.
You might try asking in a support forum dedicated to your favorite video host if duration is available to JavaScript and if so, how it is obtained. If that is possible, then there might be a plugin available, or a solution could be custom developed.
Or there might even be an embed code parameter you could use that will display duration right in the preview frame with no JavaScript required.
Thread Starter
rich20
(@rich20)
Thank you very much for this. I might ask the customer support if we can make some sort of code for this request. Have a great day.