Скрыть имя аудиофайла на табло

Подпись с именем файла выдавала ответ; на пульте осталась.
В README добавлено правило нейтральных имён файлов.
This commit is contained in:
oskarvitalii committed 2026-11-18 20:42:36 +07:00
1 parent 7dfe61695d
commit 7f1d26d819
3 files changed
+32 -3

No files matched your search

+14
View File
@@ -134,6 +134,20 @@ try {
const onHost = await host.$eval('.remote-note', (node) => node.textContent?.replace(/\s+/g, ' ').trim())
console.log(` пульт: ${onHost ?? 'нет статуса'}`)
// Имя файла — это ответ: «jingle-bells.wav» игроки видят и угадывают сразу.
const boardNames = await board.$$eval('.audio-name', (nodes) =>
nodes.map((node) => node.textContent?.trim()),
)
console.log(` подписей с именем файла на табло: ${boardNames.length}`)
if (boardNames.length > 0) throw new Error(`табло показывает имя файла: ${boardNames.join(', ')}`)
const boardAudioSrc = await board.$eval('audio', (node) => node.getAttribute('src'))
console.log(` src в разметке табло: ${boardAudioSrc}`)
const hostFile = await host.$eval('.remote-file', (node) => node.textContent?.trim())
console.log(` на пульте имя файла осталось: ${hostFile}`)
if (!hostFile) throw new Error('ведущий потерял имя файла')
console.log('3. жму «Играть» на пульте')
await host.evaluate(() => {
const button = Array.from(document.querySelectorAll('.media-remote button')).find((node) =>