Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

upnp-device

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

upnp-device - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

lib/DeviceControlProtocol.coffee

6

package.json
{
"name": "upnp-device",
"version": "0.0.1",
"version": "0.0.2",
"description": "Create UPnP devices in Node.js",

@@ -14,7 +14,7 @@ "keywords": [ "upnp" ],

"async": "*",
"coffee-script": "*",
"log": "*",
"coffee-script": "1.1.3",
"mime": "*",
"node-uuid": "*",
"redis": "*",
"underscore": "*",
"xml": "*",

@@ -21,0 +21,0 @@ "xml2js": "*"

@@ -1,2 +0,2 @@

# UPnP Devices in Node.js
# UPnP Devices for Node.js

@@ -15,15 +15,12 @@ upnp-device lets you create [UPnP Devices][upnp-dcp] 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.
`npm install upnp-device`
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.
Note that you need Node 0.4.12. 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](http://redis.io).
# Documentation
## Basic usage
### JavaScript
```javascript

@@ -42,2 +39,4 @@ var upnp = require('upnp-device');

For a real world usage example, look at [Bragi], a media server using node-upnp-device.
## API

@@ -49,4 +48,10 @@

`function() { }`
Emitted when the server has been assigned an IP, the HTTP server has started and SSDP messaging has been initialized.
#### Event: 'error'
`function(err) { }`
### upnp.createDevice(type, name[, address])

@@ -58,6 +63,2 @@

### device.announce()
Announces the device over SSDP to the local network.
### device.addMedia(parentID, media[, callback])

@@ -75,10 +76,15 @@

container = {
class: 'object.container.album.musicAlbum',
title: 'My album' };
'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' };
'class': 'object.container.audioItem.musicTrack',
'title': 'My song',
'creator': 'An artist',
'location': '/media/mp3/an_artist-my_song.mp3',
'album': 'My album'
};
```

@@ -88,5 +94,11 @@

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.
The server only stores the media info for as long as it is running. It is the responsibility of the client to store media information across restarts if desired.
### device.removeMedia(id[, callback])
* id - ID of object to remove. If it has children, they will also be removed.
* [callback(err)]
# Development

@@ -116,1 +128,2 @@

[upnp-av]: http://upnp.org/specs/av/av1/
[bragi]: https://github.com/jacobrask/bragi

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc