Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead [top] May 2026

This warning occurs because videojs-http-streaming (VHS) replaced the older videojs-contrib-hls plugin as the default engine for HLS and DASH playback starting in Video.js 7 . To resolve it, you must update your code to reference vhs instead of hls. 1. Update Player Options

If you are passing options like overrideNative during player initialization, change the hls key to vhs: javascript

// Old/Deprecated var player = videojs('my-video', html5: hls: overrideNative: true ); // New/Correct var player = videojs('my-video', html5: vhs: overrideNative: true ); Use code with caution. Copied to clipboard 2. Update Runtime Access

If you are accessing runtime properties (like XHR hooks or representations) via the player's tech object, switch the property name: Deprecated: player.tech().hls Replacement: player.tech().vhs Why this changed

VHS (Video.js HTTP Streaming) was created to be a single, format-agnostic engine capable of playing both HLS and DASH. Since the engine is no longer exclusive to HLS, the Video.js team renamed the internal properties and options to reflect this broader support.

Using hls options is deprecated · Issue #7007 · videojs/video.js

Deprecation Warning: Using player.tech_.hls is Deprecated, Please Use player.tech_.vhs Instead

Introduction

Video.js is a popular JavaScript library used for video and audio playback on the web. Recently, a deprecation warning has been raised regarding the use of player.tech_.hls in Video.js. This report aims to provide an overview of the issue, its implications, and recommendations for mitigation.

Background

HLS (HTTP Live Streaming) is a widely used protocol for live and on-demand video streaming. In Video.js, HLS playback is facilitated through the hls tech. However, with the introduction of VHS (Video.js HLS Shim), a more efficient and feature-rich solution for HLS playback, the hls tech has been marked as deprecated.

The Deprecation Warning

When using Video.js with the hls tech, a warning is logged to the console:

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

This warning indicates that the player.tech_.hls property is no longer recommended and will be removed in future versions of Video.js.

Implications

Using the deprecated player.tech_.hls property may lead to:

  1. Future Breakage: As Video.js continues to evolve, the hls tech may be removed, causing playback issues or breaking existing integrations.
  2. Limited Support: Deprecation means that bug fixes, new features, and support for the hls tech will be limited or discontinued.

Recommendations

To ensure continued support and compatibility with future versions of Video.js:

  1. Migrate to VHS: Update your code to use player.tech_.vhs instead of player.tech_.hls. This involves:
    • Including the VHS plugin in your project.
    • Initializing the player with the vhs tech.
    • Updating your code to use player.tech_.vhs instead of player.tech_.hls.
  2. Update Your Code: Review your codebase for any references to player.tech_.hls and replace them with player.tech_.vhs.

Example Code

Here's an example of how to initialize a Video.js player using the VHS tech: This warning indicates that the player

const player = videojs('my-player', 
  techOrder: ['vhs'],
  sources: [
    src: 'https://example.com/hls-stream.m3u8',
    type: 'application/x-mpegURL',
  ],
);

Conclusion

The deprecation of player.tech_.hls in Video.js is a necessary step towards maintaining a stable and feature-rich playback solution. By migrating to player.tech_.vhs, you can ensure continued support, compatibility, and access to the latest features and bug fixes. We recommend updating your code to use the VHS tech to avoid potential issues and ensure a seamless playback experience.

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

The warning videojs warn player.tech().hls is deprecated. use player.tech().vhs instead occurs because Video.js transitioned its underlying streaming engine from a dedicated HLS library to the more versatile Video.js HTTP Streaming (VHS) engine. Why the Change?

Protocol Neutrality: While the original engine (videojs-contrib-hls) was built specifically for HLS, developers realized the same core logic could handle multiple formats.

VHS Successor: VHS is the official successor that supports both HLS and DASH content within a single, unified codebase.

Better Integration: VHS has been bundled into Video.js by default since version 7.0, providing a more consistent experience across browsers by overriding native HLS playback where necessary. How to Fix the Warning

To resolve the deprecation warning, update your code to reference the vhs property instead of hls.

Accessing Runtime Properties:If you previously accessed properties like playlists or representations through player.tech().hls, switch to vhs: javascript

// Old (Deprecated) var hls = player.tech().hls; // New (Recommended) var vhs = player.tech().vhs; Use code with caution. Copied to clipboard Future Breakage : As Video

Updating Initialization Options:When setting up your player, update your options object to use the vhs key: javascript

// Old (Deprecated) var player = videojs('my-video', hls: overrideNative: true ); // New (Recommended) var player = videojs('my-video', vhs: overrideNative: true ); Use code with caution. Copied to clipboard

Handling "Undefined" Errors:The vhs object is only attached to the tech when an HLS or DASH stream is actively in use. Ensure your media has loaded or use the player's ready callback before attempting to access it. videojs-http-streaming (VHS) - GitHub

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:

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: Playback success rate

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

Maya sipped her cold coffee and whispered, “Goodnight, old tech.”

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.

This warning occurs because videojs-http-streaming (VHS) has replaced the older videojs-contrib-hls

library as the standard engine for HLS and DASH playback in Video.js 7 and above

While your existing code may still work, it uses a deprecated reference that will eventually be removed. Quick Fix: Update Your Code

To resolve the warning, replace any instance where you access the "tech" via Old Code (Deprecated): javascript hls = player.tech().hls; playlists = player.tech().hls.playlists.media(); Use code with caution. Copied to clipboard New Code (Recommended): javascript vhs = player.tech().vhs; playlists = player.tech().vhs.playlists.media(); Use code with caution. Copied to clipboard Initialization Options

If you are passing specific HLS configurations during player setup, you should also update the key from Example Configuration: javascript player = videojs( 'my-video' , { html5: { vhs: { // Changed from 'hls' overrideNative: , withCredentials: Use code with caution. Copied to clipboard Key Differences Between HLS and VHS Unified Support: VHS is a single engine that handles both streaming. Native Integration:

VHS is built directly into Video.js, meaning you no longer need to include videojs-contrib-hls as a separate plugin. Consistent Experience: vhs: overrideNative: true

, you can ensure a consistent playback experience across different browsers (like Chrome vs. Safari) rather than relying on inconsistent native browser behaviors.

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

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


Scenario 2: You are using a plugin or 3rd party tool

If you did not write this code yourself, the warning is likely coming from a plugin (such as a quality selector, an analytics tracker, or a chromecast plugin).

  1. Check if there is an update available for the plugin. Most plugin authors have released updates to support Video.js 8 and VHS.
  2. If no update is available, you may need to remain on Video.js 7 temporarily or fork the plugin to update the reference yourself.

API Changes: While the property name has changed, the available methods on the VHS object are largely similar, but you should consult the Video.js VHS documentation for specific method changes.

Summary: Replace .hls with .vhs in your codebase to ensure compatibility with future versions of Video.js.

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

Option 1: Technical/Release Note (Best for documentation)

Title: Deprecation Notice: player.tech_.hls Property

Body: Please be advised that the property player.tech_.hls is now deprecated and will be removed in a future version of Video.js. Developers accessing the HLS handler directly should update their code to use the new property: player.tech_.vhs.

This change reflects the internal transition to the newer Video.js HTTP Streaming (VHS) architecture. While the old property currently remains functional for backward compatibility, relying on it may cause breakage upon upgrading to future major releases.

Action Required: Update any custom scripts or plugins referencing the HLS engine.


Title

Migration from videojs-player.tech--.hls to player.tech--.vhs: Motivation, Implementation, and Performance Implications

6. Testing and Validation

videojs warn player.tech--.hls is deprecated. use player.tech--.vhs instead
This site uses cookies to store information on your computer. See our cookie policy for how to disable cookies  privacy policy