소리 크기 맞추기(노멀라이즈): 곡마다 유튜브가 잰 크기(영상 페이지 audioConfig LUFS)를 저장하고, 재생 볼륨 = 내 볼륨 × 곡 보정값으로 -18 LUFS에 맞춤(유튜브 IFrame이 -14로 줄이는 것 위에, 작은 곡은 최대). prepare·catchup에 gain, 안 잰 곡은 보통 곡 값(0.63). 영상이 바뀌면 다시 잼(loudness_video). cli loudness 작업(인기곡부터·차단 시 멈춤·--deadline)·관리자 수집 화면, heatmap도 같은 페이지에서 저장. 실제 유튜브 e2e로 플레이어 볼륨 확인

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-19 23:41:51 +09:00
parent 86bd2d8166
commit 37c1440892
17 changed files with 262 additions and 37 deletions

View File

@@ -8,7 +8,7 @@
* everyone is paused; it keeps running after the clip ends.
*/
import { hintText, isCorrect, voteThreshold, type GameHistoryItem, type GamePhase, type GameView, type ServerMessage } from '@mq/shared';
import { clipOf, lyricsCard, mainArtists, markUnplayable, orderSongs, quizSong, type QuizSong } from '../songs/quiz';
import { clipOf, loudnessGain, lyricsCard, mainArtists, markUnplayable, orderSongs, quizSong, type QuizSong } from '../songs/quiz';
import { poolIds } from '../songs/pool';
import type { Room } from '../rooms/manager';
@@ -206,7 +206,7 @@ export class Game {
this.ready.clear();
this.waitingSince.clear();
for (const id of this.active()) this.waitingSince.set(id, now);
this.toActive({ t: 'prepare', code: this.room.code, n: this.n, videoId: this.song!.videoId!, startSec: atSec, endSec: this.clip.endSec });
this.toActive({ t: 'prepare', code: this.room.code, n: this.n, videoId: this.song!.videoId!, startSec: atSec, endSec: this.clip.endSec, gain: loudnessGain(this.song!.loudness) });
}
private checkReady(): void {
@@ -515,10 +515,10 @@ export class Game {
if (this.awaitingReady) {
this.ready.delete(userId);
if (!this.waitingSince.has(userId)) this.waitingSince.set(userId, this.now());
send({ t: 'prepare', code: this.room.code, n: this.n, videoId: this.song.videoId, startSec: this.resumeAt, endSec: this.clip.endSec });
send({ t: 'prepare', code: this.room.code, n: this.n, videoId: this.song.videoId, startSec: this.resumeAt, endSec: this.clip.endSec, gain: loudnessGain(this.song.loudness) });
this.broadcast();
} else if (this.playing && !this.clipOver) {
send({ t: 'catchup', code: this.room.code, n: this.n, videoId: this.song.videoId, clipStart: this.clip.startSec, startAt: this.audioStartAt, atSec: this.audioAtSec, endSec: this.clip.endSec });
send({ t: 'catchup', code: this.room.code, n: this.n, videoId: this.song.videoId, clipStart: this.clip.startSec, startAt: this.audioStartAt, atSec: this.audioAtSec, endSec: this.clip.endSec, gain: loudnessGain(this.song.loudness) });
}
}