My goal is to create tutorial videos like at: Discourse 1.4 Released!
When I embed mp4 directly the onebox shows the video beautifully but I cannot control the poster image.
Here are the steps I took to enable videojs:
Add css to head
Add JS to /body
In my post used the videojs embed
It is getting rendered as:
Why not just like give the link to the video and let onebox take care of putting the video tag?
Because I want to use the videojs poster feature. So that when the video is not being played I can decide which frame to show.
In the discourse blog at: Discourse 1.4 Released! The poster feature of videojs has been used.
<p><video width="100%" preload="auto" poster="https://blog.discourse.org/wp-uploads/2015/09/d14-darktheme-poster.png" controls><source src="https://blog.discourse.org/wp-uploads/2015/09/d14-darktheme-HD.mp4"></video></p>
The poster attribute sets the image that displays before the video begins playing. This is often a frame of the video or a custom title screen. As sooas the user clicks play the image will go away.