- Breaking change: This release adds a
package.json#exportsmap. Deep imports into internal paths of this package will no longer resolve — only the root export (@newrelic/video-videojs-js) and the new/browsersubpath are valid import targets. Update any direct deep-imports before upgrading.
New features
/browsersubpath export: A@newrelic/video-videojs-js/browserentry point is now available that excludes unused Vega/connected-device code, reducing bundle size for browser consumers.notifyAdSkipped()(MediaTailor): Host apps with a custom skip-ad UI can report a user-initiated skip. Emits the skipped ad-end event when in an ad; no-op otherwise. Mirrors the equivalent API on the iOS/Android trackers.stopTracking()(MediaTailor): Reversible teardown that stops polling and unregisters listeners without disposing the tracker, so it can be resumed later. Shares the method name used by the iOS/Android trackers.AD_ERRORevents (MediaTailor): Non-terminal failures now surface asAD_ERRORevents in NRDB with a semanticerrorCode(NO_FILL,ADS_TIMEOUT,TRACKING_FETCH_FAILED,TOKEN_EXPIRED,MISSING_AVAIL_START,MANIFEST_TRACKING_MISMATCH) instead of only appearing in the debug log.adPrimaryIdattribute (MediaTailor):AD_START,AD_END, andAD_QUARTILEnow carryadPrimaryId(the VASTcreativeId, falling back toavailId:adId) socount(DISTINCT adPrimaryId)counts true creatives, not per-avail ad IDs.
Improvements
@newrelic/video-coreupdated to 5.1.0, which includes a TypeScript conversion, upstream bug fixes, and dependency patches.- Configurable poll cadence (MediaTailor):
config.ad.pollIntervalMsoverrides the manifest-derived live poll interval (clamped to 100–5000 ms) for battery- or CPU-constrained clients. Behavior is unchanged when the option is omitted. - Tracking URL from HLS manifest (MediaTailor): The tracker now reads the tracking endpoint from an
#EXT-X-DATERANGE CLASS="tracking"tag when present, removing the need to pass an explicittrackingUrlon non-AWS CDNs. An explicit option still takes precedence. - Source-change reset (MediaTailor): Swapping
player.src()now resets the tracker — cancels in-flight fetches, clears the stale ad schedule, and re-derives the tracking endpoint — instead of continuing to poll the previous session's endpoint.
Bug fixes
- MediaTailor: Only the first ad in a multi-ad pod was tracked. The paging loop re-fetched the same avail on every page; the tracker now fetches the full window in a single tokenless request.
- MediaTailor: The tracking endpoint could not be derived for implicit-session media-playlist URLs, so Tier-1 ad detection never ran for those sessions.
- MediaTailor:
config.ad.segmentPrefixwas silently ignored because it was mapped to the wrong internal key. - MediaTailor: A DASH period was classified as an ad when only one of several representations resolved to an ad-marked URL. Classification now requires every representation to match.
- MediaTailor:
AD_ENDwas not fired when a pod ended before its enclosing break boundary, causing completions to be undercounted. - MediaTailor: Pod-count mismatches between manifest and tracking data silently corrupted break geometry; the tracker now reconciles counts explicitly and emits
MANIFEST_TRACKING_MISMATCH. - MediaTailor: Avails with a missing
startTimeInSecondswere silently dropped, undercounting impressions in NRDB; the tracker now falls back to the first ad's start and emitsMISSING_AVAIL_START. - MediaTailor: Live sliding-window re-merges duplicated or dropped ad breaks when start times jittered; breaks now deduplicate by stable identity (
availId+availProgramDateTime). - MediaTailor: No-fill avails emitted phantom
AD_START/quartile events; they now emit only break boundaries plusAD_ERROR(NO_FILL). - MediaTailor: Expired tracking pagination tokens (
HTTP 400) were not handled; the token is now dropped and retried once before emittingTOKEN_EXPIREDand stopping polling. - MediaTailor: Manifest fetches did not re-check
isDisposedafter eachawait, risking state mutation on a disposed tracker. AD_RESUMEwas fired on first play into an ad, not only after a genuine pause.- Disposing mid-ad did not emit the outstanding
AD_END/AD_BREAK_END, leaving the break dangling. - DASH EventStream
presentationTimevalues were treated as raw ticks instead of being converted to seconds, misplacing ads at wrong offsets. - HLS
#EXT-X-CUE-OUT-parsed ad breaks did not initialize quartile flags, causing quartile events to fire more than once per ad.