YouTip LogoYouTip

Av Event Stalled

## HTML Audio/Video DOM "stalled" Event The `stalled` event occurs when the browser is attempting to fetch media data (audio or video), but the data is unexpectedly not arriving. This event indicates that the media loading process has come to a halt, typically due to network congestion, server issues, or temporary connectivity drops. --- ## Definition and Usage The `stalled` event is triggered when the media download progress stalls. It is a crucial event for developers building custom media players, as it allows them to detect buffering issues or network interruptions and display appropriate feedback (such as a loading spinner or a retry prompt) to the user. ### Related Media Loading Events To build a robust media player, you should monitor `stalled` alongside other media loading and state events: * **`abort`**: Triggered when the media loading is aborted by the user or a script. * **`emptied`**: Triggered when the media list becomes empty (e.g., if the media is reloaded). * **`error`**: Triggered when an error occurs during media loading. * **`suspend`**: Triggered when the browser intentionally stops fetching media data (e.g., when the buffer is full). * **`waiting`**: Triggered when playback stops because the next frame is not yet available (often followed by `stalled` if the network remains unresponsive). --- ## Browser Support The numbers in the table specify the first browser version that fully supports the `stalled` event. | Event | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera | | :--- | :--- | :--- | :--- | :--- | :--- | | **stalled** | Yes | 9.0+ | Yes | Yes | Yes | --- ## Syntax You can register the `stalled` event handler in three ways: ### 1. In HTML ```html ``` ### 2. In JavaScript (using the `onstalled` event handler property) ```javascript object.onstalled = function() { // Your custom script here }; ``` ### 3. In JavaScript (using `addEventListener()`) ```javascript object.addEventListener("stalled", myScript); ``` > **Note:** Internet Explorer 8 and earlier versions do not support the `addEventListener()` method. --- ## Technical Details | Property / Feature | Description | | :--- | :--- | | **Supported HTML Tags** | `
← Av Event WaitingAv Event Seeking β†’