AndrewS
AndrewS

Reputation: 1565

How to add background image for video before it plays

I wander if there is a way of adding a image background, or anything, before the video goes to play. Actually in Chrome and other browsers except Safari, if the video is not play, the first screen of the video is as a background. But in Safari it is balck.

this is the way I place the video in WP

[video width="1920" height="1080" mp4="https://my-website.live/wp-content/uploads/2020/03/HEALTH_NEW.mp4"][/video]

Upvotes: 0

Views: 781

Answers (1)

Howard E
Howard E

Reputation: 5659

It sounds like what you want is the "poster" attribute of Video. HTML5 Video Poster

If you look in the docs for the video shortcode, it's an option. https://wordpress.org/support/article/video-shortcode/#options

[video width="1920" height="1080" mp4="https://my-website.live/wp-content/uploads/2020/03/HEALTH_NEW.mp4" poster="https://yourdomain.com/image.jpg"][/video]

Upvotes: 2

Related Questions