Spaces:
Running
Running
Download src/video/XDebug.tsx from Ethscriptions/mx: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/src/video/XDebug.tsx
- Command line
-
hf download hf://spaces/Ethscriptions/mx/src/video/XDebug.tsx
-
curl -L -o XDebug.tsx https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/src/video/XDebug.tsx
632 Bytes
| import { useEffect } from 'react' | |
| import { exportMp4 } from './exporter' | |
| export default function XDebug() { | |
| useEffect(() => { | |
| const w = window as unknown as { __done: boolean; __mp4: string } | |
| exportMp4(24, () => {}, new AbortController().signal, 3).then(async b => { | |
| const u8 = new Uint8Array(await b.arrayBuffer()); let bin = '' | |
| for (let i = 0; i < u8.length; i += 0x8000) bin += String.fromCharCode(...u8.subarray(i, i + 0x8000)) | |
| w.__mp4 = btoa(bin); console.log('INFO mp4 bytes ' + b.size) | |
| }).catch(e => console.log('INFO ERROR ' + e)).finally(() => { w.__done = true }) | |
| }, []) | |
| return null | |
| } | |