1.0.3 • Published 1 year ago

chromecast-type v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago