Package Exports
- node-video
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-video) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
}))