# zr-video-capture

> 录像

Latest version **1.0.0-beta.4** (published 2020-06-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install zr-video-capture
pnpm add zr-video-capture
yarn add zr-video-capture
bun add zr-video-capture
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.4 |
| Published | 2020-06-08 |
| First published | 2020-05-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zhongruigroup |
| Maintainers | zhongruigroup |

## Links

- npm: https://www.npmjs.com/package/zr-video-capture
- npm.io page: https://npm.io/package/zr-video-capture

## Recent versions

- 1.0.0-beta.4 (latest) — 2020-06-08
- 1.0.0-beta.3 — 2020-06-01
- 1.0.0-beta.2 — 2020-06-01
- 1.0.0-beta.1 — 2020-05-29

## README

## 使用说明

### js中使用:
1.引入js文件
```
<script src="video.js"></script>
<div id="videoWrap"></div>
    <script>
        const videoWrap = document.getElementById('videoWrap');

        const video = new Recorder({
            wrapElement: videoWrap,
            class: ''  // 自定义的类名,
           // type: 'text',  // 选填
           // accept: 'video/*' // 选填
        }, (res) => {
            console.log(res); // res为返回的文件信息
            const video = document.createElement('video');
            video.src = res.url;
            video.autoplay = 'autoplay';
            video.controls = 'controls';
            videoWrap.appendChild(video);
        });
    </script>
```
### vue/angular/react中使用

```
npm i zr-video-capture --save
```
```
import Recorder from 'zr-video-capture'

const video = new Recorder({
    wrapElement: '',
    class: '',  // 选填 自定义类名
    // type: 'text',  // 选填
    // accept: 'video/*' // 选填
}, (res) => {
    //返回文件信息
})
```

参数 |       参数类型      | 参数描述 
---|---|---
wrapElement | object | 外层div元素(必填)
class |  object  | 上传框样式class(选填)
type  |    string | file/text...  
accept  |   string | video/*  / image/* |




方法 | 参数描述
---|---
Recorder | new Recorder({})
callback | callback()

---
_Source: https://npm.io/package/zr-video-capture · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
