vers. 2.4.0

This commit is contained in:
2026-02-07 00:31:18 +01:00
parent 71af2b9407
commit 5b3e05726b
6 changed files with 202 additions and 8 deletions

View File

@@ -0,0 +1,50 @@
<?php
// Assicurati che $station sia definito (dovrebbe essere passato da mobile.php)
if (!isset($station) || empty($station)) {
echo '<div class="alert alert-danger">Errore: Stazione TV non trovata.</div>';
return;
}
$station_id = (string)$station->id;
$station_name = (string)$station->name;
$station_logo = (string)$station->logo;
$station_stream = (string)$station->stream;
$station_poster = isset($station->poster) ? (string)$station->poster : '';
?>
<!-- Container player con sfondo bianco -->
<div class="tv-player-container" style="background-color: #ffffff;height: calc(100% - 217px);position: absolute;left: calc(50%);display: flex;flex-direction: column;max-width: 750px;transform: translateX(-50%);width: 100%;">
<!-- Header semplice con pulsante indietro e nome -->
<div class="tv-header" style="padding: 15px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;">
<div class="left-controls" style="display: flex; align-items: center;">
<a href="<?php echo $base_path; ?>/tv" data-page="tv" class="linkBox nav-link" style="color: #333; display: flex; align-items: center; text-decoration: none;">
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
</a>
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;"><?php echo $station_name; ?></span>
</div>
<?php if(!empty($station_logo)): ?>
<div class="right-controls">
<img src="<?php echo $station_logo; ?>" alt="Logo" style="height: 30px; width: auto;">
</div>
<?php endif; ?>
</div>
<!-- Area Video -->
<div class="video-wrapper" style="flex: 1; display: flex; align-items: center; justify-content: center; background-color: #000;">
<video id="tvVideoPlayer"
class="video-js"
controls
playsinline
data-src="<?php echo $station_stream; ?>"
poster="<?php echo $station_poster; ?>"
style="width: 100%; max-width: 100%; max-height: 100vh; aspect-ratio: 16/9;">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
</div>
</div>

View File

@@ -1,12 +1,27 @@
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
<?php
// views/home.php - Vista della pagina principale
$stations = loadTvStations();
?>
<h1 class="titlePage">TV</h1>
<p class="subtitlePage">Guarda in streaming <b>RC105 TV</b></p>
<p class="subtitlePage">Seleziona la webtv che vuoi guardare</p>
<hr>
<div class="tec">
<iframe src="https://tv.rpigroup.net/a9699134-efb3-4932-b8db-5a49ae214031.html" style="width:100%; height: 225px;" frameborder="no" scrolling="no" allowfullscreen="true"></iframe>
<div class="stationList">
<div class="row g-2">
<?php foreach ($stations as $station): ?>
<div class="col-6">
<div class="stationCard <?php if((string)$station->thematic === 'true'){echo "isthematic";} ?>" data-id="<?php echo $station->id; ?>">
<a href="<?php echo $base_path; ?>/playtv/<?php echo $station->id; ?>" data-page="playtv/<?php echo $station->id; ?>" class="nav-link stationLink">
<img src="<?php echo $station->logo; ?>" alt="<?php echo $station->name; ?>" class="stationLogo">
</a>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox mt-3">