Wybierz koszyk:

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

var player = videojs('my-video', techOrder: ['html5'], // VHS operates within the HTML5 tech html5: vhs: overrideNative: true // Optional: Use VHS even if browser supports HLS natively ); Use code with caution. 4. What If I Can't Upgrade Immediately?

"video.js": "^7.0.0

Fixing this warning involves two main steps: ensuring you are using the correct library version and updating your JavaScript code to reference .vhs instead of .hls . 1. Update Your Dependencies

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.

Your videos will continue to stream normally for now because the alias layer gracefully forwards your commands to the VHS engine. "video

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

When updating your player to utilize VHS natively, keep these implementation tips in mind:

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:

If you switch to .vhs and it returns undefined , check the following: videojs-http-streaming (VHS) - GitHub This link or copies made by others cannot be deleted

player.tech_.hls.currentLevel = 2; // Switch to third quality level

So player.tech_.hls still returns the correct object — it just warns you first.

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.

This warning means your codebase relies on an outdated internal reference for HTTP Live Streaming (HLS) playback. While your video might still play, ignoring this warning risks breaking your video player during future Video.js updates. Why This Warning Appears While your video might still play

Here are a few options for the text, depending on where you need to use it (e.g., a developer release note, a console error explanation, or a support ticket).

Solving the "VideoJS Warn: player.tech().hls is deprecated. Use player.tech().vhs instead" Warning

and update initialization configurations. For technical details and migration steps, see the GitHub discussion on player.hls is deprecated warning