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

// Deprecated (Old) var hls = player.tech_.hls;

// Deprecated var player = videojs('my-video', html5: hls: withCredentials: true ); // Correct var player = videojs('my-video', html5: vhs: withCredentials: true ); Use code with caution. Copied to clipboard Quick Troubleshooting

var player = videojs('my-video-player'); player.ready(function() // Use the modern VHS property if (player.tech_.vhs) console.log('VHS master playlist:', player.tech_.vhs.playlists.master); ); Use code with caution. Step 3: Update Common Implementation Patterns

Your code accidentally registers the old tech alongside the new one. This can happen if you include videojs-contrib-hls after Video.js core. // Deprecated (Old) var hls = player

VHS handles both HLS and DASH seamlessly, reducing the bloat of multiple plugins.

Example that triggers the warning:

Simply rename the property access. Change: This can happen if you include videojs-contrib-hls after

Better: Open an issue on the plugin’s GitHub repo referencing this deprecation.

// Access the VHS object via the tech const vhs = player.tech_.vhs; // Notice: .vhs, not .hls

Update that specific plugin to its latest version. Most mainstream plugin maintainers have already updated their codebases to support VHS. Best Practices for Using VHS Change: Better: Open an issue on the plugin’s

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.

New:

The warning does not crash the page, but it clutters the console, and future Video.js updates may remove .hls altogether.

If you are programmatically interacting with the streaming tech (e.g., checking playlists or quality levels), change your accessors: javascript

Gift this article