
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
camera-capture-mp
Advanced tools
npm i camera-capture-mp --save
{
"usingComponents": {
"camera-capture-mp": "camera-capture-mp"
}
}
<camera-capture-mp
isPause="{{isPause}}"
bind:capture="capture"
bind:cameraInitDone="cameraInitDone"
/>
Page({
data: {
isPause: true,
},
cameraInitDone() {
this.setData({
isPause: false,
});
},
capture(filePath) {
console.log("filePath: ", filePath);
},
});
当 isPause 为 true 时,capture 事件会持续触发,触发周期根据多个参数来共同决定,如:时间间隔;用户移动等
isPause: {
// 控制是否开启相机截图
type: Boolean,
value: true,
},
interval: {
// 相机截图时间间隔
type: Number,
value: 2000,
},
fileQuality: {
// 截图的照片质量
type: Number,
value: 0.5,
},
moveThreshold: {
// 移动的阈值,可根据实际需求调整
type: Number,
value: 0.3, // 可选值:1.-1;2.正数;当值为-1时,表示不判断用户是否正在移动
},
rollThreshold: {
// 横滚角阈值(单位:度)
type: Number,
value: 40, // 可选值:1.-1;2.正数;当值为-1时,表示不判断用户设备的朝向和翻滚
},
// 相机配置
frameSize: {
type: String,
value: "medium",
},
devicePosition: {
type: String,
value: "back",
},
resolution: {
type: String,
value: "medium",
},
flash: {
type: String,
value: "off",
},
| 名称 | 触发时机 | 返回值 | 说明 |
|---|---|---|---|
| cameraInitDone | 相机初始化完成 | - | - |
| capture | 相机画面截图 | 相机截图临时路径 | - |
略~
npm run build
2.修改 package.json 中的 version 版本号
3.发布到 npm
npm publish
略~
FAQs
use camera to generate screenshot,and return file path.
The npm package camera-capture-mp receives a total of 1 weekly downloads. As such, camera-capture-mp popularity was classified as not popular.
We found that camera-capture-mp demonstrated a healthy version release cadence and project activity because the last version was released less than 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.