How to use chromecasts - 1 common examples

To help you get started, we’ve selected a few chromecasts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github acidhax / streaming-media-encoder / DeviceList.js View on Github external
findChromeCasts() {
        if (this.chromecastSearching) return

        console.log("Searching for chromecast devices");
        this.chromecastSearching = true;

        chromecasts().on('update', player => {
            console.log("Found a chromecast", player.name)

            const newPlayer = new ChromeCastDevice(player)
            if (!(newPlayer.id in self.devices.CHROMECAST)) {
                self.devices.CHROMECAST[newPlayer.id] = newPlayer
                self.emit("devicelist:newdevice", {
                    type: "ChromeCast",
                    device: newPlayer
                })
            }
        })
    }

chromecasts

Query your local network for Chromecasts and have them play media

MIT
Latest version published 3 years ago

Package Health Score

43 / 100
Full package analysis

Popular chromecasts functions