handle live from an account

This commit is contained in:
2025-04-10 10:33:19 +04:00
parent 1f1f17e0e7
commit 84a124c09b
4 changed files with 201 additions and 6 deletions
+43 -5
View File
@@ -29,12 +29,50 @@
<div class="hero-mastodon-wrapper">
<!-- Hero Banner -->
<div class="hero">
<div class="hero-content">
<div class="hero-logo">KAUBUNTU<span class="re">.RE</span></div>
<div class="play-button">
<i class="fas fa-play"></i>
<?php
// Vérifier s'il y a un direct en cours
$liveStream = getLiveStream();
if ($liveStream) {
// Afficher le direct en cours
?>
<div class="live-badge">
<i class="fas fa-circle"></i> DIRECT
</div>
</div>
<div class="hero-video-container">
<iframe
src="<?php echo PEERTUBE_URL; ?>/videos/embed/<?php echo $liveStream['id']; ?>?autoplay=1&muted=1"
frameborder="0"
allowfullscreen="allowfullscreen"
allow="autoplay; fullscreen"
title="<?php echo htmlspecialchars($liveStream['title']); ?>">
</iframe>
</div>
<div class="hero-video-info">
<h2><?php echo htmlspecialchars($liveStream['title']); ?></h2>
<div class="hero-channel-info">
<?php if (strpos($liveStream['channelAvatar'], 'default-avatar.png') !== false || empty($liveStream['channelAvatar'])): ?>
<div class="channel-avatar-placeholder">
<i class="fas fa-user-circle"></i>
</div>
<?php else: ?>
<img src="<?php echo $liveStream['channelAvatar']; ?>" alt="<?php echo $liveStream['channel']; ?>" class="channel-avatar">
<?php endif; ?>
<span class="channel-name"><?php echo $liveStream['channel']; ?></span>
</div>
</div>
<?php
} else {
// Aucun direct en cours
?>
<div class="hero-no-live">
<i class="fas fa-tv"></i>
<h2>Aucun direct en cours</h2>
<p>Revenez plus tard pour découvrir nos prochaines diffusions en direct.</p>
</div>
<?php
}
?>
</div>
<div id="mt-container" class="mt-container">