Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DLNA headers #242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ var createServer = function (e, opts) {
response.statusCode = 206
response.setHeader('Content-Length', range.end - range.start + 1)
response.setHeader('Content-Range', 'bytes ' + range.start + '-' + range.end + '/' + file.length)
response.setHeader('transferMode.dlna.org', 'Streaming')
response.setHeader('contentFeatures.dlna.org', 'DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's already done above fyi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oups sorry reviving an old thread mb

if (request.method === 'HEAD') return response.end()
pump(file.createReadStream(range), response)
})
Expand Down