Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/basgrani-org/bas-meteor-jwplayer
- Owner: Basgrani-Org
- License: mit
- Created: 2016-08-08T13:48:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T21:13:29.000Z (about 6 years ago)
- Last Synced: 2024-11-16T16:44:51.943Z (about 1 month ago)
- Topics: javascript, jwplayer, meteor
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
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