## HTML Audio/Video DOM: `canplaythrough` Event
The `canplaythrough` event is a standard HTML5 media event. It fires when the browser estimates that it can play the specified audio or video through to the end without needing to stop for further buffering.
This event is highly useful for creating smooth user experiences, such as hiding a loading spinner or enabling a "Play" button only when the media is fully ready for uninterrupted playback.
---
## Event Lifecycle
During the loading process of an audio or video file, a sequence of events occurs in a specific order. The `canplaythrough` event is one of the final stages of this initialization sequence:
1. **`loadstart`**: The browser begins looking for the media data.
2. **`durationchange`**: The duration of the media changes (becomes known).
3. **`loadedmetadata`**: Metadata (like dimensions, duration, and tracks) has been loaded.
4. **`loadeddata`**: The browser has loaded the current playback frame.
5. **`progress`**: The browser is actively downloading the media data.
6. **`canplay`**: The browser can start playing the media, but estimates that it may have to stop for buffering.
7. **`canplaythrough`**: **(This event)** The browser estimates it can play the media continuously to the end without stopping to buffer.
---
## Browser Support
| Feature | Chrome | Edge/IE | Firefox | Opera | Safari |
| :--- | :--- | :--- | :--- | :--- | :--- |
| **`canplaythrough`** | Yes | Yes (IE 9+) | Yes | Yes | Yes |
*Note: Internet Explorer 8 and earlier versions do not support this event.*
---
## Syntax
You can listen for the `canplaythrough` event in three different ways:
### 1. In HTML
```html