upnp-device
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 2 instances in 1 package
8
123
53273
20
+ Addedunderscore@*
+ Addedcoffee-script@1.1.3(transitive)
+ Addedunderscore@1.13.7(transitive)
- Removedlog@*
- Removedcoffee-script@1.12.7(transitive)
- Removedd@1.0.2(transitive)
- Removedduration@0.2.2(transitive)
- Removedes5-ext@0.10.64(transitive)
- Removedes6-iterator@2.0.3(transitive)
- Removedes6-symbol@3.1.4(transitive)
- Removedesniff@2.0.1(transitive)
- Removedevent-emitter@0.3.5(transitive)
- Removedext@1.7.0(transitive)
- Removedlog@6.3.2(transitive)
- Removednext-tick@1.1.0(transitive)
- Removedsprintf-kit@2.0.2(transitive)
- Removedtype@2.7.3(transitive)
- Removeduni-global@1.0.0(transitive)
Updatedcoffee-script@1.1.3