# Error Codes

Error codes emitted by the video.js package and how to resolve them

Playback failures use the [error feature](https://videojs.org/docs/framework/html/reference/api/feature-error) instead. See [Handle playback errors](https://videojs.org/docs/framework/html/guides/playback-errors) for application handling.

## Video.js 8 Error Codes

The `video.js` package throws these `VJS8_LEGACY_*` errors when code calls a Video.js 8 API that does not exist in Video.js 10. Each code identifies the old API and its Video.js 10 equivalent.

- [VJS8_LEGACY_INIT](https://videojs.org/docs/framework/html/reference/api/vjs8-legacy-init)

  `videojs()` was the Video.js 8 API. Video.js 10 has no factory; players are components you compose.
- [VJS8_LEGACY_PLUGIN](https://videojs.org/docs/framework/html/reference/api/vjs8-legacy-plugin)

  `videojs.registerPlugin()` was the Video.js 8 plugin system. Video.js 10 has no plugin registry.
- [VJS8_LEGACY_COMPONENT](https://videojs.org/docs/framework/html/reference/api/vjs8-legacy-component)

  `videojs.registerComponent()` was the Video.js 8 component tree. Video.js 10 components are custom elements and React components.
- [VJS8_LEGACY_GET_PLAYER](https://videojs.org/docs/framework/html/reference/api/vjs8-legacy-get-player)

  `videojs.getPlayer()` looked players up by id. Video.js 10 has no registry; hold a reference to the element.
- [VJS8_LEGACY_OPTIONS](https://videojs.org/docs/framework/html/reference/api/vjs8-legacy-options)

  `videojs.options` held Video.js 8 global defaults. Video.js 10 has no global; configuration lives on the components you render.

---

HTML documentation: https://videojs.org/docs/framework/html/llms.txt
All documentation: https://videojs.org/llms.txt
