# emp-player-receiver

> EMP Receiver

Latest version **1.58.0** (published 2017-04-19) · 0 weekly downloads

## Install

```sh
npm install emp-player-receiver
pnpm add emp-player-receiver
yarn add emp-player-receiver
bun add emp-player-receiver
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.58.0 |
| Published | 2017-04-19 |
| First published | 2017-04-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thijs Damen |
| Maintainers | jpac89 |

## Links

- npm: https://www.npmjs.com/package/emp-player-receiver
- Repository: https://github.com/EricssonBroadcastServices/html5-player
- Homepage: https://github.com/EricssonBroadcastServices/html5-player#readme
- Issues: https://github.com/EricssonBroadcastServices/html5-player/issues
- npm.io page: https://npm.io/package/emp-player-receiver

## Dependencies (3)

- [global](https://npm.io/package/global.md) ^4.3.0
- [lodash-compat](https://npm.io/package/lodash-compat.md) ^3.10.1
- [object.assign](https://npm.io/package/object.assign.md) ^4.0.3

## Recent versions

- 1.58.0 (latest) — 2017-04-19

## README

# EMP Receiver documentation

The receiver is compliant with the default chromecast receiver API unless otherwise stated. For information on how to build a sender and other functionality not described here. See https://developers.google.com/cast/docs/sender_apps

[Sender tutorials](https://github.com/EricssonBroadcastServices/html5-player/blob/master/sdk/tutorials/chromecast.md)

# Development

Starting development
--------------------

As a developer you need to add custom ui-logic to the receiver-app and customize index.html file.
To build the code there are a few requirements
- Node.js -- We use Node for build and test automation. [Download and install Node.js](http://nodejs.org/download/)
- grunt-cli

Unix-based systems
```bash
sudo npm install -g grunt-cli
```

Windows
```bash
npm install -g grunt-cli
```

To develop on the SDK, after cloning the repository you need to install the node.js modules using the node package manager
```bash
cd sdk
npm install
```

to build a local copy of the receiver
```bash
grunt dist|build // build command has debugging enabled by default.
```

to generate jsdoc documentation (generated in sdk/docs)
```bash
grunt jsdoc
```

then deploy the `reference` directory in any webserver and enjoy!

Grunt commands
==============

Several grunt tasks are available for testing, development and distribution

```bash
grunt
```

```bash
grunt dev
```
builds the code and creates a local testing environment (on http://localhost:9999). Also watches the source code for any changes in /src and rebuilds when a change occurs

```bash
grunt watchAll
```
builds the code and creates a local testing environment (on http://localhost:9999). Also watches the source code for any changes in /src and /test and rebuilds when a change occurs

```bash
grunt dist
```
Creates packages available for distribution. in the /dist folder zipped archives can be found of the receiver. In addition to sources file ready for distribution.

Several simple grunt tasks are also available for use in specific cases
```bash
grunt jshint #ensures code is compliant with coding standards and warns for any coding issues
grunt jsdoc #creates documentation based on source code comments
grunt uglify #uglifys and minifys source
grunt connect #setup local testing environment (on http://localhost:9999).
grunt zip #creates a zip for distribution of the source
grunt copy #possible variations: build, dist, images. plugins
```

About the code
==============
Javascript for the Receiver will be written using the new ES6 standard. Using grunt tasks this is then re-written to the ES5 standard where available. To learn more about Es6 see [babel](https://babeljs.io/).
To keep our code clean and separated, we uses [Browserify](http://browserify.org/). This allows us to use require statements to import javascript code from other files.

All of the above is done automatically using the grunt build system, but during development one should be aware of the power, and the limitations of both systems.

separate ui-logic
==============
The Receiver has separate ui-logic and playback-logic.
emp-receiver playback-logic is installed from a npm package.
Run npm install to get all depending npm packages.
As a developer you need to add custom ui-logic to the receiver-app and customize index.html file.
Receiver-app should implement event listener for 
METADATA_UPDATED: fire when program changed, should be used to display title and images about the current program.
STATE_CHANGED: fire when playback state changed, should be used to display play icon, buffer spinner etc.
emp-receiver expose the inner emp-player, other playback event can be handle directly on the emp-player. 
Receiver-app.js and index.html are samples how to implement a custom emp-receiver.


EmpHtmlPlayer
=======
The receiver makes use of emp-player.

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