JWPlayer for Meteor (v1.4.3+)
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:
import { JWPlayer } from 'bas-meteor-jwplayer';
JWPlayer.load('YOUR_KEY_HERE');
Or only on specific routes:
import { JWPlayer } from 'bas-meteor-jwplayer';
Router.onBeforeAction(function() {
JWPlayer.load('YOUR_KEY_HERE');
this.next();
}, { only: ['route1', 'route2'] });
import { JWPlayer } from 'bas-meteor-jwplayer';
FlowRouter.triggers.enter([JWPlayer.load('YOUR_KEY_HERE')], {
only: ['route1', 'route2']
});
Config
Template HTML
<template name="myTemplate">
<div id="player"></div>
</template>
Template JS
import { JWPlayer } from 'bas-meteor-jwplayer';
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
Backers
Maintainers
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Contribute
If you wish you can contribute to the development of this project:
License
Contact