<?
error_reporting(true);

$phpini = parse_ini_file('config.ini');

$caminho = $phpini['caminho'];

$cod_tv = $_GET['cod_tv']
?>
<html>
  <head>
    <title>Fullscreen Overlay Animation</title>
  <script src="js/jquery.min.js"></script>
  <style>
  
video{position:fixed;top:50%;left:50%;min-width:85%;min-height:100%;width:auto;height:auto;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);background-size:cover;-webkit-transition:1s opacity;transition:1s opacity;}
  


body {
  background: #000;

}

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.80);
  text-align:center;
}

.overlay img{
margin:0 auto;
float:none;
width:auto;
height:100%;
}

#imagem{
margin:0 auto;
float:none;
width:100%;
height:100%;
}

.overlay-close {
visibility:hidden;
}

.overlay-data {
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.5s;
  transition: opacity 0.5s;
  visibility: 0s 0.5s;
  transition: opacity 0.5s, visibility 0s 0.5s;
}
.overlay-open {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 0.5s;
  transition: opacity 0.5s;
  background: #000000;
}
  </style>
  </head>
  <body>
<!--  
    <div id="container">

      <button class="menuButton" id="overlay-menu" type="button">Open Video</button>
      <button class="menuButton" id="overlay-image" type="button">Open Image</button>
    </div>
  -->
    <div class="overlay overlay-open" id="div_video">
      <video id="video1">
        <source src="" id="video" type="video/mp4">
       </video>
    </div>

    
    <div class="overlay overlay-open" style="display:none;" id="div_imagem">
       <img src="" id="imagem"/>
    </div>
<script>

var player = document.querySelector("#video1");

function v1(caminho) {
    $( "#div_video" ).show();
	$( "#video" ).attr("src",caminho);
	player.load();
	player.play();	
}

$(function() {
    
	 v1("http://192.168.1.126/contagem.mp4");
	
});

</script>
</body>
</html>