Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/filipchalupa/use-chromecast-caf-receiver

React hook to use the Chromecast receiver SDK in your project.
https://github.com/filipchalupa/use-chromecast-caf-receiver

chromecast hook react

Last synced: 10 days ago
JSON representation

React hook to use the Chromecast receiver SDK in your project.

Awesome Lists containing this project

README

        

# Use Chromecast receiver [![npm](https://img.shields.io/npm/v/use-chromecast-caf-receiver.svg)](https://www.npmjs.com/package/use-chromecast-caf-receiver) ![npm type definitions](https://img.shields.io/npm/types/use-chromecast-caf-receiver.svg)

React hook to use the [Chromecast receiver SDK](https://developers.google.com/cast/docs/web_receiver) in your project.

## Installation

```bash
npm install use-chromecast-caf-receiver
```

## How to use

```jsx
import { useChromecastReceiver } from 'use-chromecast-caf-receiver'

const Component = () => {
const { cast } = useChromecastReceiver()

return

{cast === null ? 'Loading' : 'Cast receiver sdk is loaded'}

}
```

## Development

- Install dependencies: `npm ci`
- Build the package: `npm run dev`