<!DOCTYPE html>
<html>
<head>
	<title>PLAYER</title>
	<link rel="stylesheet" href="https://cdn.plyr.io/2.0.15/plyr.css">	
</head>


<script>
	const player = new Plyr('#player');
	player.setup("#plyr-youtube");
	
</script>


<style>
body {
}
#BGIMG { 
  width: 100%;
  height: 100%
  //opacity: 0.2;
}
#WSVIDEO {
    position: fixed;
    border: 0px;
    background-color: #000000;
    color: #FFF;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
}
div.Title {
    position: absolute;
    border: 1px solid white;
    left: 90px;
    top: 90px;
    color: red;
    text-shadow: 1px 1px white;
}
.controls button[data-state="subtitles"] {
    height:85%;
    text-indent:0;
    font-size:16px;
    font-size:1rem;
    font-weight:bold;
    color:#666;
    background:#000;
    border-radius:2px;
}
.videoplay {
	position: relative;
	border: 0px solid black;
	width: 100%;
	height: 99%;
}
#player {
	position: relative;
	border: 4px solid black;
}
.CloseButton {
	position:fixed;
	top: 15px;
	right: 15px;
	width: 22px;
	height: 22px;
}
</style>

<body> 

<?php
		require_once('./sys/getID3/getid3/getid3.php');	

		$getID3 = new getID3();
		$getID3->setOption(array('tempdir' => _DIR_TMP,'encoding' => 'UTF-8')); 			
    $fn_video = $_GET["id"];
		$finfo = $getID3->analyze($fn_video);    
		?>

<div id="WSVIDEO" class="controls">   
<div> 
	<?php	
		//echo $fn_video."(".$finfo['video']['resolution_x']."x".$finfo['video']['resolution_y'].")";	
	?>  	
</div>
  
 

	<main style="margin: auto;width:70%;">
    <?php       
		//echo $fn_video."<br>".$finfo['video']['resolution_x'];		
		//height=\"90%\"
		echo "<video id=\"player\" width=\"100%\"  controls crossorigin playsinline>";
			//echo "<source src=\"$fn_video\" type=\"video/mp4\" size=\"720\">";	
			echo "<source src=\"$fn_video\">";	
			//echo "<track label=\"Portuguese\" kind=\"subtitles\" srclang=\"pt\" src=\"https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt\" default>";
		echo "</video>";     
    ?>  
   </main>
   
   
</div>

<div class="MsgViewToolBar">
    <div class="Title">
    <?php       
        //echo "<h1>$title</h1><br>$plot<br><br>";         
        //echo $fn_video . "<br><br>";    
    ?>
    </div>    
</div>    

</body>
</html>
