Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
upnp-device
Advanced tools
upnp-device lets you create UPnP Devices in Node.js. The goal is to have an easy to use API, rather than exposing all UPnP internals.
upnp-device is not ready for npm yet, so you need to install manually by cloning this repository.
Node 0.4.12 is recommended. upnp-device is not compatible with Node 0.6.x due to some missing UDP features in 0.6.x. They are expected to be implemented fairly soon, and then upnp-device will be ported to 0.6.x.
Additionally, to use the MediaServer device you need to install redis.
var upnp = require('upnp-device');
var mediaServer = upnp.createDevice('MediaServer', 'My Media Application');
mediaServer.on('ready', function() {
mediaServer.addMedia(0, media, function(err, id) {
console.log("Added new media with ID:" + id);
});
mediaServer.announce();
});
Announces the device over SSDP to the local network.
Applies to MediaServer.
The metadata needs to be extracted by the client, either through user input or by reading for example ID3 tags.
container = {
class: 'object.container.album.musicAlbum',
title: 'My album' };
item = {
class: 'object.container.audioItem.musicTrack',
title: 'My song',
creator: 'An artist',
location: '/media/mp3/an_artist-my_song.mp3',
album: 'My album' };
Other official UPnP classes and properties are defined in the MediaServer specification.
The server only stores this info for as long as it is running. It is the responsibility of the client to store media information across restarts if desired.
upnp-device is written in CoffeeScript.
Contributions and comments are welcome on GitHub or IRC (jacobrask@FreeNode).
FAQs
Create UPnP devices in Node.js
The npm package upnp-device receives a total of 2 weekly downloads. As such, upnp-device popularity was classified as not popular.
We found that upnp-device demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.