Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/basgrani-org/bas-meteor-jwplayer

Integrate a CDN hosted version of JWPlayer using your own license.
https://github.com/basgrani-org/bas-meteor-jwplayer

javascript jwplayer meteor

Last synced: about 1 month ago
JSON representation

Integrate a CDN hosted version of JWPlayer using your own license.

Awesome Lists containing this project

README

        

# JWPlayer for Meteor (v1.4.3+)

[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9EARMSN5WMDDY)

Integrate a CDN hosted version of JWPlayer using your own license.

NOTE: This version only works with JWPlayer v7

## Install

```
meteor npm install bas-meteor-jwplayer
```

## Setup

Load globally:

```js
import { JWPlayer } from 'bas-meteor-jwplayer';

JWPlayer.load('YOUR_KEY_HERE');
```

Or only on specific routes:

```js
import { JWPlayer } from 'bas-meteor-jwplayer';

// Iron Router
Router.onBeforeAction(function() {
JWPlayer.load('YOUR_KEY_HERE');
this.next();
}, { only: ['route1', 'route2'] });
```

```js
import { JWPlayer } from 'bas-meteor-jwplayer';

// Flow Router
FlowRouter.triggers.enter([JWPlayer.load('YOUR_KEY_HERE')], {
only: ['route1', 'route2']
});
```

## Config

Template HTML

```html

```

Template JS

```js
import { JWPlayer } from 'bas-meteor-jwplayer';

// use JWPlayer.loaded() to reactively check that the lib is ready
Template.myTemplate.onRendered(function() {
this.autorun(function() {
if (JWPlayer.loaded) {
jwplayer('player').setup({
file: 'http://example.com/my-video.mp4',
width: '100%',
aspectratio: '16:9',
autostart: true
});
}
});
});
```

## Resources

- [JWPlayer Homepage](http://www.jwplayer.com/)
- [JWPlayer Support/Docs](http://support.jwplayer.com/)
- [JWPlayer Javascript API](http://support.jwplayer.com/customer/portal/topics/564475-javascript-api/articles)

## Backers

### Maintainers

These amazing people are maintaining this project:

- [Basgrani](http://basgrani.com) - [view contributions](https://github.com/Basgrani-Org/bas-meteor-jwplayer/commits?author=Basgrani)

### Sponsors

No sponsors yet! Will you be the first?

[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9EARMSN5WMDDY)

### Contributors

These amazing people have contributed code to this project:

- [Basgrani](http://basgrani.com) - [view contributions](https://github.com/Basgrani-Org/bas-meteor-jwplayer/commits?author=Basgrani)

### Contribute

If you wish you can contribute to the development of this project:

- Contribute with your code

- [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9EARMSN5WMDDY)

## License

- View the [LICENSE](https://github.com/Basgrani-Org/bas-meteor-jwplayer/blob/master/LICENSE.md)

## Contact

- [email protected]