🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

bas-meteor-jwplayer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bas-meteor-jwplayer

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

1.1.1
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

meteor

FAQs

Package last updated on 30 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts