Giter Site home page Giter Site logo

-thinkam.net-ng-cast's Introduction

ngCast

Broadcast media on your TV from your Angular app

Installation

sudo npm install ng-cast

Then, import ngCast in your app.module.ts

import { NgCastModule } from 'ng-cast';
@NgModule({
  ...
  imports: [
    ...
    NgCastModule
  ],

In one of your template, insert a button to select your Chromecast and connect on it

<ng-cast></ng-cast>

In one of your app components,

import { NgCastService } from 'ng-cast';
...
constructor(
    ...
    private ngCastService: NgCastService
  ) { }

You are now able to broadcast any image or video to your TV

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

TODO

-thinkam.net-ng-cast's People

Contributors

felipealbuquerq avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

-thinkam.net-ng-cast's Issues

Some errors on ng serve

Hi, I am on Angular 10 and have version 0.5.47 of your ng-cast.

I get the following errors on "ng serve"

ERROR in node_modules/@thinkam.net/ng-cast/dto/tenant-dto.d.ts:1:25 - error TS2307: Cannot find module 'moment' or its corresponding type declarations.

1 import * as moment from 'moment';
                          ~~~~~~~~
node_modules/@thinkam.net/ng-cast/ng-cast.component.d.ts:3:24 - error TS2307: Cannot find module 'videogular2/compiled/src/streaming/vg-dash/vg-dash' or its corresponding type declarations.

3 import { VgDASH } from 'videogular2/compiled/src/streaming/vg-dash/vg-dash';
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@thinkam.net/ng-cast/ng-cast.component.d.ts:4:35 - error TS2307: Cannot find module 'videogular2/compiled/src/streaming/streaming' or its corresponding type declarations.

4 import { IDRMLicenseServer } from 'videogular2/compiled/src/streaming/streaming';
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@thinkam.net/ng-cast/ng-cast.component.d.ts:5:38 - error TS2307: Cannot find module 'videogular2/compiled/core' or its corresponding type declarations.

5 import { VgAPI, BitrateOption } from 'videogular2/compiled/core';
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/app.component.ts:17:24 - error TS2339: Property 'launchMedia' does not exist on type 'NgCastService'.

17     this.ngCastService.launchMedia('http://25.media.tumblr.com/tumblr_m4c8cxLOQv1rwa0vgo1_250.gif');
                          ~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.