title: how to play a html5 video only if the user is logged in?
body: <p>I am listing videos in a page with a preview image.
  When i click on the play button, it should be played only if the user is logged in to the website. otherwise, the user should be redirected to a login page.
  I want to display all the videos with preview images even if the user is not logged in. So skipping the video tag if the user is not logged in is not a solution.</p>
  
  <p>The website is developed using php, so a solution using php is required. 
  Thanks in advance. </p>