Development Log: vimm-core Updates (February 8th 2025)
🔧 Core Infrastructure Improvements
Media Server Optimization
- Fixed critical issue with duplicate Node Media Server (NMS) initialization that was causing EADDRINUSE errors on ports 1935 and 8000
- Implemented singleton pattern for NMS instance management to prevent duplicate server instances and undefined session issues
- Centralized NMS instance management through new
src/server/nms-instance.js
module
API Enhancements
- New Endpoints:
- Added
GET /api/streams
endpoint with comprehensive features:- Pagination support (
?page=X&limit=Y
) - Language filtering (
?language=en
) - Category filtering (
?category=gaming
) - Stream metadata including viewer counts and quality information
- Pagination support (
- Implemented
GET /api/stream/:streamId/status
endpoint providing:- Basic stream metadata (title, description, category)
- Real-time statistics (viewers, uptime)
- Quality information (resolution, bitrate, codecs)
- Stream health metrics
- Added
Database Updates
- Added
streamCategory
field to StreamKey model - Implemented corresponding database migration
- Enhanced stream filtering capabilities based on new category field
Frontend Improvements
- Fixed ad container visibility issues on initial page load
Bug Fixes
- Resolved "Cannot convert undefined or null to object" error in streams endpoint
- Fixed "Cannot read property of undefined" error in stream status endpoint
- Corrected require path for streamStatusRouter
- Fixed various migration-related issues
🔄 Migration Guide
For developers working with the codebase:
- Run the latest migrations to add the new
streamCategory
field - Update any direct NMS instance references to use the new singleton pattern
- Review and update stream-related API calls to leverage new filtering capabilities
🔜 Next Steps
- Continue monitoring NMS performance after singleton implementation
- Gather feedback on new stream categorization system
- Consider expanding stream metadata capabilities
This development log summarizes the major updates from the recent commits to the vimm-core repository. The changes focus on improving server stability, enhancing the streaming API capabilities, and fixing critical infrastructure issues. Notable highlights include the Node Media Server optimization and the introduction of new stream management endpoints.
@chiren, you're rewarding 0 replies from this discussion thread.