Reputation: 581
My markup is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home Page</title>
<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="js/jquery.flexslider.js"></script>
</head>
<body>
<div id="slider1">
<div class="flexslider">
<ul class="slides">
<li class="list" data-video="vid/scene1.mov">
<video width="100%" height="100%" preload poster="images/white.jpg">
<source src="vid/scene1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</li>
<li class="list" data-video="vid/scene2.mov">
<video width="100%" height="100%" preload poster="images/white.jpg">
<source src="vid/scene2.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</li>
<li class="list" data-video="vid/scene3.mov">
<video width="100%" height="100%" preload poster="images/white.jpg">
<source src="vid/scene3.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</li>
<li class="list" data-video="vid/scene4.mov">
<video width="100%" height="100%" preload poster="images/white.jpg">
<source src="vid/scene4.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</li>
<li class="list" data-video="vid/scene5.mov">
<video width="100%" height="100%" preload poster="images/white.jpg">
<source src="vid/scene5.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</li>
</ul>
</div>
</div>
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider({
start:animation,
after:animation
});
});
function animation(slider){
var myVideo=$('.flex-active-slide video').get(0);
myVideo.playbackRate=1.0;
myVideo.play();
}
</script>
</body>
</html>
I have converted my initial movie files to .mp4 using some free converters online. I can play in quicktime player but unable to play on safari browser. I have tried using various formats .ogg,.webm but failed. Please suggest the appropriate way and also the videos are playing fine in all other browsers.(Chrome,Firefox)
Upvotes: 1
Views: 4097
Reputation: 242
In delivering content to the Safari browser, we have found that the browser, upon noticing multimedia content to be downloaded, will first send an extra request, which includes a Content-Range header, to the web server to ascertain the size of the content to be delivered. If the server does not respond correctly, the browser will not download and play the content. This extra request/response is defined in, but not required by, the HTML spec.
In our experience, this has been true for Safari on a Mac and just about any browser that we tested on an iPad. However, Safari for Windows appears to play fine even without this extra exchange between the browser and the server.
If this is the problem you are seeing, the player control will be displayed in the browser window, but the the content will never start playing. No error or other message, just a blank player control.
In this case, you will need to look to your server for the answer. If the server is yours, as our is, you will need to add this additional piece to respond to the browser request for media size, i.e. to respond to the Content-Range header in a browser request. If the server is from someone else, ask them if they support this. Again, in our experience, not all servers do.
Upvotes: 1
Reputation: 7002
A couple of things you could try:
<!doctype html>
I hope this put you in the right direction.
Thanks
Upvotes: 2