Dynamically using the first frame as poster in HTML5 video?
Did you try the following?
just append time in seconds #t={seconds} to source URL:
<video controls width="360">
<source src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4#t=0.1" type="video/mp4" />
</video>
How can I use dynamically the first frame as poster in mobile HTML5 video?
On mobile devices the device will not start to download the video automatically, as you may be aware. This is to avoid the user running up large data bills.
Because the bowser has not downloaded the video it can't extract the first frame to display it, so you need to use the poster mechanism in HTML5 to display an image as the thumbnail.
One common approach is to generate the thumbnail on the server side when you 'ingest' or add the video to the server and save it where it can be served as the video poster.
js: show first frame of video when the page loads
This could help:
document.getElementById('THE VIDEO').addEventListener('loadedmetadata', function() {
this.currentTime = 0;
}, false);
Generating a random preview image on a HTML5 video tag
I don't think that this is possible in pure HTML5. Principally because the stream is not loaded when you see the 'object' in the webpage so the client can't get the desired frame.
However, the best option for you is to save / cache the 'random frame' before loading the page and then use it as the poster of the video. This will allow you to reduce the client work and save the bandwith.
check THIS, which is the first thing that I've found (if you're using PHP and you want a 'quick and dirty' way to get the frame)
Update
Apparently HERE there is a solution with popcorn.js BUT it seems that you can't do it in the way that (I suppose) you need.
This because it would be possible to do this only inside the same domain due to browser security issues.
Related Topics
What Is "Context" in Jquery Selector
Replace Multiple Whitespaces with Single Whitespace in JavaScript String
Angular2:Render a Component Without Its Wrapping Tag
Save File JavaScript with File Name
Make Vuejs and Jquery Play Nice
Why Is It Object.Defineproperty() Rather Than This.Defineproperty() (For Objects)
What Does Three Dots Do in Reactjs
Angular2/Spring Boot Allow Cross Origin on Put
Convert Character to Ascii Code in JavaScript
How to Read from Chrome's Console in JavaScript
How to Be Notified Once a Web Font Has Loaded
How to Extend a Class Without Having to Use Super in Es6
Why Use Jquery On() Instead of Click()
How to Detect If Flash Is Installed and If Not, Display a Hidden Div That Informs the User