Highlights
- Explicit opt-in for AWS MediaTailor, with full support for custom CDN domains.
- New
config.ad.typeAPI to choose between CSAI and SSAI (DAI,MT) ad tracking — no more URL-based guessing for SSAI. - End-to-end logging through
nrvideo.Log, with active detection mode logged at startup.
Features
MediaTailor custom CDN support
Replaced URL-based auto-detection with explicit opt-in.
- Enabled the tracker via
mediatailor: true(ormediatailor: { trackingUrl, adSegmentPrefix }), supporting both default AWS hostnames and custom CDN domains. - Added
MT_DEFAULT_AD_SEGMENT_PATH(/tm/) constant for AWS-recommended CDN ad-segment path; ad segments rewritten to a custom CDN domain under/tm/are detected automatically. - Updated
isMediaTailorSegment()to check the default AWS segments hostname, the/tm/path, and an optional customer-suppliedadSegmentPrefix. - Threaded
adSegmentPrefixthrough HLS (VHS) and DASH manifest parsing. - Added explicit session initialization via
mediatailor: { trackingUrl }forPOST /v1/session/flows.
Ad tracking configuration
Introduced config.ad.type to control ad tracker selection.
- Exposed
AD_TRACKINGconstant with CSAI (flat value covering IMA / Brightcove IMA / Freewheel / generic) and SSAI sub-types (DAI,MT). - Required an explicit sub-type for SSAI — each platform needs its own SDK and cannot be auto-detected.
- Mapped
SSAI.MTto implymediatailor: true. - Added a fallback to CSAI auto-detection with a warning when
config.ad.typeis unset (backward compatible for v4.1.2 users). - Co-located
segmentPrefixandtrackingUrlunderconfig.ad. - Added
DaiAdsTrackerto static exports.
Logging improvements
- Exposed
VideojsTracker.Logas a static so UMD callers can set log level. - Added logging of the active ad segment detection mode at tracker startup.
- Added logging of the matched ad segment detection path on the first ad break (once per session).
- Added logging of which CSAI framework was auto-detected (BrightcoveIma / IMA / Freewheel / generic).
- Replaced
console.log/warn/errorwithnrvideo.Logacross MediaTailor files.
Bug fixes
- Fixed buffer end handling in tracker.
- Fixed
register-plugin.jssilently dropping the options object and not forwarding it to theTrackerJSconstructor.
Documentation
- Updated the README and SSAI docs for custom CDN support, clarified when
trackingUrlandadSegmentPrefixoverrides are needed, and cleaned upsessionIdreferences. - Corrected
adSegmentPrefixreferences toconfig.ad.segmentPrefixin the SSAI troubleshooting docs.
Upgrade from 4.1.x
- No breaking changes for CSAI users. If
config.ad.typeis unset, the tracker still auto-detects CSAI frameworks (with a one-time warning). - MediaTailor users must opt in explicitly. Replace any URL-pattern reliance with one of:
mediatailor: true(default AWS hostnames +/tm/path)mediatailor: { trackingUrl, adSegmentPrefix }(custom CDN / explicit session init)config.ad.type: AD_TRACKING.SSAI.MT
- If you previously passed
adSegmentPrefixat the top level, move it toconfig.ad.segmentPrefix.