Home > DeveloperSection > Forums > how to hide html5 player for iPad on done button click
Brad Pitt
Brad Pitt

Total Post:61

Points:429
Posted on    June-04-2013 1:55 AM

 iPhone iPhone 
Ratings:


 1 Reply(s)
 1017  View(s)
Rate this:
Hi Everyone,

I am playing video in iPad it is working fine but I want that when user enter done button, player should close.
Any idea how to do this. 
I'm trying as following

<!DOCTYPE html>
<head>
<meta charset=”utf-8?>
<meta name=”apple-mobile-web-app-capable” content=”yes” />
<title>My Video</title>
<link rel=”apple-touch-icon” href=”icon.png” />
<style>
body {margin:0;}
</style>
</head>
<body>
<video width=”1024? height=”750? controls=”true”>
<source src=”videos/test.m4v” />
</video>
</body>
</html>

Thanks in advance. 


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-05-2013 8:35 AM

Hi Brad,

You can try as following

<!DOCTYPE html>
<head>
<meta charset=”utf-8?>
<meta name=”apple-mobile-web-app-capable” content=”yes” />
<title>My Video</title>
<link rel=”apple-touch-icon” href=”icon.png” />
<script>
  function onClickDone(){
  document.getElementById('myvideotag').pause();
  document.getElementById('myvideotag').style.display = "none";
}
</script>
<style>
body {margin:0;}
</style>
</head>
<body>
<button onclick="onClickDone()">Done</button>
<video id="myvideotag" width=”1024? height=”750? controls=”true”>
<source src=”videos/test.m4v” />
</video>
</body>
</html>

Thanks in advance. 

Don't want to miss updates? Please click the below button!

Follow MindStick