# Error Codes

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

Playback failures use the [error feature](./feature-error.md) instead. See [Handle playback errors](../../guides/playback-errors.md) 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](./vjs8-legacy-init.md)

  `videojs()` was the Video.js 8 API. Video.js 10 has no factory; players are components you compose.
- [VJS8_LEGACY_PLUGIN](./vjs8-legacy-plugin.md)

  `videojs.registerPlugin()` was the Video.js 8 plugin system. Video.js 10 has no plugin registry.
- [VJS8_LEGACY_COMPONENT](./vjs8-legacy-component.md)

  `videojs.registerComponent()` was the Video.js 8 component tree. Video.js 10 components are custom elements and React components.
- [VJS8_LEGACY_GET_PLAYER](./vjs8-legacy-get-player.md)

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

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