1.0.0 • Published 6 years ago

node-video v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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
}))