Reputation: 11
I am trying to load a jquery created video tag into my page with the following code:
var vidDiv = vpJQuery("#videoHolder");
var vidControl = vpJQuery("<video></video>");
vidControl.attr("width", "512");
vidControl.attr("height","288");
vidControl.attr("controls","controls");
vidControl.attr("id","vidControl");
var vidSource = vpJQuery("<source />");
vidSource.attr("src", vidUrl);
vidSource.attr("type", "video/mp4");
vidControl.append(vidSource);
vidDiv.empty();
vidDiv.append(vidControl);
vpJQuery("#vidControl > source").attr("src", vidUrl);
var vidPlayer = vpJQuery("#vidControl").get(0);
vidPlayer.load();
vidPlayer.play();
vidUrl is my mp4 path hosted by amazon. This works fine in my desktop web kit and iphone sim, but not the ipad sim! I get the play icon with the line through it on the ipad, any ideas?
Upvotes: 1
Views: 1729
Reputation: 17709
@Kon's answer is correct, but his link is no longer active. See wikipedia for a browser matrix.
Upvotes: 0
Reputation: 27431
Make sure the file format you supply is supported by iPad. This is a good guide: http://www.robwalshonline.com/posts/tutorial-serving-html5-video-cross-browser-including-ipad/
Upvotes: 1