blob: a4f93de1bd3697dd4567cda12334dae9e6b0af5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shared Media</title>
<link rel="stylesheet" href="/css/theme.css">
<link rel="stylesheet" href="/css/player.css">
<style>
body {
margin: 0;
min-height: 100vh;
background: var(--bg-body);
color: var(--text-primary);
font-family: var(--font-sans);
display: flex;
flex-direction: column;
}
.page-wrap {
flex: 1 1 auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1rem;
box-sizing: border-box;
}
.container {
width: 100%;
max-width: 720px;
text-align: center;
}
h1 {
margin: 0 0 1rem;
font-size: 1.25rem;
color: var(--text-primary);
}
/* Player overrides for standalone share page */
.player {
display: block;
position: static;
border-top: none;
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-md);
}
.player .stage {
height: clamp(14rem, 35vh, 28rem);
background: var(--player-stage-bg);
}
.player.is-fullscreen {
position: fixed;
inset: 0;
z-index: 100;
border-radius: 0;
}
</style>
</head>
<body>
<div class="page-wrap">
<div class="container">
<h1>Shared Media</h1>
<aside id="player" class="player open" aria-label="Player">
<div class="stage">
<video id="media-video" playsinline controlslist="nodownload"></video>
<audio id="media-audio" class="hidden"></audio>
<img id="cover-art" class="cover-art hidden" alt="Cover" loading="lazy">
<div id="big-play" class="big-play" role="button" aria-label="Play" tabindex="0">
<div class="play-icon">▶</div>
</div>
</div>
<div class="controls">
<button id="btn-toggle-stage" class="icon-btn" aria-label="Toggle stage">⛺</button>
<button id="btn-play" class="icon-btn" aria-label="Play/Pause">▶</button>
<div class="time" id="time-elapsed">0:00</div>
<div id="progress-track" class="progress-track" tabindex="0" aria-label="Seek">
<div id="progress-buffered" class="progress-buffered"></div>
<div id="progress-fill" class="progress-fill"></div>
<div id="progress-thumb" class="progress-thumb" aria-hidden="true"></div>
</div>
<div class="time" id="time-total">0:00</div>
<div class="volume-control">
<button id="btn-mute" class="icon-btn" aria-label="Mute">🔊</button>
<input id="volume-slider" type="range" min="0" max="1" step="0.05" value="1" class="volume-slider" aria-label="Volume">
</div>
<button id="btn-download" class="icon-btn" aria-label="Download">⭳</button>
<button id="btn-fullscreen" class="icon-btn" aria-label="Fullscreen">⛺</button>
</div>
</aside>
</div>
</div>
<script type="module">
import { initPlayer, loadMediaDirect } from '/js/player.js';
initPlayer();
const metaEl = document.getElementById('share-meta');
let data = null;
try {
data = JSON.parse(metaEl.textContent);
} catch {}
if (data && data.media) {
loadMediaDirect(data.media, data.stream_url, data.thumb_url, 0);
const dlBtn = document.getElementById('btn-download');
if (dlBtn && data.download_url) {
dlBtn.addEventListener('click', () => { location.href = data.download_url; });
}
}
</script>
<script id="share-meta" type="application/json"><!--SHARE_MEDIA--></script>
</body>
</html>
|