Getting started - Storm Library

Storm Library can be implemented in various ways. In this document, we will present you with a more direct and technical approach that requires creating your video player. The general concept is relatively simple – a compiled library file must be added to your site first. The library contains core player and streamer functionality but no GUI whatsoever. It is up to you (the programmer) to create a skin for the player and bound them together via available API (player provides both dedicated methods for controlling the behaviors and events calls to react to various situations).

It is also possible to use our free and ready-to-use player, which comes with a complete, working GUI. By modifying its CSS and JavaScipt (TypeScript) code, it might be easier to get your streaming service running.
You can check it here: Github addr

Install via NPM

  1. Node

    To include Storm Library in Node, first install NPM

                                    
    npm install storm-library
                                
  2. WebPack / Browserify

    There are several ways to use Browserify and Webpack. For more information on using these tools, please refer to the related project's documentation. In the script, including Storm-Player will usually look like this...

                                    
    var $ = require( "storm-library" );
                                
  3. AMD (Asynchronous Module Definition)

    AMD is a module format built for the browser. For more information, we recommend require.js' documentation.

                                    
    define( [ "storm-library" ], function( $ ) {
    
    });
                                

Install via browser include

Adding a JavaScript library is a straightforward task. Please keep in mind that you must locate your JavaScript file on accessible path.

                                
<script src="https://your-domain.com/folder-name/storm-library-1.0.0.min.js"></script>
                            

Accessing player (debugging)

All players are automatically assigned to an array called “stormPlayerCollection”. If you wish to access one of the players easily, you can use this way to reach it:

                                
console.log(stormPlayerCollection);
                            

If you know the id of the player, we can also access it via:

                                
stormPlayerCollection[playerID]