# dlnacasts

> Query your local network for DLNA enabled renderers and have them play media

Latest version **0.1.0** (published 2016-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install dlnacasts
pnpm add dlnacasts
yarn add dlnacasts
bun add dlnacasts
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-05-13 |
| First published | 2016-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 49 |
| Author | grunjol |
| Maintainers | grunjol |
| Keywords | dlna, upnp, cast, client |

## Links

- npm: https://www.npmjs.com/package/dlnacasts
- Repository: https://github.com/grunjol/dlnacasts
- Homepage: https://github.com/grunjol/dlnacasts#readme
- Issues: https://github.com/grunjol/dlnacasts/issues
- npm.io page: https://npm.io/package/dlnacasts

## Dependencies (8)

- [mime](https://npm.io/package/mime.md) ^1.3.4
- [debug](https://npm.io/package/debug.md) ^2.1.3
- [thunky](https://npm.io/package/thunky.md) ^0.1.0
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.8
- [node-ssdp](https://npm.io/package/node-ssdp.md) ^2.7.1
- [simple-get](https://npm.io/package/simple-get.md) ^2.1.0
- [run-parallel](https://npm.io/package/run-parallel.md) ^1.1.6
- [upnp-mediarenderer-client](https://npm.io/package/upnp-mediarenderer-client.md) ^1.2.2

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-05-13
- 0.0.3 — 2016-04-06
- 0.0.2 — 2016-04-04
- 0.0.1 — 2016-04-02

## README

# dlnacasts

Query your local network for DLNA media renderers and have them play media

API (and code) based on mafintosh/chromecasts for DLNA

```
npm install dlnacasts
```

## Usage

``` js
var dlnacasts = require('dlnacasts')()

dlnacasts.on('update', function (player) {
  console.log('all players: ', dlnacasts.players)
  player.play('http://example.com/my-video.mp4', {title: 'my video', type: 'video/mp4'})
})
```

## API

#### `var list = dlnacasts()`

Creates a dlna list.
When creating a new list it will call `list.update()` once.

#### `list.update()`

Updates the player list by querying the local network for DLNA renderer instances.

#### `list.on('update', player)`

Emitted when a new player is found on the local network

#### `player.play(url, [opts], cb)`

Make the player play a url. Options include:

``` js
{
  title: 'My movie',
  type: 'video/mp4',
  seek: seconds, // start by seeking to this offset
  subtitles: ['http://example.com/sub.vtt'], // subtitle track 1,
  autoSubtitles: true // enable first track if you provide subs
}
```

#### `player.subtitles(track, [cb])`

Enable subtitle track. Use `player.subtitles(false)` to disable subtitles

#### `player.pause([cb])`

Make the player pause playback

#### `player.resume([cb])`

Resume playback

#### `player.stop([cb])`

Stop the playback

#### `player.seek(seconds, [cb])`

Seek the video

#### `player.status(cb)`

Get a status object of the current played video.

#### `player.on('status', status)`

Emitted when a status object is received.

## License

MIT

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