i'm getting eror
unhandledRejection: Error: ENOENT: no such file or directory, scandir '...\photobooth\timecut-temp-1715854229528' any idea on why is this happening
action.tsx
const timecut = require('timecut');
export const snapRecord = async () =>{
timecut({
url: 'file://' + path.join(__dirname, '../../components/CanvasVideo.tsx'),
viewport: {
width: 800, // sets the viewport (window size) to 800x600
height: 600
},
selector: '#container', // crops each frame to the bounding box of '#container'
left: 0, top: 0, // further crops the left by 20px, and the top by 40px
right: 60, bottom: 300, // and the right by 6px, and the bottom by 30px
fps: 30, // saves 30 frames for each virtual second
duration: 20, // for 20 virtual seconds
output: 'video.mp4' // to video.mp4 of the current working directory
}).then(function () {
console.log('Done!');
});
}
called on main file
useEffect(() => {
snapRecord()
}, []);