node-video

1.0.0 • Public • Published

node-video

If your website can 't play video in Safari, you may need that.

Install

yarn add node-video -S

or 

npm i -S node-video

Options

  • root: 视频或者音频的根目录, 默认是 process.cwd().
  • extMatch: 请求路径的匹配规则,可以是 数组、正则(匹配资源的后缀名),默认是 ['.mp4', '.flv', '.webm', '.ogv', '.mpg', ".mpg", '.wav', '.ogg']

Example

const Koa = require('koa')
const nodeVideo = require('node-video')

const app = new Koa()

app.use(nodeVideo({
    extMatch: /\.mp[3-4]$/i
}))

Readme

Keywords

Package Sidebar

Install

npm i node-video

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.43 kB

Total Files

3

Last publish

Collaborators

  • openrotary