@newrelic/video-videojs 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +68 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.LICENSE.txt +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.LICENSE.txt +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/newrelic-video-videojs.min.js +1 -1
- package/dist/umd/newrelic-video-videojs.min.js.LICENSE.txt +3 -1
- package/dist/umd/newrelic-video-videojs.min.js.map +1 -1
- package/package.json +9 -2
- package/src/ads/dai.js +6 -3
- package/src/ads/ima.js +3 -2
- package/src/ads/media-tailor.js +1246 -0
- package/src/ads/utils/mt-constants.js +82 -0
- package/src/ads/utils/mt.js +792 -0
- package/src/techs/contrib-hls.js +7 -8
- package/src/techs/hls-js.js +5 -5
- package/src/techs/shaka.js +7 -6
- package/src/tracker.js +64 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [4.2.0](https://github.com/newrelic/video-videojs-js/compare/v4.1.1...v4.2.0) (2026-05-11)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **AWS MediaTailor Support:** Added comprehensive support for AWS MediaTailor SSAI with DASH
|
|
6
|
+
- Implemented MediaTailor tracker with manifest polling and ad tracking
|
|
7
|
+
- Added MediaTailor lab sample for testing and demonstration
|
|
8
|
+
- Enhanced DASH support for MediaTailor integration
|
|
9
|
+
- Added unit test cases for MediaTailor functionality
|
|
10
|
+
- Improved MediaTailor tracker reliability and event handling
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **Bitrate Data Types:** Updated bitrate data types for improved accuracy and consistency
|
|
15
|
+
- **Manifest Fetch Error Handling:** Added proper error handling for manifest fetch failures
|
|
16
|
+
- **MediaTailor Configuration:** Moved MediaTailor config variables to global scope for better accessibility
|
|
17
|
+
|
|
18
|
+
### Documentation
|
|
19
|
+
|
|
20
|
+
- **SSAI Documentation:** Updated SSAI documentation to include MediaTailor integration details
|
|
21
|
+
- **MediaTailor Naming:** Clarified MediaTailor helper and state naming conventions
|
|
22
|
+
|
|
23
|
+
### Build & Infrastructure
|
|
24
|
+
|
|
25
|
+
- **Release Workflow:** Standardized release workflow with smart detection
|
|
26
|
+
- **Dependencies:** Updated semantic-release dependencies and package-lock.json
|
|
27
|
+
- **Cleanup:** Removed unrelated test infrastructure files, scripts, and dependencies
|
|
28
|
+
|
|
1
29
|
## [4.1.1](https://github.com/newrelic/video-videojs-js/compare/v4.1.0...v4.1.1) (2026-04-17)
|
|
2
30
|
|
|
3
31
|
### Documentation
|
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ The New Relic Video.js Tracker provides comprehensive video analytics for applic
|
|
|
29
29
|
- [API Reference](#api-reference)
|
|
30
30
|
- [Bitrate Metrics](#bitrate-metrics)
|
|
31
31
|
- [Ad Tracking Support](#ad-tracking-support)
|
|
32
|
+
- [SSAI Guide](#ssai-guide)
|
|
32
33
|
- [Data Model](#data-model)
|
|
33
34
|
- [Support](#support)
|
|
34
35
|
- [Contribute](#contribute)
|
|
@@ -446,20 +447,84 @@ The tracker provides comprehensive ad tracking capabilities:
|
|
|
446
447
|
|
|
447
448
|
### SSAI/DAI Integration
|
|
448
449
|
|
|
449
|
-
Server-Side Ad Insertion is
|
|
450
|
+
Server-Side Ad Insertion is supported with automatic tracker selection for supported integrations:
|
|
450
451
|
|
|
451
452
|
```javascript
|
|
452
|
-
// SSAI
|
|
453
|
+
// SSAI tracker selection is automatic for supported integrations
|
|
453
454
|
const tracker = new VideojsTracker(player, options);
|
|
454
455
|
|
|
455
456
|
// The tracker will automatically capture:
|
|
456
457
|
// - Ad breaks, starts, and completions
|
|
457
458
|
// - Ad quartiles and click events
|
|
458
|
-
// - SSAI-specific metadata
|
|
459
|
+
// - SSAI-specific metadata when available
|
|
459
460
|
```
|
|
460
461
|
|
|
461
462
|
**Example:** See [samples/dai/index.html](./samples/dai/index.html) for a complete SSAI implementation.
|
|
462
463
|
|
|
464
|
+
> [!NOTE]
|
|
465
|
+
> **Attention:**
|
|
466
|
+
> This version supports tracking for SSAI (Server-Side Ad Insertion), including AWS MediaTailor. See [samples/media-tailor-lab.html](./samples/media-tailor-lab.html) and the [SSAI Guide](./docs/ssai.md).
|
|
467
|
+
|
|
468
|
+
### AWS MediaTailor Integration
|
|
469
|
+
|
|
470
|
+
The tracker automatically detects and tracks AWS MediaTailor SSAI streams. It supports:
|
|
471
|
+
|
|
472
|
+
- **HLS and DASH** manifest formats
|
|
473
|
+
- **VOD and LIVE** stream types
|
|
474
|
+
- **Multiple ads (pods)** within a single break
|
|
475
|
+
- **Quartile tracking** (25%, 50%, 75%)
|
|
476
|
+
- **Tracking metadata enrichment** when MediaTailor tracking data is available
|
|
477
|
+
|
|
478
|
+
#### Usage
|
|
479
|
+
|
|
480
|
+
```javascript
|
|
481
|
+
import VideojsTracker from '@newrelic/video-videojs';
|
|
482
|
+
|
|
483
|
+
// Initialize player with a sessionized MediaTailor playback URL
|
|
484
|
+
player.src({
|
|
485
|
+
src: 'https://your-mediatailor-endpoint.mediatailor.region.amazonaws.com/v1/master/...',
|
|
486
|
+
type: 'application/x-mpegURL'
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
// Initialize tracker - MediaTailor support is automatic
|
|
490
|
+
const tracker = new VideojsTracker(player, options);
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
The tracker will automatically:
|
|
494
|
+
1. Detect MediaTailor URLs (`.mediatailor.` in URL)
|
|
495
|
+
2. Build the MediaTailor tracking endpoint from the sessionized playback URL
|
|
496
|
+
3. Parse HLS or DASH manifests for ad markers
|
|
497
|
+
4. Track ad breaks, ad starts, quartiles, and ad ends
|
|
498
|
+
5. Enrich ad metadata with the MediaTailor tracking endpoint when available
|
|
499
|
+
6. Handle VOD and LIVE streams appropriately
|
|
500
|
+
|
|
501
|
+
MediaTailor-specific behavior is automatic. The customer does not need to pass MediaTailor-only configuration flags into the tracker.
|
|
502
|
+
|
|
503
|
+
## SSAI Guide
|
|
504
|
+
|
|
505
|
+
For customer-facing SSAI integration details, supported MediaTailor behavior, troubleshooting guidance, and sample usage, see [docs/ssai.md](./docs/ssai.md).
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
## Testing
|
|
509
|
+
|
|
510
|
+
This project includes comprehensive unit tests for all tracker functionality.
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
# Install dependencies
|
|
514
|
+
npm install
|
|
515
|
+
|
|
516
|
+
# Run tests
|
|
517
|
+
npm test
|
|
518
|
+
|
|
519
|
+
# Run tests with coverage
|
|
520
|
+
npm run test:coverage
|
|
521
|
+
|
|
522
|
+
# Run tests in watch mode
|
|
523
|
+
npm run test:watch
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
For more details, see [test/README.md](./test/README.md).
|
|
527
|
+
|
|
463
528
|
## Data Model
|
|
464
529
|
|
|
465
530
|
The tracker captures comprehensive video analytics across four event types:
|