chromecasts
Advanced tools
Comparing version 1.9.1 to 1.10.0
12
index.js
@@ -170,3 +170,3 @@ var castv2 = require('castv2-client') | ||
if (err) return cb(err) | ||
p.play() | ||
p.play(cb) | ||
}) | ||
@@ -261,3 +261,11 @@ } | ||
if (a.type === 'TXT' && casts[name]) { | ||
var text = txt.decode(a.data) | ||
const text = {} | ||
a.data.forEach((item) => { | ||
const decodedItem = txt.decode(item) | ||
Object.keys(decodedItem).forEach((key) => { | ||
text[key] = decodedItem[key] | ||
}) | ||
}) | ||
const friendlyName = text.fn || text.n | ||
if (text.fn) { | ||
@@ -264,0 +272,0 @@ casts[name].name = text.fn |
{ | ||
"name": "chromecasts", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"description": "Query your local network for Chromecasts and have them play media", | ||
@@ -11,3 +11,3 @@ "main": "index.js", | ||
"mime": "^1.3.4", | ||
"multicast-dns": "^6.0.1", | ||
"multicast-dns": "^7.2.2", | ||
"simple-get": "^2.0.0", | ||
@@ -14,0 +14,0 @@ "thunky": "^0.1.0", |
@@ -5,13 +5,13 @@ # chromecasts | ||
```bash | ||
npm install chromecasts --save | ||
``` | ||
npm install chromecasts | ||
``` | ||
## Usage | ||
``` js | ||
var chromecasts = require('chromecasts')() | ||
```js | ||
const chromecasts = require('chromecasts')() | ||
chromecasts.on('update', function (player) { | ||
console.log('all players: ', chromecasts.players) | ||
chromecasts.on('update', players => { | ||
console.log('all players: ', players) | ||
player.play('http://example.com/my-video.mp4', {title: 'my video', type: 'video/mp4'}) | ||
@@ -41,3 +41,3 @@ }) | ||
``` js | ||
```js | ||
{ | ||
@@ -44,0 +44,0 @@ title: 'My movie', |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
11697
267
2
+ Added@leichtgewicht/ip-codec@2.0.5(transitive)
+ Addeddns-packet@5.6.1(transitive)
+ Addedmulticast-dns@7.2.5(transitive)
- Removeddns-packet@1.3.4(transitive)
- Removedmulticast-dns@6.2.3(transitive)
- Removedsafe-buffer@5.2.1(transitive)
Updatedmulticast-dns@^7.2.2