user6173756
user6173756

Reputation:

HTML5- Safari doesn't play or recognize the <video>

ok, I am creating a website with a video as a background. Here is the code:

<video id="video1" autoplay loop preload poster="" muted>
    <source src="video/video2.mp4" type="video/mp4"/>
    <source src="video/video2.webm" type="video/webm"/>
</video>

and here is the css:

video#video1 
{ 
    position: fixed;
    min-width: 100%;
    min-height: 100%;
    top: 50%;
    left: 50%;
    -ms-transform: translateX(-50%) translateY(-50%);
    -moz-transform: translateX(-50%) translateY(-50%);
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    z-index: -100;
    width: auto;
    height: auto;
    background-size: cover; 
}

Chrome, Opera, Internet Explorer and Firefox work well, the only one giving me problems is Safari. Any ideas?

the safari version is 5.1.7(7534.572)

Upvotes: 0

Views: 668

Answers (2)

stuartmccoll
stuartmccoll

Reputation: 188

You need to have QuickTime installed for Windows Safari to have .mp4 support.

Upvotes: 1

makoulis
makoulis

Reputation: 33

http://www.w3schools.com/tags/tag_video.asp

as you can see and in here safari doesnt support video type webm...only mp4

Upvotes: 1

Related Questions