main
John Lauer
Adopt native-verified amplifier and comparator TI lands as Board32
98249e8
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 browser=await puppeteer.launch({executablePath:'/home/adom/.cache/ms-playwright/chromium-1243/chrome-linux64/chrome',headless:true,args:['--no-sandbox']});
try{
const page=await browser.newPage();await page.setViewport({width:1600,height:1100});
await page.goto('https://wiki.adom.inc/adom/adom-custom-electronic-load/files/docs/build-clips.md',{waitUntil:'networkidle2',timeout:60000});
await page.waitForSelector('video[src*="ic-land-review-2x"]',{timeout:30000});
const v=await page.$('video[src*="ic-land-review-2x"]');await v.evaluate(e=>e.scrollIntoView({block:'center'}));
const playback=await v.evaluate(async e=>{e.muted=true;await e.play();await new Promise(r=>setTimeout(r,700));e.pause();return {duration:e.duration,currentTime:e.currentTime,width:e.videoWidth,height:e.videoHeight,error:e.error?.message||null,poster:e.poster};});
await v.screenshot({path:'videos/ic-land-candidate/published-clip.png'});
fs.writeFileSync('videos/ic-land-candidate/published-playback.json',JSON.stringify({url:page.url(),...playback},null,2));
console.log(JSON.stringify(playback));if(!playback.width||playback.error||playback.currentTime<=0)throw Error('Playback not verified');
}finally{await browser.close();}