Skip to main content

Usage

Register Domain

Register your domain to activate P2P service.

tip

Localhost is always whitelisted. This means that you do not have to configure anything to perform tests locally.

Integrate to HTML5 Players

See Player Integration

Include

Script

<script src="https://cdn.jsdelivr.net/npm/swarmcloud-bitmovin@latest"></script>

File

Click me

Browserify / Webpack

npm install --save swarmcloud-bitmovin

To include p2p engine you need to require it in the player module:

var P2pEngineBitmovin = require('swarmcloud-bitmovin');

If you are using ES6's import syntax:

import P2pEngineBitmovin from 'swarmcloud-bitmovin';

Usage

var conf = {
key: YOUR_BITMOVIN_LICENSE_KEY,
playback: {
preferredTech: [
{player: 'html5', streaming: 'hls'}
]
},
live:{
lowLatency:{
targetLatency: 30
}
},
};
var engine = new P2pEngineBitmovin({
// trackerZone: 'hk', // if using Hongkong tracker
// trackerZone: 'us', // if using USA tracker
// token: YOUR_TOKEN
});
conf.network = engine.getNetworkConfig();
var player = new bitmovin.player.Player(document.getElementById('player'), conf);
engine.setPlayer(player);
player.load(play_url);