Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cordova-plugin-video-trim
Advanced tools
截取短视频cordova插件,目前支持大于cordova-android@8.0.0
版本
先安装依赖项插件
cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-media
cordova plugin add cordova-plugin-media-capture
由于安卓版本碎片化问题,以上依赖项必须手动安装
正式安装 cordova-plugin-video-trim
cordova plugin add https://github.com/waitaction/cordova-plugin-video-trim.git
videoTrimmer.init(function () {
// 初始化成功
// todo
});
var dataDirectory = window.cordova.file.dataDirectory;
var outPath = dataDirectory + "test.mp4"; // 输出最终短视频的路径
videoTrimmer.openSelectVideoPage({ outPath: outPath }, function (videoUrl) {
// 截取视频片段成功,视频片段地址 videoUrl
// 播放截取后的视频片段
videoTrimmer.play({ path:videoUrl },function(){ },function(){ }); // 播放
}, function (err) {
// 截取视频片段失败
});
videoTrimmer.openRecordVideoPage({outPath:outPath},function (videoUrl) {
// 截取视频片段成功,视频片段地址 videoUrl
// todo
}, function (error) {
// 截取视频片段失败
});
videoTrimmer.openTrimmerPage({ path:sourcePath , outPath:targetPath },function(videoUrl){
// 截取视频片段成功,视频片段地址 videoUrl
// todo
},function(error){
// 截取视频片段失败
});
videoTrimmer.trimVideoImage({ path:data , outPath:imgPath },function(url){
$("body").append("<img src='" + url + "' />");
});
cordova-plugin-video-trim插件部分代码来源 https://github.com/iknow4/Android-Video-Trimmer
FAQs
视频剪辑功能的Cordova插件
The npm package cordova-plugin-video-trim receives a total of 0 weekly downloads. As such, cordova-plugin-video-trim popularity was classified as not popular.
We found that cordova-plugin-video-trim 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.