forked from steveseguin/ssn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplaymessages.html
More file actions
179 lines (172 loc) · 5.21 KB
/
replaymessages.html
File metadata and controls
179 lines (172 loc) · 5.21 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Replay Messages</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 800px;
margin: 0 auto;
background-color: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
margin-top: 0;
color: #333;
}
.control-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type="datetime-local"], select {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.button-group {
display: flex;
gap: 10px;
margin-top: 20px;
}
button {
padding: 10px 20px;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
#playBtn {
background-color: #4CAF50;
color: white;
}
#playBtn:hover:not(:disabled) {
background-color: #45a049;
}
#pauseBtn {
background-color: #ff9800;
color: white;
}
#pauseBtn:hover:not(:disabled) {
background-color: #e68900;
}
#stopBtn {
background-color: #f44336;
color: white;
}
#stopBtn:hover:not(:disabled) {
background-color: #da190b;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.status {
margin-top: 20px;
padding: 15px;
background-color: #f0f0f0;
border-radius: 4px;
min-height: 50px;
}
.status h3 {
margin-top: 0;
color: #555;
}
#statusText {
color: #666;
margin: 5px 0;
}
#progressBar {
width: 100%;
height: 20px;
background-color: #e0e0e0;
border-radius: 10px;
overflow: hidden;
margin-top: 10px;
display: none;
}
#progressFill {
height: 100%;
background-color: #4CAF50;
width: 0%;
transition: width 0.3s;
}
.info {
margin-top: 20px;
padding: 15px;
background-color: #e3f2fd;
border-radius: 4px;
border-left: 4px solid #2196F3;
}
.speed-control {
display: flex;
align-items: center;
gap: 10px;
}
#speedSlider {
flex: 1;
}
#speedValue {
min-width: 40px;
text-align: right;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<h1>Replay Messages</h1>
<div class="info">
<strong>How to use:</strong> Select a date and time to start replaying messages from your chat history. Messages will be sent to connected overlays as if they were live.
</div>
<div class="control-group">
<label for="startTime">Start Date & Time:</label>
<input type="datetime-local" id="startTime" />
</div>
<div class="control-group">
<label for="endTime">End Date & Time (Optional):</label>
<input type="datetime-local" id="endTime" />
<small style="color: #666;">Leave empty to replay all messages from start time</small>
</div>
<div class="control-group">
<label>Playback Speed:</label>
<div class="speed-control">
<input type="range" id="speedSlider" min="0.25" max="4" step="0.25" value="1" />
<span id="speedValue">1x</span>
</div>
</div>
<div class="button-group">
<button id="playBtn">Play</button>
<button id="pauseBtn" disabled>Pause</button>
<button id="stopBtn" disabled>Stop</button>
</div>
<div class="status">
<h3>Status</h3>
<div id="statusText">Ready to replay messages</div>
<div id="currentTime" style="margin-top: 10px; font-weight: bold; color: #2196F3;"></div>
<div id="progressBar">
<div id="progressFill"></div>
</div>
<div id="messageCount" style="margin-top: 10px;"></div>
<div id="debugInfo" style="margin-top: 10px; font-size: 12px; color: #666;"></div>
</div>
</div>
<script src="replaymessages.js"></script>
</body>
</html>