Videojs Warn Player.tech--.hls Is Deprecated. Use - Player.tech--.vhs Instead
Understanding the Video.js Warning: player.tech--.hls is deprecated. use player.tech--.vhs instead
If you use captions or audio tracks, ensure they still work:
Historically, videojs-contrib-hls was a separate plugin required to play HLS content in browsers without native support. With the release of Video.js 7, the core team introduced , a unified engine that supports both HLS and DASH. Understanding the Video
If you manage web video playback, you may have noticed a new warning in your browser console: videojs warn player.tech--.hls is deprecated. use player.tech--.vhs instead .
For many years, the official way to add HLS support to Video.js was through the videojs-contrib-hls plugin. This plugin provided a custom tech called hls that used MSE to play HLS streams in browsers that lack native support. Developers would initialize the player with: If you manage web video playback, you may
// Use vhs instead of hls var vhsEngine = player.tech_.vhs; console.log(vhsEngine.playlists.master); Use code with caution. 2. Update Event Listeners
Change those lines to use player.tech_.vhs . This plugin provided a custom tech called hls
To resolve the warning "videojs warn player.tech--.hls is deprecated. use player.tech--.vhs instead," you need to update your code to use the Video.js HTTP Streaming (VHS)
: Video.js introduced VideoJS HTTP Streaming (VHS) as a built-in feature [1]. VHS replaced the old HLS tech entirely because it does much more: it supports both HLS and DASH streams using a single, unified playback engine [1].
Previously, HLS and DASH required different plugins or handled streaming protocols separately. VHS supports both HLS and DASH under one, unified codebase, simplifying maintenance and improving reliability.