handle live from an account
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user