1.1.1 • Published 8 years ago

bas-meteor-jwplayer v1.1.1

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

JWPlayer for Meteor (v1.4.3+)

Donate to this project using Paypal

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';

// Iron Router
Router.onBeforeAction(function() {
  JWPlayer.load('YOUR_KEY_HERE');
  this.next();
}, { only: ['route1', 'route2'] });
import { JWPlayer } from 'bas-meteor-jwplayer';

// Flow Router
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';

// 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

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Donate to this project using Paypal

Contributors

These amazing people have contributed code to this project:

Contribute

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

  • Contribute with your code

  • Donate

License

Contact

  • dev@basgrani.com
1.1.1

8 years ago

1.1.0

9 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago