Developer shares brutal lessons building a video speed tracker for online courses
A developer building CourseSpeed, a browser extension for custom video playback speeds and learning analytics across platforms like Udemy, Coursera, and LinkedIn Learning, found the analytics far harder than the UI. Standard HTML5 video event listeners worked on some platforms but failed on others because modern learning platforms wrap video elements in custom players, throttle events, and dynamically recreate DOM nodes during navigation. Orphaned event listeners and synthetic events caused wildly inaccurate watch-time data, sometimes logging a 14-hour course as completed in 47 minutes. The developer replaced event listeners with a MutationObserver to detect video element swaps in real time, resolving the orphaned listener issue. A further complication emerged when Chrome's aggressive background-tab throttling of timers caused batched, inaccurate analytics pings whenever users switched tabs during playback.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in