Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead Guide
Video.js previously relied on a separate plugin called to handle HLS streams. This plugin attached itself to the player tech object under the name hls .
If you manually track source representations or bitrates, change the event listener source. player.tech_.hls.representations() Updated: player.tech_.vhs.representations() Third-Party Plugins and Dependencies
// OLD (deprecated) const hls = player.tech_.hls; hls.selectQuality(2); function() console.log('Playlist changed')
Here's an example of how to initialize a Video.js player using the VHS tech:
In short:
player.tech_.hls.on('playlistchange', function() console.log('Playlist changed'); );
To resolve this warning, you must update your JavaScript code to access player.tech_.vhs instead of player.tech_.hls . To resolve this warning
Whenever possible, interact with standard player methods rather than diving into the tech layer. For example, use the official videojs-contrib-quality-levels plugin API rather than custom tech hacks.