Skip to content

Instantly share code, notes, and snippets.

@david-mark
Forked from thibauts/dlna-http-server.js
Created September 27, 2017 02:09
Show Gist options
  • Save david-mark/0e1925c31c189908fe38709f683d74f2 to your computer and use it in GitHub Desktop.
Save david-mark/0e1925c31c189908fe38709f683d74f2 to your computer and use it in GitHub Desktop.
var express = require('express');
var subtitlesUrl = 'http://your-local-ip:8000/subtitles.vtt';
var app = express();
app.use(function(req, res, next) {
res.header('transferMode.dlna.org', 'Streaming');
res.header('contentFeatures.dlna.org', 'DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000')
res.header('CaptionInfo.sec', subtitlesUrl);
next();
});
app.use('/', express.static(__dirname));
app.listen(8000, '0.0.0.0');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment