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

0.0.33 • Public • Published

chomecast-sender

A completely typed chromecast sender application

Description

This is a CAF-Sender application completely built in Typescript with support for on and off event listeners.

Usage

ES6

import Chromecast from 'chomecast-sender';

CJS

const Chromecast = require('chomecast-sender');

Initialisation

const cast = new Chromecast(receiverApplicationId)

Available methods

import Chromecast, {CastEventType} from "chomecast-sender";
const cast = new Chromecast(receiverApplicationId);

cast.connect();
cast.disconnect();
cast.seek(50);
cast.volume(0.2);
cast.playPause();
cast.muteUnmute();
cast.castMedia(HTMLVideoElement);
await cast.send(namespaceObject);

cast.on(CastEventType.AVAILABLE, event: CastEvent => {
  //..code goes here
})

cast.off(CastEventType.AVAILABLE, event: CastEvent => {
   //..code goes here
})

For list of available events check out the CastEventType

Package Sidebar

Install

npm i chomecast-sender

Weekly Downloads

15

Version

0.0.33

License

MIT

Unpacked Size

28.5 kB

Total Files

9

Last publish

Collaborators

  • eleven-am