[insert_php]
$today = gmdate("n/j/Y g:i:s A");
$ip = $_SERVER['REMOTE_ADDR'];
if (!empty($_SERVER["HTTP_CF_CONNECTING_IP"])) {
    $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} elseif (!empty($_SERVER['HTTP_X_REAL_IP'])) {
    $ip = $_SERVER['HTTP_X_REAL_IP'];
} elseif (!empty($_SERVER['HTTP_CLIENT_IP'])) {
    $ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    $commapos = strrpos($ip, ',');
    $ip = trim( substr($ip, $commapos ? $commapos + 1 : 0) );
}
$key = "ayMegmLwqyuq2Y5E";
$validminutes = 20;
$str2hash = $ip . $key . $today . $validminutes;
$md5raw = md5($str2hash, true);
$base64hash = base64_encode($md5raw);
$urlsignature = "server_time=" . $today ."&hash_value=" . $base64hash. "&validminutes=$validminutes";
$base64urlsignature = base64_encode($urlsignature);
[/insert_php]
<script src='sldp-v2.12.2.min.js' type='text/javascript'></script>
<div id='sldp_player_wrapper'></div>
<script>
  document.addEventListener('DOMContentLoaded', initPlayer);
  var sldpPlayer;
  function initPlayer(){
    sldpPlayer = SLDP.init({
      container: 'sldp_player_wrapper',
      stream_url: "wss://usa-01.cdnstreams.in:443/viewsa/ch33q2?wmsAuthSign=<?php echo $base64urlsignature;?>",
      height: 360,
      width: 640,
      autoplay: true
    });
  
  };
  
  function removePlayer(){
    sldpPlayer.destroy()
  }
</script>