Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead -

Replace any direct references to player.tech_.hls with player.tech_.vhs:

// Deprecated
const hls = player.tech_.hls;

// Recommended const vhs = player.tech_.vhs;

Old:

player.tech_.hls.on('playlistchange', function() 
  console.log('Playlist changed');
);

New:

player.tech_.vhs.on('playlistchange', function() 
  console.log('Playlist changed');
);

After making the change, test:

The Video.js core team issues deprecation warnings for two primary reasons:

In short: The warning does not mean tech_.hls is gone; it means it will be removed in a future major version.

If you have been developing HTML5 video players using Video.js, particularly those handling HTTP Live Streaming (HLS), you have likely encountered a warning in your browser's console that looks something like this:

VIDEOJS: WARN: player.tech_.hls is deprecated. use player.tech_.vhs instead

At first glance, this warning can be alarming, especially if your custom player logic relies on accessing the underlying HLS technology. Is your player about to break? Do you need to rewrite large portions of your codebase? Replace any direct references to player

The short answer is: No, your player will continue to function for now, but you should update your code to future-proof your application.

This article provides a deep dive into why this warning appears, what player.tech_.hls and player.tech_.vhs actually represent, how to fix the issue, and best practices for managing Video.js tech instances moving forward.

If you are accessing the HLS engine directly to manipulate settings or listen to events (for example, to disable bandwidth stats or check segment sizes), change your reference:

Deprecated (Old):

var hls = player.tech_.hls;
// do something with hls...

Correct (New):

var vhs = player.tech_.vhs;
// do something with vhs...

Do not access player.tech_.vhs immediately after player initialization. The tech may still be loading. Use the loadeddata or techready event:

player.ready(() => 
  // Ensure the underlying tech is ready
  if (player.tech_ && player.tech_.vhs) 
    setupVHSEvents(player.tech_.vhs);
   else 
    player.on('techready', () => 
      setupVHSEvents(player.tech_.vhs);
    );
);

The warning player.tech_.hls is deprecated. use player.tech_.vhs instead is not an emergency, but it is a signal to modernize. By switching from tech_.hls to tech_.vhs, you align your code with the current architecture of Video.js’s HLS playback engine.

The migration is straightforward: rename the property, test your quality-switching and event-handling logic, and update any internal documentation. Your reward is a cleaner, more maintainable codebase free of deprecation warnings.

Final checklist:

By acting now, you ensure that when Video.js eventually removes the alias, your player will continue working seamlessly. Keep streaming, stay updated, and always respect the console – it’s trying to help you build a better video experience. Old: player


Have questions about more complex VHS migrations? Check out the official @videojs/http-streaming documentation on GitHub or open an issue on the Video.js discussion board.

videojs warn player.tech--.hls is deprecated. use player.tech--.vhs instead