# Setup via HTML script/link tags
WARNING
Loading the SDK from the CDN is deprecated in favour of installing it via the NPM Registry.
NOTE
This example is using recommended v3-public
version of SDK.
If you want to use the latest version just switch to v3
usage.
- Include SDK script and styles.
<link type='text/css' rel='stylesheet' href="https://pixellot-web-sdk.pixellot.tv/v3-public/style.css" />
<script src="https://pixellot-web-sdk.pixellot.tv/v3-public/pixellot-web-sdk.umd.js"></script>
- Create a container for player.
<div id="player"></div>
- Set your project id.
const PixellotWebSDK = window.PixellotWebSDK;
// Set your project id.
PixellotWebSDK.SDKApi.projectId('xxxx');
- Initialize the player.
const container = document.getElementById('player');
// Create the player.
const player = new PixellotWebSDK.Player(container);
// Set video source and play.
player.setSrc("https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8");
player.play();