Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-12-31 05:50:44 +0300
committerFeross Aboukhadijeh <feross@feross.org>2014-12-31 05:50:44 +0300
commit748afb40d5becf6ad0b1f67c59f0a0c9a172b989 (patch)
treefe4d5f5c58323e9df1c1f14fe742ba5b489ec31c /lib/server.js
parentf36f92ace4e26c80f8b416111c260e5f77204bc7 (diff)
Support DLNA streaming
Diffstat (limited to 'lib/server.js')
-rw-r--r--lib/server.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/server.js b/lib/server.js
index 4a70ffa..1e659b1 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -38,7 +38,6 @@ module.exports = function Server (torrent, opts) {
else torrent.once('ready', onReady)
function onReady () {
-
if (pathname === '/') {
res.setHeader('Content-Type', 'text/html')
return res.end('<h1>WebTorrent</h1><ol>' + torrent.files.map(function (file, i) {
@@ -58,6 +57,10 @@ module.exports = function Server (torrent, opts) {
res.setHeader('Content-Type', mime.lookup(file.name))
res.statusCode = 200
+ // Support DLNA streaming
+ res.setHeader('transferMode.dlna.org', 'Streaming')
+ res.setHeader('contentFeatures.dlna.org', 'DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000')
+
var range
if (req.headers.range) {
res.statusCode = 206