VOSAN Logo

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.

Share this post

Or copy link

Join the Community

Unlock the full potential of VOSAN with a free account.

User Profile

Your personalized drift identity.

Less ads

Enjoy a cleaner experience as a member.

Access the VOSAN Feed

See what's happening in the community.

Favorite Mods

Save your favorite mods to find them easily.

Leave Feedback

Rate and comment on your favorite creations.

Sign Up for Free
Already have an account? Login