main
John Lauer
Verify current IC catalog lineage and resolve DGS manufacturer land patterns
9f7dac2
// Live headless public Wiki walkthrough, explicitly not native desktop footage.
import fs from 'node:fs';
const {default:puppeteer}=await import('/home/adom/project/adom-video-brand/node_modules/puppeteer-core/lib/esm/puppeteer/puppeteer-core.js');
const out='videos/opa-wiki-review';fs.mkdirSync(out,{recursive:true});
const browser=await puppeteer.launch({executablePath:'/home/adom/.cache/ms-playwright/chromium-1243/chrome-linux64/chrome',headless:true,args:['--no-sandbox','--use-angle=swiftshader','--enable-unsafe-swiftshader']});let recorder;
try{
const page=await browser.newPage();await page.setViewport({width:1920,height:1080,deviceScaleFactor:1});
await page.goto('https://wiki.adom.inc/adom/opa189idbvr',{waitUntil:'domcontentloaded',timeout:60000});
await page.waitForFunction(()=>[...document.querySelectorAll('button')].some(x=>x.textContent.trim()==='Load 3D model'),{timeout:60000});
await page.evaluate(()=>[...document.querySelectorAll('button')].find(x=>x.textContent.trim()==='Load 3D model').click());
await page.waitForFunction(()=>[...document.querySelectorAll('iframe')].some(x=>x.src.includes('/viewer/3d/')),{timeout:60000});
const frame=await page.waitForFrame(f=>f.url().includes('/viewer/3d/'),{timeout:60000});await frame.waitForFunction(()=>window.__viewerDrive?.status().loaded,{timeout:60000});
await frame.evaluate(()=>{const c=window.__viewerDrive.status().camera;return window.__viewerDrive.camera({alpha:c.alpha+Math.PI,beta:c.beta});});
await page.evaluate(()=>{for(const label of ['Load symbol viewer','Load footprint viewer']){const b=[...document.querySelectorAll('button')].find(x=>x.textContent.trim()===label);if(!b)throw Error('Missing '+label);b.click();}});
await new Promise(r=>setTimeout(r,5000));
if(fs.existsSync(out+'/live-wiki-walkthrough.webm'))throw Error('Preserve existing take');const start=Date.now();recorder=await page.screencast({path:out+'/live-wiki-walkthrough.webm',format:'webm',fps:30,ffmpegPath:'/usr/bin/ffmpeg',overwrite:true});
await frame.evaluate(()=>window.__viewerDrive.orbit({degrees:25,seconds:4}));
const scroll=await page.evaluate(async()=>{const h=[...document.querySelectorAll('h1,h2,h3,h4')].find(x=>x.textContent.trim()==='Symbol & Footprint');if(!h)throw Error('Missing Symbol & Footprint heading');const start=window.scrollY,target=Math.max(0,h.getBoundingClientRect().top+start-80);await new Promise(resolve=>{const t=performance.now();function go(){const k=Math.min(1,(performance.now()-t)/5000),e=k*k*(3-2*k);window.scrollTo(0,start+(target-start)*e);if(k<1)requestAnimationFrame(go);else resolve();}requestAnimationFrame(go);});return {start,target};});
await new Promise(r=>setTimeout(r,2000));await recorder.stop();recorder=null;
fs.writeFileSync(out+'/capture.json',JSON.stringify({url:page.url(),wallMilliseconds:Date.now()-start,scroll,method:'Live public Wiki browser screencast in isolated headless Chromium; inspection walkthrough recorded after asset publication, not original creation',source:'OPA189IDBVR on project Board31',humanApproval:'pending'},null,2)+'\n');console.log('Captured',out);
}finally{if(recorder)await recorder.stop();await browser.close();}