In this guide
The categories answer different questionsA category is not a verdict on one componentPreserve sequence and contextA browser media element can expose a MediaError when playback fails. Its code places the failure in one of four broad categories: aborted fetching, network error, decode error or unsuitable source. The code narrows the investigation but does not name every underlying cause.
Application libraries and native players may use different error systems. Preserve the exact code, message and player version rather than translating every error into “buffering.”
The categories answer different questions
| Code | Category | Useful next evidence |
|---|---|---|
| 1 | Aborted | Which action or load transition interrupted fetching? |
| 2 | Network | Which resource/request failed during retrieval? |
| 3 | Decode | Which media configuration or sample failed after being considered usable? |
| 4 | Source unsuitable | What source description and actual payload were selected? |
A category is not a verdict on one component
A decode error can follow invalid media, an unsupported characteristic encountered later or another decoder-path problem. A source-unsuitable result can involve the selected resource or provider object; it is not necessarily a statement that the account is expired. A network category does not by itself locate an ISP, router or CDN fault.
An original hypothetical resource returns an HTML access page instead of MP4 media. The media element may ultimately reject the source. The useful chain includes the actual response shape, not just the final numeric category.
Preserve sequence and context
Record the error when it happens, the selected source, current playback time, ready state and recent request outcomes where available. A user action that calls load or changes the source can interrupt an earlier attempt, so the event order matters. Avoid diagnosing an aborted old attempt as the cause of a later successful one.
For developers, handle the error event and retain only necessary diagnostics. For viewers, copy the player’s displayed details and the time. Redact credentials, signed URLs and unrelated browser activity before sharing logs.
A good report pairs the category with one concrete observation: a failed segment request, a malformed response, a repeatable decode boundary or a source change. It does not claim certainty that the broad category cannot provide.
