# @bjohnson-va/ng-cast

> Forked Project: Broadcast media on your TV from your Angular app

Latest version **0.2.12** (published 2019-01-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @bjohnson-va/ng-cast
pnpm add @bjohnson-va/ng-cast
yarn add @bjohnson-va/ng-cast
bun add @bjohnson-va/ng-cast
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.12 |
| Published | 2019-01-17 |
| First published | 2019-01-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 128.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Fabien Zibi |
| Maintainers | bjohnson-va |
| Keywords | chromecast, chrome, google, cast, api, angular |

## Links

- npm: https://www.npmjs.com/package/@bjohnson-va/ng-cast
- Repository: https://github.com/dahfazz/ngCast
- Homepage: https://github.com/dahfazz/ngCast#readme
- Issues: https://github.com/dahfazz/ngCast/issues
- npm.io page: https://npm.io/package/@bjohnson-va/ng-cast

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 0.2.12 (latest) — 2019-01-17
- 0.2.11 — 2019-01-17
- 0.2.10 — 2019-01-17
- 0.2.9 — 2019-01-17
- 0.2.8 — 2019-01-17
- 0.2.7 — 2019-01-17
- 0.2.5 — 2019-01-16
- 0.2.4 — 2019-01-16
- 0.2.3 — 2019-01-16
- 0.2.2 — 2019-01-16
- 0.2.1 — 2019-01-16
- 0.2.0 — 2019-01-16

## README

# ngCast
Broadcast media on your TV from your Angular app

## Installation
```node
sudo npm install ng-cast
```

Then, import ngCast in your app.module.ts

```javascript
import { NgCastModule } from 'ng-cast';
```

```javascript
@NgModule({
  ...
  imports: [
    ...
    NgCastModule
  ],
```

In one of your template, insert a button to select your Chromecast and connect on it
```html
<ng-cast></ng-cast>
```

In one of your app components, 
```javascript
import { NgCastService } from 'ng-cast';
...
constructor(
    ...
    private ngCastService: NgCastService
  ) { }
```

You are now able to broadcast any image or video to your TV
```javascript
this.ngCastService.launchMedia(mediaUrl); 
// ex. this.ngCastService.launchMedia('http://25.media.tumblr.com/tumblr_m4c8cxLOQv1rwa0vgo1_250.gif')
```

## Customisation
You can modify cast button appearance editing ng-cast/ng-cast.component.scss
*If you use CSS files in your project, you just need to change ng-cast.component.scss file extension*

## Online demo
https://gif-caster.firebaseapp.com/

---
_Source: https://npm.io/package/@bjohnson-va/ng-cast · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
