chromecast-type
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

chromecast-type

NPM Version NPM Downloads Bundlephobia install size

Google Cast Web SDK does not allow you to determine the Chromecast version, but indirectly, this can be done.

Support

  • Chromecast 1st generation
  • Chromecast 2nd generation
  • Chromecast Ultra
  • Chromecast 3th generation
  • Chromecast with Google TV 4K
  • Chromecast with Google TV HD
  • Android TV with Chromecast
  • Google Nest Hub
  • Google Nest Hub Max

Install

npm install chromecast-type

Using

getChromecastTypeByUserAgent(userAgent): string

For Node.js:

import { getChromecastTypeByUserAgent } from 'chromecast-type';
// ...
console.log(getChromecastTypeByUserAgent(userAgent));

For browser:

import { getChromecastTypeByUserAgent } from 'chromecast-type';
// ...
console.log(getChromecastTypeByUserAgent(navigator.userAgent));

getChromecastType(): string

For only browser using.

import { getChromecastType } from 'chromecast-type';

console.log(getChromecastType());

Links

Package Sidebar

Install

npm i chromecast-type

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

6.31 kB

Total Files

5

Last publish

Collaborators

  • hcodes