-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathwatch.html
More file actions
118 lines (106 loc) · 5.08 KB
/
watch.html
File metadata and controls
118 lines (106 loc) · 5.08 KB
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
117
118
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Watch Stream | DevStream</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
crossorigin="anonymous" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css" rel="stylesheet" />
<link rel="stylesheet" href="/src/css/style.css" />
<style>
.video-container {
background: #000;
border-radius: 8px;
overflow: hidden;
aspect-ratio: 16/9;
max-height: 70vh;
}
.video-container video {
width: 100%;
height: 100%;
object-fit: contain;
}
.status-badge {
font-size: 0.9rem;
padding: 0.5rem 1rem;
}
</style>
</head>
<body class="bg-light">
<!-- Header -->
<header class="sticky-top bg-white shadow-sm">
<div class="container d-flex justify-content-between align-items-center py-3">
<a href="/" class="text-decoration-none text-dark">
<h1 class="h4 mb-0">DevStream</h1>
</a>
<nav aria-label="Main navigation">
<ul class="nav align-items-center gap-3">
<li class="nav-item"><a href="/" class="nav-link">Home</a></li>
<li class="nav-item"><a href="/go-live.html" class="nav-link text-danger fw-bold"><i
class="fas fa-video me-1"></i>Go Live</a></li>
<li class="nav-item"><a href="/watch.html" class="nav-link active fw-bold"><i
class="fas fa-eye me-1"></i>Watch</a></li>
</ul>
</nav>
</div>
</header>
<main class="container mt-5">
<div class="row justify-content-center">
<div class="col-lg-10">
<!-- Join Form (shown when not connected) -->
<div id="joinSection" class="card shadow-sm mb-4">
<div class="card-header bg-primary text-white">
<h2 class="h5 mb-0"><i class="fas fa-play-circle me-2"></i>Join a Stream</h2>
</div>
<div class="card-body">
<div class="row g-3 align-items-end">
<div class="col-md-8">
<label for="roomIdInput" class="form-label">Stream Room ID</label>
<input type="text" id="roomIdInput" class="form-control form-control-lg"
placeholder="Enter the stream name or room ID" />
</div>
<div class="col-md-4">
<button id="joinBtn" class="btn btn-success btn-lg w-100">
<i class="fas fa-sign-in-alt me-2"></i>Join Stream
</button>
</div>
</div>
<p class="text-muted mt-3 mb-0">
<i class="fas fa-info-circle me-1"></i>
Ask the broadcaster for their stream room ID, or check the Go Live page.
</p>
</div>
</div>
<!-- Video Player (shown when connected) -->
<div id="playerSection" class="d-none">
<div class="card shadow-sm">
<div class="card-header bg-dark text-white d-flex justify-content-between align-items-center">
<h2 class="h5 mb-0">
<i class="fas fa-broadcast-tower me-2"></i>
<span id="streamTitle">Stream</span>
</h2>
<span id="statusBadge" class="badge bg-secondary status-badge">Connecting...</span>
</div>
<div class="card-body p-0">
<div class="video-container">
<video id="streamPlayer" controls autoplay playsinline></video>
</div>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<span id="connectionInfo" class="text-muted">
<i class="fas fa-wifi me-1"></i> Waiting for stream...
</span>
<button id="leaveBtn" class="btn btn-outline-danger">
<i class="fas fa-sign-out-alt me-1"></i> Leave Stream
</button>
</div>
</div>
</div>
</div>
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script type="module" src="/src/js/watch.js"></script>
</body>
</html>