1

If I embed an HTML5 video player on my site, it does not show any preview in Safari.

On other browsers I see a preview. I tried the top solution Here, but it didn't work for me, instead showing a black player with no play button.

This is roughly the code I'm using to render the player.

<video width="320" height="240" controls>
    <source src="some.url">
</video>

I expected to see a video player with a play icon and a preview image from the video in the background.

Instead I see a blank white background with just a play button.

Edit: Ideally I would be able to do this without the poster attribute, since I want to avoid doing additional processing on the video to extract an image + having to store and pipe through the image.

sardine
  • 13
  • 5

1 Answers1

0

You need put some additional attribute on your video tag.

<video controls poster="Here is the poster image what you want">
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>
batgerel.e
  • 837
  • 1
  • 10
  • 31
  • Ideally I would be able to do this without the poster attribute, since I want to avoid doing additional processing on the video to extract an image + having to store and pipe through the image. – sardine Oct 25 '19 at 02:38