<?php
$porta = query_string('1');
$servidor = code_decode(query_string('2'),"D");
$url_source = "https://".$servidor."/".$porta."/".$porta."/playlist.m3u8";
?>
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <script type="text/javascript" charset="utf-8" src="//cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js"></script>
 <link rel="stylesheet" href="/inc/clappr.min.css">
  <title>Player</title>
<style>*{margin:0;}html,body{height:100%;}</style>
</head>
<body>
<div  class="container-fluid">
    <div class="row">
        <?php if(query_string('3') == "16:9") { ?>
        <div class="embed-responsive embed-responsive-16by9">
        <?php } ?>
    	<?php if(query_string('3') == "4:3") { ?>
        <div class="embed-responsive embed-responsive-4by3">
        <?php } ?>
        <div id="player_camera_studio" class="embed-responsive-item"></div>
    </div>
</div>
</div>
    <script type="text/javascript" charset="utf-8">
  window.onload = function() {
  var player = new Clappr.Player({
    source: '<?php echo $url_source; ?>',
    parentId: '#player_camera_studio',
	width: '100%',
    height: '100%',
    hideMediaControl: true,
	poster: '/img/img-player-camera-studio-color-bars.jpg',
	autoPlay: true
	});
}
  </script>
</body>
</html>
