- Removed the audio additions and reverted the app back to the prior video-focused behavior.
Audio upload support, waveform generation, Video.js audio rendering branches, audio quality labels, and “Add Media” wording were removed from: [includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php), [admin/add.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/add.php), [admin/edit.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/edit.php), [index.php](/Users/tyemeclifford/Documents/GH/mediaplayer/index.php), [embed.php](/Users/tyemeclifford/Documents/GH/mediaplayer/embed.php), README, and changelog.
This commit is contained in:
@@ -58,13 +58,6 @@ $native_player_sources = [];
|
||||
foreach ($player_sources as $player_source) {
|
||||
if (($player_source['kind'] ?? '') !== 'iframe') $native_player_sources[] = $player_source;
|
||||
}
|
||||
$native_player_mode = (($primary_player_source['kind'] ?? '') === 'audio') ? 'audio' : 'video';
|
||||
$active_native_sources = [];
|
||||
foreach ($native_player_sources as $player_source) {
|
||||
$kind = $player_source['kind'] ?? '';
|
||||
if ($native_player_mode === 'audio' && $kind === 'audio') $active_native_sources[] = $player_source;
|
||||
if ($native_player_mode === 'video' && $kind !== 'audio') $active_native_sources[] = $player_source;
|
||||
}
|
||||
|
||||
$site_title = setting('site_title', 'Ty Clifford');
|
||||
if ($home_live_first) {
|
||||
@@ -196,45 +189,6 @@ render_head($share_title, '
|
||||
.video-js .vjs-current-time,
|
||||
.video-js .vjs-duration,
|
||||
.video-js .vjs-time-divider { color:rgba(255,255,255,.8) !important; font-size:.7em !important; }
|
||||
.audio-player-frame {
|
||||
position:absolute; inset:0;
|
||||
display:flex; align-items:flex-end; justify-content:center;
|
||||
padding:1rem;
|
||||
background:radial-gradient(circle at 50% 35%, rgba(176,96,255,.12), transparent 55%), #09090f;
|
||||
}
|
||||
.audio-waveform-art {
|
||||
position:absolute; inset:0;
|
||||
display:flex; align-items:center; justify-content:center;
|
||||
background:linear-gradient(180deg,rgba(9,9,15,.2),rgba(9,9,15,.82));
|
||||
overflow:hidden;
|
||||
}
|
||||
.audio-waveform-art img {
|
||||
width:100%; height:100%; object-fit:cover;
|
||||
opacity:.92; filter:saturate(1.15) contrast(1.05);
|
||||
}
|
||||
.audio-waveform-fallback {
|
||||
position:absolute; inset:0;
|
||||
background:
|
||||
linear-gradient(90deg, transparent 0 4%, rgba(0,232,122,.34) 4% 5%, transparent 5% 9%),
|
||||
radial-gradient(circle at 50% 35%, rgba(0,232,122,.12), transparent 55%),
|
||||
#09090f;
|
||||
background-size:90px 100%, 100% 100%, 100% 100%;
|
||||
opacity:.9;
|
||||
}
|
||||
.audio-player-frame .video-js {
|
||||
position:relative !important; inset:auto !important;
|
||||
width:100% !important; max-width:calc(100% - 1rem) !important;
|
||||
height:4.2rem !important;
|
||||
background:rgba(9,9,15,.86) !important;
|
||||
border:1px solid rgba(255,255,255,.08);
|
||||
border-radius:var(--r);
|
||||
overflow:hidden;
|
||||
box-shadow:0 10px 30px rgba(0,0,0,.35);
|
||||
}
|
||||
.audio-player-frame .video-js .vjs-control-bar {
|
||||
background:rgba(9,9,15,.92) !important;
|
||||
height:4.2rem !important;
|
||||
}
|
||||
.provider-embed-frame {
|
||||
position:absolute; inset:0;
|
||||
display:block; width:100%; height:100%;
|
||||
@@ -392,44 +346,23 @@ render_head($share_title, '
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
|
||||
allowfullscreen
|
||||
referrerpolicy="no-referrer-when-downgrade"></iframe>
|
||||
<?php elseif ($video && !empty($active_native_sources)): ?>
|
||||
<?php if ($native_player_mode === 'audio'): ?>
|
||||
<div class="audio-player-frame">
|
||||
<div class="audio-waveform-art" aria-hidden="true">
|
||||
<?php if ($video['thumbnail']): ?>
|
||||
<img src="<?= h(public_media_url($video['thumbnail'])) ?>" alt="">
|
||||
<?php else: ?>
|
||||
<div class="audio-waveform-fallback"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<audio id="main-player"
|
||||
class="video-js vjs-default-skin"
|
||||
controls preload="metadata"
|
||||
data-setup='{"fluid":false,"responsive":true,"playbackRates":[0.5,1,1.25,1.5,2]}'>
|
||||
<?php foreach ($active_native_sources as $src): ?>
|
||||
<source src="<?= h($src['url']) ?>" type="<?= h($src['mime']) ?>" label="<?= h($src['label']) ?>">
|
||||
<?php endforeach; ?>
|
||||
<p class="vjs-no-js">Your browser does not support HTML audio.</p>
|
||||
</audio>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<video id="main-player"
|
||||
class="video-js vjs-default-skin vjs-big-play-centered"
|
||||
controls preload="metadata"
|
||||
<?php if ($video['thumbnail']): ?>
|
||||
poster="<?= h(public_media_url($video['thumbnail'])) ?>"
|
||||
<?php endif; ?>
|
||||
data-setup='{"fluid":false,"responsive":true,"playbackRates":[0.5,1,1.25,1.5,2]}'>
|
||||
<?php foreach ($active_native_sources as $src): ?>
|
||||
<source src="<?= h($src['url']) ?>" type="<?= h($src['mime']) ?>" label="<?= h($src['label']) ?>">
|
||||
<?php endforeach; ?>
|
||||
<p class="vjs-no-js">Your browser does not support HTML video.</p>
|
||||
</video>
|
||||
<?php endif; ?>
|
||||
<?php elseif ($video && !empty($native_player_sources)): ?>
|
||||
<video id="main-player"
|
||||
class="video-js vjs-default-skin vjs-big-play-centered"
|
||||
controls preload="metadata"
|
||||
<?php if ($video['thumbnail']): ?>
|
||||
poster="<?= h(public_media_url($video['thumbnail'])) ?>"
|
||||
<?php endif; ?>
|
||||
data-setup='{"fluid":false,"responsive":true,"playbackRates":[0.5,1,1.25,1.5,2]}'>
|
||||
<?php foreach ($native_player_sources as $src): ?>
|
||||
<source src="<?= h($src['url']) ?>" type="<?= h($src['mime']) ?>" label="<?= h($src['label']) ?>">
|
||||
<?php endforeach; ?>
|
||||
<p class="vjs-no-js">Your browser does not support HTML video.</p>
|
||||
</video>
|
||||
<?php else: ?>
|
||||
<div class="no-video">
|
||||
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" opacity=".25"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
|
||||
<p>no media selected</p>
|
||||
<p>no video selected</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user