Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead ~upd~ -
const vhs = player.tech_.vhs;
If you want to ensure your configuration is completely optimized, let me know: Which you are currently running?
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 this happens during or during video playback const vhs = player
Migrating your logic fully to VHS is not just about silencing a console warning; it drastically improves your web video delivery pipeline:
Developers frequently access the underlying streaming tech to manipulate network requests or inspect quality levels. Here is how to convert the two most common implementations. Modifying Network Requests (Auth Tokens/Headers)
You might wonder why we use tech_ (with an underscore). The tech_ property is internal to Video.js and represents the underlying playback technology (like HTML5, Flash—though Flash is dead, or native HLS). It’s not meant for public API use, but it’s often the only way to access advanced stream methods. If you share with third parties, their policies apply
This comprehensive guide explains why this warning appears, what changed under the hood, and how to update your codebase to resolve it. Why the Warning Appears: HLS vs. VHS
var player = videojs('my-player', html5: vhs: overrideNative: true ); Use code with caution. Common Use Cases for player.tech_.vhs
const levels = player.tech_.hls.levels; levels.forEach((level, idx) => console.log(`Level $idx: $level.heightp`); ); If this happens during or during video playback
If you installed videojs-contrib-hls via npm:
Step 2 — Update dependencies