forked from gbowne1/codestream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgo-live.html
More file actions
116 lines (99 loc) · 4.67 KB
/
go-live.html
File metadata and controls
116 lines (99 loc) · 4.67 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Go Live | 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>
.preview-container {
background: #000;
border-radius: 8px;
overflow: hidden;
aspect-ratio: 16/9;
}
.preview-container video {
width: 100%;
height: 100%;
object-fit: contain;
}
.source-btn {
min-width: 120px;
}
</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 active 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"><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-8">
<div class="card shadow-sm">
<div class="card-header bg-primary text-white">
<h2 class="h5 mb-0"><i class="fas fa-video me-2"></i>Go Live Dashboard</h2>
</div>
<div class="card-body">
<!-- Connection Status -->
<div id="connectionStatus" class="alert alert-secondary d-flex align-items-center" role="alert">
<i class="fas fa-circle me-2"></i>
<span>Ready to stream</span>
</div>
<!-- Video Preview -->
<div class="preview-container mb-4">
<video id="localPreview" autoplay muted playsinline></video>
</div>
<!-- Source Selection -->
<div class="d-flex gap-2 mb-4 flex-wrap">
<button id="shareScreenBtn" class="btn btn-outline-primary source-btn">
<i class="fas fa-desktop me-1"></i> Share Screen
</button>
<button id="useCameraBtn" class="btn btn-outline-secondary source-btn">
<i class="fas fa-camera me-1"></i> Use Camera
</button>
</div>
<!-- Stream Name -->
<div class="mb-4">
<label for="streamName" class="form-label">Stream Name</label>
<input type="text" id="streamName" class="form-control"
placeholder="Enter a unique stream name" value="">
</div>
<hr>
<!-- Stream Controls -->
<div class="d-grid gap-2">
<button id="startStreamBtn" class="btn btn-success btn-lg" disabled>
<i class="fas fa-signal me-2"></i>Start Streaming
</button>
<button id="stopStreamBtn" class="btn btn-danger btn-lg d-none">
<i class="fas fa-stop me-2"></i>Stop Streaming
</button>
</div>
<div class="mt-3 text-center text-muted">
<small id="streamStats">Select a video source to begin</small>
</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/go-live.js"></script>
</body>
</html>