2020-05-15 12:27:34 +02:00

38 lines
1.5 KiB
PHP

<h1>Site web Projet L3</h1>
<form method="get" action="default">
<button type="submit">Retour</button>
</form>
<form method="get" action="connexion/disconnect">
<button type="submit">Deconnexion</button>
</form>
<form method="post" action="camera/swapState/<?=$this->clean($camera->getId())?>">
<h2>Caméra : <?= $this->clean($camera->getName())?></h2>
<?php if($this->clean($camera->getAvailable()) == true):?> Joignable -
<?php else: ?> Non joignable -
<?php endif ?>
<?php if($this->clean($camera->getEnabled()) == true):?> Activée <button type="submit">Désactiver</button>
<?php $swap = "disable";?>
<?php else: ?> Désactivée <button type="submit">Activer</button>
<?php $swap = "enable";?>
<?php endif ?>
<a href="camera/delayed/<?=$this->clean($camera->getId())?>"><button type="button">Regarder le différé</button></a>
<input type="hidden" name="whereController" value="camera">
<input type="hidden" name="whereAction" value="index/<?=$this->clean($camera->getId())?>">
<input type="hidden" name="swap" value="<?=$swap?>">
</form>
<br>
<div id="rtmp-player-container"></div>
<script>
jwplayer("rtmp-player-container").setup({
file: "rtmp://<?=Configuration::get('host')?>:1935/livecam/<?=$this->clean($camera->getId())?>?login=<?=$this->clean($user->getLogin())?>&password=<?=$this->clean($user->getPassword())?>",
controls: false,
autostart: true,
preload: "none"
});
</script>