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>
This commit is contained in:
parent
19a0965eb2
commit
b3caac7a31
11 changed files with 512 additions and 135 deletions
|
|
@ -14,6 +14,7 @@
|
|||
<% if (has('poll')) { %><link rel="stylesheet" href="/alerts/poll.css?v=<%= boot %>"><% } %>
|
||||
<% if (has('hypebar')) { %><link rel="stylesheet" href="/alerts/hypebar.css?v=<%= boot %>"><% } %>
|
||||
<% if (has('raid')) { %><link rel="stylesheet" href="/alerts/raidcard.css?v=<%= boot %>"><% } %>
|
||||
<% if (has('video')) { %><link rel="stylesheet" href="/alerts/video.css?v=<%= boot %>"><% } %>
|
||||
<%# Now playing (Feishin) is switched off for now. To bring it back: add 'nowplaying' to PARTS in
|
||||
src/routers/overlay.js, uncomment the /nowplaying route in src/app.js and restore the NOWPLAYING lines here:
|
||||
<link rel="stylesheet" href="/alerts/nowplaying.css"> (inside an if (has('nowplaying')))
|
||||
|
|
@ -87,6 +88,7 @@
|
|||
<% if (has('poll')) { %><script src="/alerts/poll.js?v=<%= boot %>"></script><% } %>
|
||||
<% if (has('hypebar')) { %><script src="/alerts/hypebar.js?v=<%= boot %>"></script><% } %>
|
||||
<% if (has('raid')) { %><script src="/alerts/raidcard.js?v=<%= boot %>"></script><% } %>
|
||||
<% if (has('video')) { %><script src="/alerts/video.js?v=<%= boot %>"></script><% } %>
|
||||
<script>
|
||||
const S = <%- JSON.stringify(settings) %>;
|
||||
window.S = S; // chat.js reads message_timeout / max_messages from here (settings_update keeps it current)
|
||||
|
|
@ -173,7 +175,12 @@
|
|||
// NOWPLAYING: if (msg.type === 'nowplaying') { if (PARTS.has('nowplaying')) NowPlaying.update(msg.np); return; }
|
||||
if (msg.type === 'nowplaying') return;
|
||||
if (msg.type === 'raid_card') { if (PARTS.has('raid')) RaidCard.update(msg.phase, msg.raid); return; }
|
||||
if (msg.type === 'alert_skip') { if (PARTS.has('alerts')) PolaroidAlerts.skip(); return; }
|
||||
if (msg.type === 'alert_skip') { if (PARTS.has('alerts')) PolaroidAlerts.skip(); if (PARTS.has('video')) VideoFX.skip(); return; }
|
||||
// video redeems only play on the ?parts=video source
|
||||
if (msg.type === 'alert' && msg.alert.style === 'video') {
|
||||
if (PARTS.has('video')) msg.alert.test === true ? VideoFX.playTest(msg.alert) : VideoFX.play(msg.alert);
|
||||
return;
|
||||
}
|
||||
if (!PARTS.has('alerts')) return; // alerts and legacy actions below
|
||||
if (msg.type === 'alert') {
|
||||
// test buttons: replace other test alerts at once, but never cut off a real alert
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue