chromecasts
Advanced tools
Comparing version 1.6.0 to 1.7.0
18
index.js
@@ -64,5 +64,17 @@ var castv2 = require('castv2-client') | ||
player.emit('connect') | ||
client.launch(castv2.DefaultMediaReceiver, function (err, p) { | ||
client.getSessions(function (err, sess) { | ||
if (err) return cb(err) | ||
var session = sess[0] | ||
if (session && session.appId === castv2.DefaultMediaReceiver.APP_ID) { | ||
client.join(session, castv2.DefaultMediaReceiver, ready) | ||
} else { | ||
client.launch(castv2.DefaultMediaReceiver, ready) | ||
} | ||
}) | ||
function ready (err, p) { | ||
if (err) return cb(err) | ||
player.emit('ready') | ||
@@ -79,3 +91,3 @@ | ||
cb(null, p) | ||
}) | ||
} | ||
}) | ||
@@ -192,3 +204,3 @@ }) | ||
} | ||
player.volume = function (vol, cb) { | ||
@@ -195,0 +207,0 @@ if (!cb) cb = noop |
{ | ||
"name": "chromecasts", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Query your local network for Chromecasts and have them play media", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
11053
247
0