You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,23 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [1.0.2]
6
+
- Added support for DASH.js video player monitoring
7
+
- Enhanced analytics collection for DASH streams
8
+
- Improved error tracking for DASH.js players
9
+
5
10
## [1.0.1]
6
11
- Resolved proper cleanup of HLS streams upon the viewComplete event.
7
-
- Enhanced stream handling logic: when a new player instance is initialized while another is in progress, the SDK now correctly destroys the previous player’s data monitoring and seamlessly switches to capture analytics for the incoming player.
12
+
- Enhanced stream handling logic: when a new player instance is initialized while another is in progress, the SDK now correctly destroys the previous player's data monitoring and seamlessly switches to capture analytics for the incoming player.
8
13
9
14
## [1.0.0]
10
15
11
16
### Added
12
-
-**Integration with HLS**:
13
-
- Enabled video performance tracking using FastPix Data SDK, supporting HLS streams with user engagement metrics, playback quality monitoring, and real-time streaming diagnostics.
14
-
- Provides robust error management and reporting capabilities for HLS video performance tracking.
15
-
- Allows customizable behavior, including options to disable cookies, respect `Do Not Track` settings, and configure advanced error tracking and automatic error handling.
16
-
- Includes support for custom metadata, enabling users to pass optional fields such as `video_id`, `video_title`, `video_duration`, and more.
17
-
- Introduced event tracking for `videoChange` to handle metadata updates during playback transitions.
Copy file name to clipboardExpand all lines: README.md
+67-37Lines changed: 67 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,30 @@
1
1
# Introduction:
2
2
3
-
This SDK simplifies integration steps with [HLS.js](https://github.com/video-dev/hls.js), enabling the collection of player analytics. It enables automatic tracking of video performance metrics, making the data readily available on the [FastPix dashboard](https://dashboard.fastpix.io) for monitoring and analysis. While the SDK is developed in TypeScript, the published npm package currently includes only the JavaScript output. TypeScript support, including type definitions, will be released in a future version.
3
+
FastPix Video Data Core SDK monitors and analyzes **HLS.js** and **DASH.js** video players. Get instant insights into video performance with our monitoring features:
- Player performance data (startup time, buffering, quality)
7
+
- Network metrics (bandwidth, request timing)
8
+
- Error logs and diagnostics
9
+
- User interaction events
6
10
7
-
-**Track Viewer Engagement:** Gain insights into how users interact with your videos.
8
-
-**Monitor Playback Quality:** Ensure video streaming by monitoring real-time metrics, including bitrate, buffering, startup performance, render quality, and playback failure errors.
9
-
-**Error Management:** Identify and resolve playback failures quickly with detailed error reports.
10
-
-**Customizable Tracking:** Flexible configuration to match your specific monitoring needs.
11
-
-**Centralized Dashboard:** Visualize and compare metrics on the [FastPix dashboard](https://dashboard.fastpix.io) to make data-driven decisions.
11
+
The SDK instantly collects and sends all metrics to the [FastPix dashboard](https://dashboard.fastpix.io) for easy viewing. Currently available as a JavaScript bundle, with TypeScript support coming soon.
12
12
13
13
# Prerequisites:
14
14
15
-
## Getting started with FastPix:
15
+
## Getting Started
16
16
17
-
To track and analyze video performance, initialize the FastPix Data SDK with your Workspace key (learn more about [Workspaces here](https://docs.fastpix.io/docs/workspaces)):
17
+
To begin tracking your video analytics, you'll need your FastPix workspace key. Here's how to get it:
18
18
19
-
1.**[Access the FastPix Dashboard](https://dashboard.fastpix.io)**: Log in and navigate to the Workspaces section.
20
-
2.**Locate Your Workspace Key**: Copy the Workspace Key for client-side monitoring.
19
+
1. Sign up or login to [FastPix Dashboard](https://dashboard.fastpix.io).
20
+
2. Navigate to the workspace page.
21
+
3. Copy your preferred workspace key.
22
+
23
+
That's it! You're ready to integrate the SDK into your video player.
21
24
22
25
# Step 1: Installation and Setup:
23
26
24
-
To get started with the SDK, install using npm or your favourite node package manager 😉:
27
+
Install the SDKusing npm or another package manager of your choice:
25
28
26
29
```bash
27
30
npm i @fastpix/video-data-core
@@ -35,9 +38,12 @@ import fastpixMetrix from "@fastpix/video-data-core";
35
38
36
39
# Step 3: Basic Integration
37
40
38
-
The `workspace_id` is a mandatory field that must be provided. In addition, install the hls.js package, import the Hls instance, and attach it to the HTML5 video element. Pass both the Hls instance and the Hls constructor function, along with custom metadata, to the `fastpixMetrix.tracker` function.
41
+
Before using the FastPix Video Data Core SDK, ensure you have installed either HLS.js or DASH.js player libraries:
42
+
43
+
The `workspace_id` is a mandatory field that must be provided. Below are the
44
+
integration steps for both HLS.js and DASH.js players.
39
45
40
-
Once the player has loaded the URL and playback has started, the SDK will then begin tracking the analytics.
workspace_id:"WORKSPACE_KEY", // Unique key to identify your workspace (replace with your actual workspace key)
101
+
player_name:"Main Video Player", // A custom name or identifier for this video player instance
102
+
player_init_time: initializationTime, // Timestamp of when the player was initialized (useful for tracking performance metrics)
103
+
video_title:"VIDEO_TITLE", // Title of the video being played for analytics
104
+
video_id:"VIDEO_ID", // Unique identifier for the video
105
+
viewer_id:"VIEWER_ID", // Unique identifier for the viewer
106
+
107
+
// Add any additional metadata
108
+
};
109
+
110
+
// Pass both `dashPlayerInstance` and `dashjs` to the FastPix tracker for correct tracking
111
+
fastpixMetrix.tracker(videoPlayerElement, {
112
+
debug:false, // Set to true to enable debug logs in the console
113
+
dashPlayer: dashPlayerInstance, // Pass the `dashPlayerInstance` created above
114
+
dashjs: dashjs, // Pass the `dashjs` constructor (imported)
115
+
data: trackingData, // Attach custom metadata for analytics and tracking
116
+
});
78
117
```
79
118
80
-
After successfully completing Step 3, you can track viewer metrics in the FastPix dashboard once playback ends. Steps 4, 5, and 6 are optional and can be utilized as needed to enhance your integration.
119
+
Once the player has loaded the URL and playback has started, the SDK will begin tracking the analytics. After playback ends, you can view the complete analytics report on your [FastPix dashboard](https://dashboard.fastpix.io).
81
120
82
121
# Step 4: Enhance Tracking with User Passable Metadata
83
122
84
-
Check out the [user-passable metadata](https://docs.fastpix.io/docs/user-passable-metadata) documentation to see the metadata supported by FastPix. You can use custom metadata fields like `custom_1` to `custom_10` for your business logic, giving you the flexibility to pass any required values. Named attributes, such as `video_title` and `video_id`, can be passed directly as they are.
123
+
Check out the [user-passable metadata](https://docs.fastpix.io/docs/user-passable-metadata-1) documentation to see the metadata supported by FastPix. You can use custom metadata fields like `custom_1` to `custom_10` for your business logic, giving you the flexibility to pass any required values. Named attributes, such as `video_title` and `video_id`, can be passed directly as they are.
When your application plays multiple videos back-to-back in the same player, it’s essential to notify the FastPix SDK whenever a new video starts; possibly in scenarios like playlist content/ video series or any other video that user wants to play.
213
+
When your application plays multiple videos back-to-back in the same player, it's essential to notify the FastPix SDK whenever a new video starts; possibly in scenarios like playlist content/ video series or any other video that user wants to play.
186
214
187
215
```javascript
188
216
// videoPlayerElement is the HTML5 <video> element representing your video player.
0 commit comments