0.5.0 • Published 8 years ago

bplayer-vhs v0.5.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

BPlayer VHS (aka VHS)

Simple wrapper to make working with bloomberg bplayer a bit easier.

Instructions

  • First save the module to you project...
npm install --save bplayer-vhs
  • Add it as a dependency in your app
import VHS from 'bplayer-vhs'
  • Then make sure you have a DIV in your body with an ID where you want the video to inject to.
<div class="dvz-video" id="some-video"></div>

(Note: feel free to style the div however you like, but please keep it relatively positioned. The injected video will stretch to fill the width of it's parent)

  • Now, instantiate the player passing in the ID of the div it will inject to + the ID of the video asset itself.
const v = new VHS({
	domId: 'top-video',
	videoId: 'OD0g_99_xxxxxxxx',
});
  • The above configuration will leave the player in it's default state. Below, we are specifiying a player with autoplay (defaults to false) and which will play on terminal (also defaults to false)
const v = new VHS({
	domId: 'top-video',
	videoId: 'OD0g_99_xxxxxxxx',
	autoplay: true,
	playOnTerminal: true
});
  • For livestreams: (options for videoId are US, ASIA, EU, EVENT, EMEA_EVENT, or ASIA_EVENT)
const v = new VHS({
    domId: 'top-video',
    videoId: 'US',
    live: true
});
  • You also have access to all BPlayer methods such as play/pause/etc
v.play();
v.pause();
0.5.0

8 years ago

0.4.0

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.99

8 years ago

0.0.9

8 years ago

0.0.85

8 years ago

0.0.82

8 years ago

0.0.81

8 years ago

0.0.8

8 years ago