@scrypted/chromecast
Advanced tools
Comparing version 0.1.55 to 0.1.56
{ | ||
"name": "@scrypted/chromecast", | ||
"version": "0.1.55", | ||
"version": "0.1.56", | ||
"description": "Send video, audio, and text to speech notifications to Chromecast and Google Home devices", | ||
@@ -5,0 +5,0 @@ "author": "Scrypted", |
@@ -91,3 +91,6 @@ import util from 'util'; | ||
client.removeAllListeners(); | ||
client.close(); | ||
try { | ||
client.close(); | ||
} catch (e) { | ||
} | ||
} | ||
@@ -153,2 +156,10 @@ client.client.on('close', cleanup); | ||
async load(media: string | MediaObject, options: MediaPlayerOptions) { | ||
if (this.mediaPlayerPromise) { | ||
try { | ||
(await this.mediaPlayerPromise).close(); | ||
} catch (e) { | ||
} | ||
this.mediaPlayerPromise = undefined; | ||
this.mediaPlayerStatus = undefined; | ||
} | ||
let url: string; | ||
@@ -346,11 +357,3 @@ let urlMimeType: string; | ||
player.getStatus((err, status) => { | ||
if (err) { | ||
reject(err); | ||
return; | ||
} | ||
this.mediaPlayerStatus = status; | ||
this.updateState(); | ||
resolve(player); | ||
}) | ||
resolve(player); | ||
}); | ||
@@ -357,0 +360,0 @@ }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
511388
1421
8