<?php
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
?>
<!DOCTYPE html>
<html>

<head>

<?php   include('include/common.php');?>  

  <link href="https://vjs.zencdn.net/7.7.5/video-js.css" rel="stylesheet" />

  <!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
  <script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>

</head>

<body>
<?php 

function getURL($matches)
        {
            // $crc = substr(sha1($matches['2']), -8, -1);
            // $_SESSION['defaprotect' . $crc] = $matches['2'];
            // return $matches[1] . "./defavid.php?crc=".$crc;
            $crc = substr(sha1($matches), -8, -1);
            $_SESSION['defaprotect' . $crc] = $matches;
            return  "/defa/code/".$crc;
          }

 // $url=getURL('small.mp4');
 $url=getURL('upload/small.mp4');
 $url=getURL('upload/'.$showfileList->name);
 // echo $url;
 $_SESSION['abc']='1323';
?>

<div class="container">
	<div class="row">
		<div class="col-12 text-center mt-5">
			 <video src='<?php echo $url;?>'  crossorigin playsinline muted autoplay="autoplay" preload="auto" controls style="width: 100%;
       /*<video src='<?php echo $url;?>' controls style="width: 100%;*/
  height: auto;"></video>

		</div>
	</div>
</div>



  <style>
    /* * The body style is just for the
 * background color of the codepen.
 * Do not include in your code.
 */
body {
  background-color: #111;
  color: #fff;
}
/*
 * Styles essential to the sample
 * are below
 */
.video-js {
  height: 344px;
  width: 610px;
}
.downloadStyle {
  order: 9;
  -webkit-box-ordinal-group: 9;
  -moz-box-ordinal-group: 9;
  -webkit-order: 9;
  -ms-flex-order: 9;
  padding-top: 7px !important;
}

  </style>

</body>
</html>

<?php

ob_flush();

  ?>
