Videojs Warn Player.tech--.hls Is Deprecated. | Use Player.tech--.vhs Instead
While Video.js has not announced an exact version for removal, here is the historical pattern:
Given the slow-moving nature of major video player upgrades, you likely have 12–24 months after the v9 release notice. Nevertheless, fixing the warning today takes less than an hour for most codebases and eliminates a future bug. While Video
You might wonder why we use tech_ (with an underscore). The tech_ property is internal to Video.js and represents the underlying playback technology (like HTML5, Flash—though Flash is dead, or native HLS). It’s not meant for public API use, but it’s often the only way to access advanced stream methods. Given the slow-moving nature of major video player
Pro tip: If there’s a public method on the player for what you need (e.g., player.currentTime()), always prefer that over player.tech_.vhs. Use tech_.vhs only when absolutely necessary. Flash—though Flash is dead
The reasons are both technical and architectural:
| Old (player.tech_.hls) | New (player.tech_.vhs) |
| --- | --- |
| Tied to videojs-contrib-hls | Part of @videojs/http-streaming (VHS) |
| Only HLS support | HLS + DASH + future protocols |
| Heavier, less modular | Lighter, better performance |
| Legacy API methods inconsistent | Cleaner, unified API |
| No longer actively maintained (old repo) | Actively developed by Video.js core team |
By deprecating the .hls accessor, Video.js encourages developers to use the modern, unified VHS interface. This also paves the way for removing the legacy shim entirely in Video.js v8 or later.
