page.screen.play.php 1006 B

1234567891011121314151617
  1. <?php
  2. global $myUser;
  3. require_once(__DIR__.SLASH.'ScreenVideo.class.php');
  4. if(!isset($_['slug'])) throw new Exception("Identifiant de sécurité non spécifié");
  5. $video = ScreenVideo::load(array('slug'=>$_['slug']));
  6. if(!$video || $video->id==0) throw new Exception("Identifiant de sécurité incorrect");
  7. if($video->expire!=0 && time()>$video->expire){
  8. throw new Exception("Vidéo expirée depuis le ".date('d/m/Y',$video->expire));
  9. }
  10. $creator = User::byLogin($video->creator);
  11. ?>
  12. <h3>Capture Video</h3>
  13. <p>Vidéo partagée par <img class="avatar-mini avatar-rounded" src="<?php echo $creator->getAvatar(); ?>"> <?php echo $creator->fullName(); ?> <span class="pl-5 text-muted">Expiration : <?php echo $video->expire==0 ? 'Jamais': complete_date($video->expire).' à '.date('H:i',$video->expire); ?></span></p>
  14. <video id="screenshare-preview" src="action.php?action=screenshare_screen_video_preview&slug=<?php echo $video->slug; ?>" loop controls class="screenshare-preview" muted autoplay></video>