Releases: newrelic/video-core-js
Releases · newrelic/video-core-js
v4.0.1
Released: October 22, 2025
⏱️ Enhanced Error Tracking Attributes
We've added two new timing attributes to provide better insights into error recovery patterns and video playback health:
timeSinceLastError
- Type: Number (milliseconds)
- Scope: Content events only
- Purpose: Tracks time elapsed since the last content error occurred
- Availability: Only included in events after a content error has occurred
timeSinceLastAdError
- Type: Number (milliseconds)
- Scope: Ad events only
- Purpose: Tracks time elapsed since the last ad error occurred
- Availability: Only included in ad events after an ad error has occurred
🔧 Technical Improvements
Smart Error Context Detection
- Context-Aware Timing: The
goError()method now intelligently starts the appropriate timer based on current context (content vs. ad) - Independent Tracking: Content and ad errors are tracked separately for more granular analytics
- Conditional Inclusion: Error timing attributes are only included when relevant, reducing data noise
Enhanced State Management
- Improved VideoTrackerState: Better error state handling with proper timer isolation
- Robust Error Recovery: Enhanced error tracking helps identify recovery patterns and performance issues
- Memory Efficient: Timers only run when needed, optimizing resource usage
📊 Analytics Benefits
Better Error Recovery Insights
- Track how long users experience issues after errors occur
- Identify patterns in error recovery across different content types
- Separate analysis of content vs. ad error impacts
Enhanced Monitoring Capabilities
- Monitor video playback health more effectively
- Detect and analyze error clustering patterns
- Improve user experience by understanding error impact duration
🧪 Quality Assurance
Comprehensive Test Coverage
- New Test Cases: Added comprehensive tests for error timing functionality
- Delta Time Validation: Tests verify correct time calculations for both content and ad errors
- Context Isolation: Tests ensure proper separation between content and ad error tracking
- Independent Timer Operation: Verified that both error types can be tracked simultaneously
Backward Compatibility
- ✅ Non-Breaking: All existing functionality remains unchanged
- ✅ Additive Only: New attributes are only added when errors occur
- ✅ Conditional: No impact on events when no errors have occurred
📚 Documentation Updates
Updated Data Model
- DATAMODEL.md: Added comprehensive documentation for new error timing attributes
- Conditional Behavior: Clear documentation of when attributes are included
- Context Specificity: Detailed explanation of content vs. ad error tracking
Updated Changelog
- Version History: Complete changelog with detailed feature descriptions
- Implementation Notes: Technical details for developers
🔍 Usage Examples
Content Error Tracking
// After a content error occurs
{
"eventType": "VideoAction",
"actionName": "CONTENT_HEARTBEAT",
"timeSinceLastError": 5420, // 5.42 seconds since last error
// ... other attributes
}v4.0.0
💥 Breaking Changes
Decoupled Architecture
The browser agent has been completely redesigned as a standalone unit, independent of the New Relic Browser Agent. This represents a fundamental architectural shift that provides greater flexibility and control.
✨ Key Features
🔧 Independent Logic
- Dedicated Harvesting System: The agent now uses its own specialized data collection and harvesting logic
- Self-Contained Architecture: No longer dependent on Browser Agent infrastructure
- Enhanced Performance: Optimized specifically for video tracking use cases
🚀 Simplified Onboarding
- Streamlined Integration: Easier setup process reflecting the new decoupled nature
- Reduced Dependencies: Fewer external requirements for implementation
- Better Developer Experience: Clear separation of concerns makes integration more straightforward
🔄 Migration Guide
For Existing Users
This is a breaking change that requires migration from the previous coupled implementation:
- Update Integration Code: The agent initialization and configuration have changed
- Review Dependencies: Remove any Browser Agent specific dependencies
- Test Thoroughly: Validate that video tracking continues to work as expected
New Users
- Follow the updated installation and setup documentation
- Take advantage of the simplified onboarding process
- No need to configure Browser Agent integration
📦 Installation
npm install @newrelic/video-corev3.1.1
What's Changed
- AD_ERROR event type updated to VideoErrorAction for standardized video error reporting.
v3.1.0
What's Changed
- Added npm publish support—install with npm i.