If a video player shows Infinity:NaN:NaN, first check the media element’s duration and currentTime. The values may be non-finite because no media data is ready yet or the media’s end time is unknown. You can guard a custom time display against those values, but hiding the text does not fix missing duration information or establish why Firefox is reporting it.
What Infinity:NaN:NaN means
The string is usually a time formatter displaying values it cannot turn into a normal timestamp. In the HTML media API, HTMLMediaElement.duration is measured in seconds. It is NaN when no media data is available and positive Infinity when the media resource is not known to have a bounded duration, such as a live stream without an announced end. The HTML Standard defines these values; MDN documents the property.
duration is read-only, so assigning a replacement value to it is not the way to remove the display. If an unbounded stream ends, the standard says its duration can change to the time of its final frame or sample, and the browser fires durationchange.
Check whether the browser or your page draws the text
The 2017 SitePoint post described the value appearing in Firefox video controls after a recording, but did not establish whether the display came from native browser controls or custom page code. It also did not include a usable recording, Firefox version, or operating system. See the original SitePoint discussion.
Recommended Free Tools
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
| Where the text appears | What to check |
|---|---|
| Custom time display made by your page | Inspect the formatter and the values it receives. Guard against non-finite values before formatting. |
| Browser-native controls | Inspect the media element’s values and source transition. Page code can avoid feeding bad values to its own formatter, but cannot directly rewrite the native control’s display. |
Inspect the live-stream-to-recording transition
In the SitePoint example, the page first assigns a live camera and microphone stream to video.srcObject, then creates a MediaRecorder. When recording data arrives, the script clears srcObject, assigns a Blob URL to video.src, creates a video/webm Blob for upload, and adds the controls attribute when the stop button is clicked. These are distinct media phases: a live stream may have no known end, while the recorded Blob is expected to be finite.
Log the element’s values during the transition, including after metadata loads and when duration changes:
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const video = document.querySelector("video");
function logMediaState(label) {
console.log(label, {
duration: video.duration,
currentTime: video.currentTime,
readyState: video.readyState,
error: video.error
});
}
video.addEventListener("loadedmetadata", () => logMediaState("loadedmetadata"));
video.addEventListener("durationchange", () => logMediaState("durationchange"));
video.addEventListener("ended", () => logMediaState("ended"));
logMediaState("initial");
Also log immediately before and after replacing srcObject with the Blob URL. This shows whether the non-finite values belong to the live stream, the new recording, or a point before metadata is available.
Prevent a custom formatter from displaying invalid times
When the page owns the time display, only format values that are finite. For an unknown duration, show a deliberate label such as “Live” or “Duration unavailable” instead of passing the value into a timestamp formatter.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
function formatTime(seconds) {
if (!Number.isFinite(seconds) || seconds < 0) {
return "Duration unavailable";
}
const wholeSeconds = Math.floor(seconds);
const minutes = Math.floor(wholeSeconds / 60);
const remainder = wholeSeconds % 60;
return `${String(minutes).padStart(2, "0")}:${String(remainder).padStart(2, "0")}`;
}
function updateTimeDisplay(video, element) {
element.textContent = Number.isFinite(video.currentTime)
? formatTime(video.currentTime)
: "Time unavailable";
}
Choose the fallback text to match your interface: a live player can say “Live,” while a recording that has not loaded metadata can say “Loading.” The example prevents a custom formatter from turning non-finite input into a malformed time; it does not repair the media or change native controls.
If the recorded WebM still reports Infinity
Test the exact recorded Blob as a standalone source after metadata has loaded. Record its MIME type, Firefox build, and the resulting duration and currentTime values; compare the same file in another current browser if available. If Firefox continues to report Infinity for a finite recording, duration or index metadata in the WebM is one area to investigate.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Mozilla documented historical cases of MediaRecorder-created WebM files reporting Infinity. Bug 1385699 was marked fixed for Firefox 57, while Bug 1601061 reported the behavior in Firefox 69, 70, and 71 and remains unconfirmed in its record. These reports show that related behavior has occurred; they do not identify the cause of the SitePoint poster’s symptom or establish current Firefox behavior.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What the original thread establishes
The SitePoint discussion dates to November 16, 2017. Its author reported that Firefox alone showed Infinity:NaN:NaN in place of an elapsed-time value, but supplied no reproducible recording or exact browser and operating-system versions. The reply did not confirm a cause or a working fix. It linked to a separate 2016 Firefox 44.0.2 report involving a YouTube add-on and a NaN:NaN control display; that different setup is not proof of the cause here. The available evidence therefore supports checking the media values and source transition, not attributing the symptom to one confirmed Firefox bug.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Quick Recap
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




