smi2vtt
v0.1.1
Published
Convert .smi to .vtt
Downloads
6
Readme
smi2vtt
Convert .smi
to .vtt
(This module doesn't supported stylesheet)
##Installation
$ npm install smi2vtt
##Usage
server.js
const smi2vtt = require('smi2vtt')
const app = express()
app.get( '/smi/:filename', (req, res) => {
// parse
smi2vtt( req.params.filename )
// send
.then( data => {
res.set( 'Content-Type', 'text/vtt' )
res.send( data )
})
})
index.html
<video width="100%" controls>
<source src="video/01.mp4" type="video/mp4">
<track src="smi/01.smi" kind="subtitles" srclang="ko" label="korean" default>
</video>