Skip to content

Fix traffic camera dashboard HLS buffering stalls#2

Draft
HornLakeFire wants to merge 2 commits into
mainfrom
cursor/fix-traffic-camera-buffering-a5a7
Draft

Fix traffic camera dashboard HLS buffering stalls#2
HornLakeFire wants to merge 2 commits into
mainfrom
cursor/fix-traffic-camera-buffering-a5a7

Conversation

@HornLakeFire

@HornLakeFire HornLakeFire commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes recurring 3–5 second buffering stalls on traffic camera dashboards and adds the Goodman Rd & Horn Lake Rd intersection page.

Root cause (buffering)

The MDOT HLS streams use 10-second segments with only ~3 segments in the live playlist (~30 seconds total). Low-latency HLS.js settings left almost no buffer ahead of playback, causing stalls every few seconds.

Root cause (black screen on Goodman dashboard)

The stream URLs were missing quotes, which is a JavaScript syntax error — the entire script fails to run:

// Broken — `//` starts a comment, script dies
url: https://streamingshvn1.mdottraffic.com/rtplive/042501.stream/...

// Fixed
url: "https://streamingshvn1.mdottraffic.com/rtplive/042501.stream/..."

Changes

  • traffic-cameras.html — Hwy 301 & Goodman Rd with stable HLS settings
  • goodman-horn-lake-cameras.html — Goodman Rd & Horn Lake Rd with quoted URLs and same HLS settings
  • Routes: /traffic-cameras, /goodman-horn-lake-cameras
  • Pin hls.js to v1.5.17, stagger stream startup, pre-buffer before showing video

Testing

  • Verified all Goodman Rd stream URLs return HTTP 200
  • Confirmed MDOT manifest uses 10s segments with 3-segment sliding window
Open in Web Open in Cursor 

cursoragent and others added 2 commits June 28, 2026 17:11
The MDOT streams use 10-second segments with only a 3-segment live
playlist. The previous low-latency HLS.js settings (liveSyncDuration: 2,
backBufferLength: 0) left almost no buffer ahead of playback, causing
rebuffering every few seconds.

Switch to stable live settings (liveSyncDurationCount: 3), restore back
buffer, stagger stream startup, and avoid Safari live-edge seeking.

Co-authored-by: jeremy <jeremyepowell@hotmail.com>
Fix black screen caused by unquoted stream URLs (JavaScript syntax
error). Uses the same stable HLS settings as the Hwy 301 dashboard.

Co-authored-by: jeremy <jeremyepowell@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants