liveplus-web-module

1.0.1 • Public • Published

LivePlus web module (npm)

The Live+ web SDK can be used to easily integrate the Live+ widget in a website.

How to use it

To integrate this, you will need to things :

  • your applicaster clientId (ask support@applicaster.com to provide it to you)
  • a container with relative position to act as an anchor point for positionning the LivePlus widget itself. You can either specify the container's id when initializing the widget, or give it the id liveplus_widget_container which is the default setting. It is highly recommended that this container exactly fits your video player's position, width and height, for better positionning of the LivePlus widget.

install this module with npm :

$ npm install -S liveplus-web-module

This will add the module to your node_modules. You then just need to initialize the widget at the root of your app like this :

import LivePlus from 'liveplus-web-module';

let options = {clientId: ''} // your applicaster account Id - required
LivePlus.init(options);

and that's it ! Simply note that the LivePlus object will require the javascript document object to be available, as well as the container. So you should initialize the widget when DOM is loaded.

Configure your LivePlus widget

by default, the player positions itself on the right bottom corner of the given container, precisely at bottom: 100px and right: 20px, and bottom: 190px and right: 30px in fullscreen. You can customize this by passing other parameters to place it wherever you want.

Here is the default parameter's object. You can override any part you want, by passing an option object to the widget's init method. The actual config used is Object.assign({, defaultParams, options}), so any provided parameter will override the default one.

defaultParams = {
  containerId: "liveplus_widget_container",
  position: {
    bottom: 100,
    right: 20,
  },
  fullscreen: { // position parameters when entering fullscreen
    bottom: 190,
    right: 30
  }
}

API reference

The LivePlus object currently exposes two public methods :

  • init(options) : init method to be called with a proper options object as parameter to create the widget in the DOM.
  • toggleVisibility() : a method you can use to show / hide the Live+ widget. Use this method if you want to add a button to your video player to toggle the widget on & off.

Readme

Keywords

none

Package Sidebar

Install

npm i liveplus-web-module

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • f-roland-applicaster