fix(HEL-718): bound synthetic idle audio and preserve RTP cadence
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import asyncio
|
||||
import json
|
||||
import sys
|
||||
|
||||
from playwright.async_api import async_playwright
|
||||
|
||||
OUT = sys.argv[1] if len(sys.argv) > 1 else "."
|
||||
|
||||
|
||||
async def main():
|
||||
async with async_playwright() as pw:
|
||||
browser = await pw.chromium.launch(
|
||||
headless=True,
|
||||
args=["--autoplay-policy=no-user-gesture-required", "--no-sandbox"],
|
||||
)
|
||||
page = await browser.new_page(viewport={"width": 1280, "height": 800})
|
||||
await page.goto("http://192.168.200.12:8933/")
|
||||
await page.evaluate("diagRun()")
|
||||
await page.wait_for_function("document.title === 'done'", timeout=180000)
|
||||
from pathlib import Path
|
||||
out = Path(OUT)
|
||||
out.mkdir(parents=True, exist_ok=True)
|
||||
events = await page.evaluate("window.diagResult.events")
|
||||
async with page.expect_download() as pending:
|
||||
await page.evaluate("""() => {const a=document.createElement('a'); a.href=window.diagResult.blobUrl;a.download='graph.webm';a.click()}""")
|
||||
await (await pending.value).save_as(out / 'graph-after.webm')
|
||||
(out / 'graph-after.events.json').write_text(json.dumps(events, indent=2))
|
||||
print('saved graph audio/video', flush=True)
|
||||
await browser.close()
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user