Initial commit — HeyStreamer v1
Twitch stream event platform with OBS browser source overlay. Features: - Twitch OAuth login (streamer + mod access) - EventSub WebSocket for subs, gift subs, bits, channel points, follows, raids - Chat commands via tmi.js in the overlay - Gap audio — tone plays on new chat message after silence, volume/pitch scale with gap length - Self-hosted media library (upload sounds and videos) - Action configuration — map any event to sound, video, or alert - Per-action cooldowns, test button, enable/disable toggle - Multiple actions per event (all matching actions fire) - Activity log dashboard with EventSub connection status - Layout editor — iframe-based WYSIWYG with drag handles, live style preview - Custom CSS and custom JS injection into overlay - Custom DOM events (heystreamer:sub, heystreamer:raid, etc.) for custom JS hooks - deploy.sh — one-shot setup and launch script Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
b9291f455e
37 changed files with 2180 additions and 0 deletions
0
static/media/.gitkeep
Normal file
0
static/media/.gitkeep
Normal file
74
static/overlay.css
Normal file
74
static/overlay.css
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
font-family: 'Segoe UI', Arial, sans-serif;
|
||||
}
|
||||
|
||||
#chat {
|
||||
position: fixed;
|
||||
left: var(--chat-left, 72%);
|
||||
top: var(--chat-top, 5%);
|
||||
width: var(--chat-width, 27%);
|
||||
height: var(--chat-height, 88%);
|
||||
font-size: var(--chat-font-size, 14px);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
padding: 8px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.chat-msg {
|
||||
background: rgba(0, 0, 0, var(--chat-bg-opacity, 0.55));
|
||||
border-radius: 6px;
|
||||
padding: 5px 8px;
|
||||
color: var(--chat-text-color, #fff);
|
||||
line-height: 1.4;
|
||||
word-break: break-word;
|
||||
animation: fadein 0.2s ease;
|
||||
}
|
||||
|
||||
.uname { font-weight: bold; }
|
||||
|
||||
#alert {
|
||||
position: fixed;
|
||||
left: var(--alert-left, 50%);
|
||||
top: var(--alert-top, 40%);
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, var(--alert-bg-opacity, 0.8));
|
||||
color: var(--alert-text-color, #fff);
|
||||
padding: 1rem 2rem;
|
||||
border-radius: 12px;
|
||||
font-size: var(--alert-font-size, 24px);
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
max-width: 80vw;
|
||||
animation: popin 0.3s ease;
|
||||
}
|
||||
|
||||
#alert-video-wrap {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#alert-video {
|
||||
max-width: 80vw;
|
||||
max-height: 80vh;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from { opacity: 0; transform: translateY(6px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes popin {
|
||||
from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
|
||||
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
||||
}
|
||||
87
static/style.css
Normal file
87
static/style.css
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/* Management UI */
|
||||
.login-page { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
|
||||
.login-card { text-align: center; max-width: 360px; }
|
||||
.twitch-btn { background: #9146ff; border-color: #9146ff; color: #fff; display: inline-block; }
|
||||
.twitch-btn:hover { background: #772ce8; border-color: #772ce8; }
|
||||
|
||||
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
|
||||
@media (max-width: 768px) { .form-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.status-bar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; padding: 0.5rem 1rem; border-radius: var(--pico-border-radius); background: var(--pico-card-background-color); }
|
||||
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
|
||||
.status-dot.connected { background: #2ecc71; }
|
||||
.status-dot.disconnected { background: #e74c3c; }
|
||||
|
||||
.action-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--pico-table-border-color); gap: 1rem; }
|
||||
.action-info { flex: 1; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
|
||||
.action-controls { display: flex; gap: 0.5rem; flex-shrink: 0; }
|
||||
|
||||
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
|
||||
.media-item { background: var(--pico-card-background-color); border-radius: var(--pico-border-radius); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
|
||||
.media-info { display: flex; align-items: center; gap: 0.5rem; }
|
||||
.media-type-badge { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 999px; font-weight: bold; text-transform: uppercase; }
|
||||
.media-type-badge.audio { background: #2980b9; color: #fff; }
|
||||
.media-type-badge.video { background: #8e44ad; color: #fff; }
|
||||
.media-item audio, .media-item video { width: 100%; }
|
||||
|
||||
.small-btn { padding: 0.25rem 0.6rem; font-size: 0.8rem; margin-bottom: 0; }
|
||||
.tested-badge { color: #2ecc71; font-size: 0.85rem; animation: fadeout 2s ease 1s forwards; }
|
||||
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
|
||||
.muted { color: var(--pico-muted-color); }
|
||||
section { margin-bottom: 2rem; }
|
||||
.url-input { font-family: monospace; font-size: 0.85em; }
|
||||
.code-textarea { font-family: 'Fira Code', 'Consolas', 'Monaco', monospace; font-size: 0.82rem; resize: vertical; }
|
||||
.notice-success { background: #1a3a1a; border: 1px solid #2ecc71; border-radius: var(--pico-border-radius); padding: 0.75rem 1rem; margin-bottom: 1rem; }
|
||||
|
||||
/* Layout editor */
|
||||
.editor-wrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--pico-table-border-color);
|
||||
background: #000;
|
||||
}
|
||||
.drag-handle {
|
||||
position: absolute;
|
||||
border: 2px dashed rgba(145, 70, 255, 0.7);
|
||||
border-radius: 4px;
|
||||
cursor: move;
|
||||
user-select: none;
|
||||
z-index: 10;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 0.1s;
|
||||
}
|
||||
.drag-handle:hover { border-color: rgba(145, 70, 255, 1); background: rgba(145,70,255,0.08); }
|
||||
.handle-label {
|
||||
font-size: 0.6rem;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: rgba(145, 70, 255, 0.9);
|
||||
padding: 2px 5px;
|
||||
background: rgba(0,0,0,0.6);
|
||||
border-radius: 2px;
|
||||
width: fit-content;
|
||||
}
|
||||
.resize-corner {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: rgba(145, 70, 255, 0.8);
|
||||
border-top-left-radius: 4px;
|
||||
cursor: se-resize;
|
||||
}
|
||||
.canvas-footer { display: flex; justify-content: space-between; align-items: center; margin: 0.4rem 0 1rem; }
|
||||
.style-form { margin-top: 0.5rem; }
|
||||
.props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
|
||||
@media (max-width: 768px) { .props-grid { grid-template-columns: 1fr; } }
|
||||
.props-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
|
||||
.props-row label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
|
||||
.props-row input[type="number"] { width: 70px; margin-bottom: 0; padding: 0.3rem; }
|
||||
.props-row input[type="range"] { width: 100px; margin-bottom: 0; }
|
||||
.props-row input[type="color"] { width: 48px; height: 36px; padding: 2px; border-radius: 4px; cursor: pointer; margin-bottom: 0; }
|
||||
.props-row span { font-size: 0.75rem; color: var(--pico-muted-color); }
|
||||
Loading…
Add table
Add a link
Reference in a new issue