» » mkvmerge GUI

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

Deprecation Warning in Video.js: Time to Move from hls to vhs

If you’ve recently updated your version of Video.js (specifically videojs-contrib-hls or the core player with http-streaming), you might have noticed a new warning in your browser’s console:

VIDEOJS WARN: player.tech_.hls is deprecated. Use player.tech_.vhs instead.

This isn’t a critical error—your video will likely still play—but it’s an important signal that your code needs a refresh. Let’s break down what this warning means and how to fix it.

1. Understanding the Video.js Tech Layer

In Video.js, a "tech" (short for technology) is the underlying playback engine. The most common tech is the HTML5 video element, but Video.js can also use Flash (legacy), YouTube, or custom techs.

For HLS streaming, browsers do not natively support .m3u8 playlists. To solve this, Video.js uses a middleware tech that intercepts the stream, transmuxes it into something the HTML5 video element can understand (usually MP4 fragments), and feeds the data to the native player.

Historically, this tech was named Hls. You accessed it via:

player.tech_.hls

This property gave you direct access to the underlying HLS implementation, allowing you to:

  • Get and set quality levels (bitrate switching)
  • Listen to HLS-specific events (e.g., hlsError)
  • Manually load or reload segments
  • Check statistics like bandwidth and dropped frames

10. Conclusion

The warning
videojs warn player.tech--.hls is deprecated. use player.tech--.vhs instead
is more of a friendly nudge than an emergency. However, ignoring it means your code relies on a deprecated alias that could vanish without notice in a next major Video.js release.

Fix summary:

  • Search for player.tech_.hls or player.tech().hls
  • Replace with player.tech_.vhs
  • Update your Video.js and HLS streaming libraries
  • Test thoroughly

By migrating to player.tech_.vhs, you ensure your custom HLS logic remains compatible, performant, and ready for the future of Video.js.


Have additional questions about VHS migrations? Check the official Video.js Slack or the @videojs/http-streaming GitHub issues page.

Here’s a short, interesting story built around that technical warning.


Title: The Ghost in the Stream

Maya was a video engineer who prided herself on clean code and silent consoles. No red flags. No warnings. Her latest project was a 24/7 live stream for a retro game marathon called Pixel Purgatory.

The stream launched flawlessly. Thousands of viewers tuned in to watch speedruns of obscure 1990s platformers. But at 3:17 AM, a single warning flickered in her browser’s developer console: Deprecation Warning in Video

VIDEOJS WARN: player.tech--.hls is deprecated. Use player.tech--.vhs instead.

Maya almost ignored it. Deprecated, not broken, she thought. It can wait until morning.

But the stream started glitching. Not normal buffering—weird glitches. Frame repeats. Subtitles showing scrambled text like SEGMENT_3.ts NOT FOUND BUT ALSO FOUND. The chat filled with spam: “Did the stream just lag into another timeline?”

Then a viewer named hls_ghost sent a single message: “You’re still using the old HLS tech. I’ve been waiting for someone to notice.”

Maya’s heart thumped. She opened the network tab. The manifest file was fine. But every few seconds, a request to a non-existent segment path appeared: /legacy/hls/player.tech--.hls/deprecated.js

She had never seen anything like it. It was as if the player was talking to a dead version of itself.

Fingers flying, she changed the player configuration:

// old
techOrder: ['html5', 'hls']

// new techOrder: ['html5', 'vhs']

She added the explicit VHS setup:

html5: 
  vhs: 
    overrideNative: true

The moment she deployed, the console cleared. The glitches stopped. And hls_ghost went silent.

At 3:33 AM, the stream returned to perfect clarity. A final message from the ghost appeared in chat—not as a user, but as a system notice:

[System] player.tech--.vhs initialized. Legacy handler laid to rest.

Maya sipped her cold coffee and whispered, “Goodnight, old tech.” VIDEOJS WARN: player

From that day on, every new project started with VHS—not because the docs demanded it, but because she knew what slept in the deprecated shadows.

If you’ve recently seen the console warning "VIDEOJS: WARN: player.tech--.hls is deprecated. Use player.tech--.vhs instead," you are encountering a transition that began with the release of Video.js 7. This warning is part of a move to unify streaming technologies under a single engine. Why is player.tech.hls Deprecated?

Historically, videojs-contrib-hls was the dedicated plugin for HLS playback in Video.js. However, as MPEG-DASH grew in popularity, the development team realized that HLS and DASH could share much of the same core logic. The result was VHS (Video.js HTTP Streaming), which:

Acts as the Successor: VHS is a fork of the original HLS project that supports both HLS and DASH.

Is Bundled by Default: Starting with version 7, VHS is included in the standard Video.js build, making external HLS plugins unnecessary for most users.

Provides a Unified API: By renaming the internal property from hls to vhs, the developers avoided confusion when using the same engine to play DASH content. How to Fix the Warning

The warning appears when your code (or a plugin you are using) attempts to access HLS-specific properties via the old player.tech().hls path. To resolve it, you must update your references to use vhs. 1. Update Runtime Access

If you are manually accessing the streaming tech object to check playlists or bandwidth, change your syntax: Old (Deprecated): javascript

var hls = player.tech().hls; console.log(hls.playlists.master); Use code with caution. New (Recommended): javascript

var vhs = player.tech().vhs; console.log(vhs.playlists.main); // Note: 'master' is often now 'main' Use code with caution. 2. Update Initialization Options

If you are passing options to the player during setup, update the key from hls to vhs. Old Setup: javascript

videojs('my-player', html5: hls: overrideNative: true ); Use code with caution. New Setup: javascript

videojs('my-player', html5: vhs: overrideNative: true ); Use code with caution. Key Benefits of VHS

Switching to VHS isn't just about silencing a warning; it provides several architectural improvements: This isn’t a critical error—your video will likely

player.tech().hls is deprecated. Use player.tech().vhs instead #2

The warning "videojs warn player.tech--.hls is deprecated. use player.tech--.vhs instead"

indicates that your code or a plugin is accessing the HLS (HTTP Live Streaming) engine using an outdated property name. This change occurred because Video.js HTTP Streaming (VHS) has replaced the older videojs-contrib-hls Report: Deprecation of player.tech().hls 1. Reason for the Change

Video.js 7 and newer versions integrated a new streaming engine called VHS (Video.js HTTP Streaming)

. Unlike its predecessor, VHS supports both HLS and DASH formats. To reflect this unified engine, the property used to access runtime streaming data was renamed from 2. Comparison of Access Methods Old (Deprecated) New (Recommended) player.tech().hls player.tech().vhs player.hls (even older) player.tech().vhs 3. How to Resolve Direct Access

: If you are manually accessing the HLS instance to check stats or manifest data, update your JavaScript calls: javascript // Change this: hls = player.tech().hls; // To this: vhs = player.tech().vhs; Use code with caution. Copied to clipboard Player Options

: If the warning appears during initialization, update your configuration object: javascript // Change this: player = videojs( 'my-player' , { html5: { hls: { overrideNative: // To this: player = videojs( 'my-player' , { html5: { vhs: { overrideNative: Use code with caution. Copied to clipboard Third-Party Plugins : If you aren't calling

yourself, a plugin like a quality selector or resolution switcher may be outdated. Check for updates for those specific libraries on 4. Critical Considerations Native vs. VHS : In some browsers like Safari, player.tech().vhs

if the browser is using its native HLS engine instead of the Video.js VHS engine. Use overrideNative: true

in your options if you require consistent access to the VHS object across all browsers. Late Initialization

: Ensure the player is fully ready before accessing the tech object, as it may not be attached until the source is loaded. Are you seeing this warning from a specific plugin , or are you manually configuring the player options? videojs-http-streaming (VHS) - GitHub

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).

9. Future Deprecation Timeline

While Video.js has not announced an exact version for removal, here is the historical pattern:

  • v7.x – Introduced VHS and added deprecation warning for tech_.hls.
  • v8.x (current as of writing) – Warning remains. Alias still present.
  • v9.x or later – Expected removal of the alias.

Given the slow-moving nature of major video player upgrades, you likely have 12–24 months after the v9 release notice. Nevertheless, fixing the warning today takes less than an hour for most codebases and eliminates a future bug.