1.0.4 • Published 6 years ago

koa-video v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

koa-video

Koa2播放视频或音频的中间件

Installation

Install the plugin with npm:

$ npm install koa-video --save

Options

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

Example

const Koa = require('koa');
const app = new Koa();
app.use(koaVideo({
        extMatch: /\.mp[3-4]$/i
    }))
1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago