api.video hls.js analytics plugin
api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
Table of contents
Project description
hls.js module to call the api.video analytics collector.
Getting started
Setup
Include https://unpkg.com/@api.video/hlsjs-player-analytics
in your web page.
Code sample
Include the module in your HTML file like so:
Documentation
Module instanciation
Then, before having instanciated Hls
, instanciate a HlsJsApiVideoAnalytics
object.
The HlsJsApiVideoAnalytics
constructor take the following parameters:
Parameter name | Mandatory | Type | Description |
---|---|---|---|
hls | yes | Hls instance |
the instance of Hls |
options | no | HlsJsApiVideoAnalyticsOptions (see below) |
optional options |
Available options (HlsJsApiVideoAnalyticsOptions
):
Option name | Mandatory | Type | Description |
---|---|---|---|
userMetadata | no | { [name: string]: string }[] |
object containing metadata (see Full example below) |
sequence | no | {start: number; end?: number;} |
if only a sequence of the video is going to be played |
Instanciation example
var = new;
new;
Was this page helpful?