• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1144
  • Last Modified:

HTML5 Video Background Not Playing on Safari or IE11

I have this page starting to look normal in Chrome and Firefox regarding the background video being 100% (w&h) inside a DIV.

But when I look at the site in Safari and IE 11, it won't display any video or partial video on the left (in IE).

I've deconstructed my page 100 times down to the raw <video> tag only and I can see the video playing in Safari and IE11, but when it's wrapped in the DIV, it simply won't work.

I'm not sure how to debug in Safari to see what the conflict is.

I've also created a background-image for the DIV in case the video doesn't work. It's somewhat the same as the POSTER tag in video. (fail safe).

I need to understand WHY it won't work in Safari and IE11. I don't get it and have spent several hours now pulling out my hair.


Any help would be appreciated.
  • 3
1 Solution
David Johnson, CD, MVPOwnerCommented:
it does play in IE11
day6Author Commented:
@david Johnson Perhaps I should do a screen grab so you can see that it doesn't?
day6Author Commented:
The way the VIDEO tag in Safari works is different than Chrome/Firefox. Also, the use of @media tags in my code weren't being read by Safari or IE, so I removed them. I ended up changing the code from the normal


<video src="path/vid" type="video/mp4">

This apparently was what was causing both Safari and IE to NOT render out the video.

Additionally, since I wanted to have the video full screen background, I had to use

min-height=100% to make it work since just width=100% and height=100% were being ignored by Safari and IE11

Weird issues, but glad I figured it out. The page now renders fine in all 4 main browsers.
day6Author Commented:
No comments from anyone and after more tweaking and playing with CSS, I figured out the solution.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now