Commit graph

10 commits

Author SHA1 Message Date
b3caac7a31 Video Power-ups: Custom Power-ups, ?parts=video overlay, new redeems editor
- Custom Power-ups (bits) are redeem triggers: channel.custom_power_up_redemption.add
  -> redeems.handle('custom_power_up', ...) with the bits amount; listed live from
  Helix /bits/custom_power_ups on the Redeems page; labels/replay in Recent activity.
- Variations can show a video (reward_variations.video): style 'video' plays only on
  the opt-in ?parts=video overlay (public/alerts/video.js), full-screen, one at a time,
  with a yellow camcorder box ("TRIGGERED <name>", viewer, bits, POWER-UP) in the alert
  corner. Any source size; 2560x1440 like HUDFX gives sharper video.
- Redeems page rewritten as one editor: Display (Cassette / Sound only / Video),
  volume slider, sticker thumbnails, live % chances, one Save button + Ctrl+S
  (POST /redeems/save), tests/add/delete save first, unsaved edits kept as a browser
  draft with an inline restore bar (no dialogs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:10:56 +02:00
cf90b6be54 TTS: allow up to 500 characters, smaller handwriting on the letter for long messages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:03:07 +02:00
060b2351f7 TTS redeems: envelope letter with words inked in as spoken
- TTS alerts use the new `tts` style: envelope opens, the letter rises out
  and settles in front near the top, words ink in as the voice says them
  (timed from a loudness curve the server sends: tts.loudness, tts_env,
  tts_prefix); if the voice fails, the full text shows
- Highlight my message keeps its taped note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:42:36 +02:00
4fda6060bf TTS redeems, skip button, per-source chat placement
- Redeem variations can have a TTS voice: the viewer's text is cleaned
  (links out, repeats collapsed, max length, blocked words -> not read),
  spoken as "<name> says: ..." and shown as the big paper note; the
  variation's sound is not played when TTS is on (picker greyed out)
- Settings: TTS max length, say-the-name, blocked words (never sent to
  overlay pages: db.getOverlaySettings)
- Dashboard "Skip current alert" -> /alerts/skip -> overlay skips it
- db.migrate()/addColumn: new columns on existing databases
- Chat: ?chat=left,top,width,height and ?chatflow=up per browser source
  (e.g. the Intermission panel); default unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:34:41 +02:00
463c6580f4 Chat: paper slips under the camera, Twitch + 7TV emotes
- public/chat/chat.css + chat.js (window.HSChat): cream paper slips with the
  name on a washi-tape label, newest on top sliding out from under the webcam,
  older ones glide down and fade at the bottom; message_timeout / max_messages
- Emotes: Twitch (tags.emotes) and 7TV global + channel sets (refreshed every
  10 min), zero-width 7TV emotes stack, emote-only messages get bigger emotes
- Deleted messages, timeouts, bans and /clear remove slips at once
- overlay.ejs: old chat CSS/JS removed, new files load only for ?parts=chat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 12:08:12 +02:00
0cc53e1d73 Play the 250+ bits sound at half volume
TomDaTankLoud is much louder than the other alert sounds; the 250+ bits tier now
sets its own volume (0.4 instead of the default 0.8). Other tiers unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:30:48 +02:00
1766e37336 Overlay: cassette redeems, emote effects, poll card, Hype Train bar, raid card
New overlay modules (taped-paper look, shared with the polaroid alerts):
- cassette.js: redeems as a cassette tape; rarity = shell colour (Ultra Rare gold
  with glow, foil and sparkles), reels spin for the sound's length, sticker corner.
- fx.js: Gigantify (viewer's emote grows giant), On-Screen Celebration (emote
  copies bounce around the screen), highlight / Message Effect (tall taped note).
- poll.js: live poll card with bars, countdown and a WINNER stamp.
- hypebar.js: persistent Hype Train strip (level, progress, time left).
- raidcard.js: silent raid send-off card that stays during the raid countdown.
- nowplaying.js: Feishin now-playing slip (not loaded yet, see overlay).

polaroid.js: shared queue now also drives cassettes/effects; test alerts replace
only other tests and never cut off real alerts; alerts stay up for the animation
+ 3 s or the sound's length; sound lengths measured in the browser for UI-picked
sounds; tip and Hype Train alerts; optional ALERTS_BASE for offline test pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:18:15 +02:00
d481fc4f69 Add polaroid alerts for follows, subs, gifts, streaks, raids and bits
Overlay
- public/alerts/polaroid.js + .css: animated polaroid (photo drops in, tape
  and heart stick on, caption writes in), randomized angles, per-event art,
  caption, tape colour, badge and sound, fanned photo stack for multi-month
  subs / community gifts / raids, and a queue so alerts never overlap.
- Bits: no alert under 5; sound tiers at 5/50/75/100/150/250.
- Watch streaks are read from chat (USERNOTICE viewermilestone) and reported
  to the server over the overlay WebSocket.

Server
- Subscribe to channel.chat.notification instead of channel.subscribe /
  subscription.message / subscription.gift / channel.raid: one event with
  Prime, months bought at once, gift recipient, resub message and community
  gift totals. Per-recipient gift notices of a gift bomb are skipped, so a
  bomb is one alert (was N+1). Needs the user:read:chat scope (log in again).
- src/alerts.js maps Twitch events to alerts, broadcasts them and still runs
  them through dispatch (activity log + existing actions).
- EventSub starts on boot from the stored login (alerts survive restarts),
  validates the token hourly and refreshes it on expiry or 401, follows
  session_reconnect without dropping events, and reconnects when keepalives
  stop.
- The overlay WebSocket only accepts chat_notice messages from connections
  that pass the overlay UUID; streak notices are deduped by message id.

Dashboard
- Twitch connection status and a test button per alert (POST /alerts/test/:key).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 19:57:36 +02:00
88e906ff5d Tidy repo: rename vhost script, keep media folder
- `sh` -> `apache.sh` (it writes the Apache vhost for overlay.example.com)
- keep public/media/ in git via .gitkeep while ignoring uploads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 19:57:29 +02:00
9e0ddb8182 Update gitignore 2026-11-20 18:55:47 +01:00