Reputation: 702
I've a HTML5 webpage and I've included a video in it. I would like know, If a user try to play that video on the IPad can we open that in native player?
I even tried following blog post http://alisonfoxall.com/open-source-html5-code-for-embedding-ipad-video-player/ but it's not working.
Upvotes: 2
Views: 2000
Reputation: 1
You're going to have to use Javascript. Pretty simple from there, though.
function playVideo () {
var myVideo = document.querySelector('video')[0];
myVideo.play();
myVideo.webkitEnterFullscreen();
}
iPads naturally play videos inline (see this) so you just need to select the video using a querySelector and then use JS to play it.
Upvotes: 0
Reputation: 113
Yes, We can play in iPad the video in native player we just need to include some meta tags for it.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
</head>
<body>
<video controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>
Upvotes: 2