Socket
Socket
Sign inDemoInstall

bas-meteor-jwplayer

Package Overview
Dependencies
99
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
9
increased by80%
Maintainers
1
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 30 Sep 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc