
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
video-capture
Advanced tools
import VideoCapture from 'video-capture'
async test(){
//dataURL 捕获画面的base64
//width画面宽
//height画面高
let { dataURL, width, height } = await new VideoCapture("https://vjs.zencdn.net/v/oceans.mp4").capture("10%");
document.getElementById("imgId").src = dataURL;
}
test();
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<img id="preview1" />
<img id="preview2" />
<img id="preview3" />
<script src="../dist/video-capture.min.js"></script>
<script>
//方法1、捕获20s处的画面,并使用preview1显示出来
new VideoCapture("https://vjs.zencdn.net/v/oceans.mp4").capture(20, "preview1");
//方法2、捕获20s处的画面,传入img dom
new VideoCapture("https://vjs.zencdn.net/v/oceans.mp4").capture(20, document.getElementById("preview2"));
//方法3、捕获50%处画面
new VideoCapture("https://vjs.zencdn.net/v/oceans.mp4").capture("50%", "preview3"));
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<input id="inputFile" type="file"/>
<img id="preview"/>
<script src="../dist/video-capture.min.js"></script>
<script>
document.getElementById("inputFile").onchange = function ({ target }) {
let [file] = target.files;
if (!/.*\.mp4$/.test(file.name)) alert("请选择mp4视频文件");
new VideoCapture(file).capture("50%", "preview");
}
</script>
</body>
</html>
当构造方法传入的是一个本地视频资源时,在有必要的时候,可以调用revoke方法来释放资源。
FAQs
基于h5 canvas的视频快照插件
The npm package video-capture receives a total of 49 weekly downloads. As such, video-capture popularity was classified as not popular.
We found that video-capture demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.