Comments (6)
There is no such function implemented yet, but there is a video cover image output function:
const video = wvc.createSingleVideo({
...,
// Enable cover image capture
coverCapture: true,
// Time in milliseconds to capture the image (default is 20% of the video's duration)
coverCaptureTime: 1000,
// Image format for capture (jpg/png/bmp), default is jpg
coverCaptureFormat: "jpg"
});
A way to interrupt video capture is on the list of planned features, probably in the next release 🐱 .
from webvideocreator.
@Vinlic , yes i know for cover image, but it's not optimal
Why following would not work:
pagePrepareFn: async function(page) {
const _page = page.target;
await _page.screenshot({ path: 'image.png' });
// here to interrupt video capture
}
from webvideocreator.
@ivangusev
Because when the pagePrepareFn function is called, rendering has not yet started, and the screenshot function needs to start rendering before it can be obtained, they are deadlocked :D
Maybe you can try the following code, or wait for startup before taking a screenshot. You can wait for startup through the startAndWait() function.
pagePrepareFn: async function(page) {
const _page = page.target;
setTimeout(() => {
_page.screenshot({ path: 'image.png' })
.catch(err => console.error(err));
}, 0)
}
from webvideocreator.
@Vinlic ,
A way to interrupt video capture is on the list of planned features, probably in the next release 🐱 .
Still in plans?:)
from webvideocreator.
@ivangusev
Now you can interrupt the capture via video.abort()
of the video instance or via captureCtx.abort()
😄
It is updated in version 0.0.34.
from webvideocreator.
@Vinlic, hm... for some reason it doesn't work for me - no error, it simply continue to render full duration video
const video = wvc.createSingleVideo({
...
pagePrepareFn: async function(page) {
video.abort();
from webvideocreator.
Related Issues (20)
- Problem Inserting Video In Direct Page Content Case HOT 5
- How to set Video Duration Same as Audio HOT 8
- Error Video Rendering When Video Element HOT 5
- Embed Video Issue and Uncaught Error HOT 1
- No Types available HOT 1
- pagePrepareFn 的传参问题 HOT 4
- 嵌入视频太长导致错误 HOT 9
- startTime = Video - startTime HOT 1
- Unclosed chromium Procceses HOT 2
- 参数没加引号导致部分参数被shell解析成命令
- 是否能支持audio/video的playbackRate属性? HOT 1
- How to record 4k or highest quality possible? HOT 1
- Blob & Base64 <audio> not recorded
- Not working on Windows Server
- English docs?
- `outputStream` instead of writing to file? HOT 1
- 配置如下,但是单通道视频导出之后经过验证还是3通道的视频
- 安全上下文限制导致的测试环境无法访问问题,有什么优雅的解决方案吗?
- ReferenceError: ImageDecoder is not defined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webvideocreator.