You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

iobroker.chromecast

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iobroker.chromecast - npm Package Compare versions

Comparing version

to
2.3.0

14

io-package.json

@@ -5,5 +5,17 @@ {

"title": "Google Home",
"version": "2.2.3",
"version": "2.3.0",
"compact": true,
"news": {
"2.3.0": {
"en": "Tested compact mode works in Linux and Windows",
"de": "Der getestete Kompaktmodus funktioniert unter Linux und Windows",
"ru": "Протестированный компактный режим работает в Linux и Windows",
"pt": "O modo compacto testado funciona no Linux e Windows",
"nl": "De geteste compacte modus werkt in Linux en Windows",
"fr": "Le mode compact testé fonctionne sous Linux et Windows",
"it": "La modalità compatta testata funziona in Linux e Windows",
"es": "El modo compacto probado funciona en Linux y Windows",
"pl": "Testowany tryb kompaktowy działa w systemie Linux i Windows",
"zh-cn": "经过测试的压缩模式可在Linux和Windows中使用"
},
"2.2.3": {

@@ -10,0 +22,0 @@ "en": "Race condition - fix undefined volume when no status received",

@@ -33,2 +33,4 @@ 'use strict';

constructor(connection) {
let that = this;
this.shuffle = false;

@@ -65,2 +67,3 @@ this.repeat = false;

if (this._mediaPlayer !== undefined) {
this._mediaPlayer.close();
delete this._mediaPlayer;

@@ -88,3 +91,12 @@ }

}
destroy() {
adapter.removeListener('stateChange', this._ioBrokerChange.bind(this));
if (this._mediaPlayer !== undefined) {
this._mediaPlayer.close();
delete this._mediaPlayer;
}
}
//create ioBroker states

@@ -91,0 +103,0 @@ _createObjects() {

33

main.js

@@ -27,2 +27,3 @@ /**

const utils = require('@iobroker/adapter-core'); // Get common adapter utils
const adapterName = require('./package.json').name.split('.').pop();

@@ -32,8 +33,9 @@ let adapter;

options = options || {};
Object.assign(options, {
name: 'chromecast',
ready: main
});
Object.assign(options, {name: adapterName});
adapter = new utils.Adapter(options);
adapter.on('ready', ready);
adapter.on('unload', unload);
return adapter;

@@ -43,3 +45,5 @@ };

// const SCAN_INTERVAL = 10000;
function main() {
let scanner = undefined;
let devices = [];
function ready () {

@@ -61,3 +65,3 @@ //Own libraries

new ChromecastDevice(device);
devices.push(new ChromecastDevice(device));
}

@@ -67,4 +71,4 @@ }

//var chromecastDevices = {};
new Scanner (connection => {
/*chromecastDevices[name] = */new ChromecastDevice(connection);
scanner = new Scanner (connection => {
devices.push(new ChromecastDevice(connection));
});

@@ -76,2 +80,15 @@

function unload (callback) {
try {
adapter.log.info("Unload triggered");
scanner.destroy();
devices.forEach(function (device) {
device.destroy();
});
adapter.log.info("Unload completed sucesfully");
} catch (error) {
console.error(error);
}
callback();
}
// If started as allInOne/compact mode => return function to create instance

@@ -78,0 +95,0 @@ if (typeof module !== undefined && module.parent) {

{
"name": "iobroker.chromecast",
"version": "2.2.3",
"version": "2.3.0",
"description": "ioBroker chromecast Adapter",

@@ -29,3 +29,4 @@ "author": {

"@iobroker/adapter-core": "^1.0.3",
"castv2-player": "^2.0.3"
"castv2-player": "^2.1.0",
"gulp-cli": "^2.2.0"
},

@@ -32,0 +33,0 @@ "devDependencies": {

![Logo](admin/home.png)
# ioBroker.chromecast
=======================

@@ -75,2 +74,5 @@ ![Number of Installations](http://iobroker.live/badges/chromecast-installed.svg) ![Number of Installations](http://iobroker.live/badges/chromecast-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.chromecast.svg)](https://www.npmjs.com/package/iobroker.chromecast)

## Changelog
### 2.3.0 (2019-10-23)
* (angelnu) Tested compact mode works in Linux and Windows
### 2.2.3 (2019-03-19)

@@ -77,0 +79,0 @@ * news