Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead Updated -
Find and replace all string instances of tech_.hls with tech_.vhs .
VHS is built directly into Video.js, meaning you no longer need to include videojs-contrib-hls as a separate plugin. Consistent Experience: vhs: overrideNative: true
: 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].
If your JavaScript code manually accesses the HLS object to change quality levels, tracks, or metadata, change hls to vhs . javascript
Let's walk through a complete migration from a legacy HLS setup to modern VHS. Find and replace all string instances of tech_
npm install videojs-contrib-hls
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.
: If you haven't manually added hls to your code but still see the warning, it may be coming from a third-party plugin (like Mux Data) that hasn't been updated to the latest Video.js API.
The warning shows player.tech--.hls because internally Video.js normalizes tech names (e.g., 'hls' becomes 'Hls' class). The double hyphen is just a naming convention. The key message is: stop using hls and start using vhs . VHS replaced the old HLS tech entirely because
You may get undefined if you access player.tech_.vhs before the tech is ready. Always wrap in player.ready() or listen to 'loadedmetadata' .
This change reflects the internal transition to the newer Video.js HTTP Streaming (VHS) architecture. While the old property currently remains functional for backward compatibility, relying on it may cause breakage upon upgrading to future major releases.
player.tech_.hls.on('playlistchanged', function() console.log('The playlist changed!'); ); Use code with caution. javascript
Accessing internal properties prefixed with underscores (like player.tech_ ) carries inherent risks because internal architectures can shift between major software releases. npm install videojs-contrib-hls This public link is valid
Historically, Video.js relied on a separate plugin called videojs-contrib-hls to play HTTP Live Streaming (HLS) feeds on browsers that did not natively support it (like Google Chrome and Mozilla Firefox). This engine was accessible via the internal property player.tech_.hls .
// Target the unified VHS engine instead const qualityLevels = player.tech_.vhs.qualityLevels(); Use code with caution. 2. Update Event Listeners
If you are a developer working with web video, you are likely familiar with , the standard open-source library for building HTML5 video players. While upgrading or maintaining a project, you may have noticed a warning in your browser console:
