feat: Mini-Player zeigt gespielte Zeit, Gesamtdauer und Fortschrittsbalken (#1189); Version 0.1.17-rc5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg6sxZ8wsKZAVLQ6Xj5
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
// Kleiner Treiber für Chromium über das DevTools-Protokoll (nur lokal, für UI-Tests).
|
||||
import { spawn } from 'node:child_process';
|
||||
import fs from 'node:fs';
|
||||
export async function start({ port = 9333 } = {}) {
|
||||
export async function start({ port = 9333, args = [] } = {}) {
|
||||
const dir = fs.mkdtempSync('/tmp/cdp-prof-');
|
||||
const proc = spawn('/usr/bin/chromium', ['--headless=new', '--no-sandbox', '--disable-gpu', `--remote-debugging-port=${port}`, `--user-data-dir=${dir}`, 'about:blank'], { stdio: 'ignore' });
|
||||
const proc = spawn('/usr/bin/chromium', ['--headless=new', '--no-sandbox', '--disable-gpu', ...args, `--remote-debugging-port=${port}`, `--user-data-dir=${dir}`, 'about:blank'], { stdio: 'ignore' });
|
||||
let info;
|
||||
for (let i = 0; i < 50; i++) {
|
||||
try { info = await (await fetch(`http://127.0.0.1:${port}/json`)).json(); if (info.length) break; } catch { /* warten */ }
|
||||
|
||||
Reference in New Issue
Block a user