Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead //free\\ Guide

The exact fix depends on how you are initializing your Video.js player. Below are the most common scenarios and how to migrate away from player.tech--.hls .

// Deprecated getter Object.defineProperty(player.tech_, 'hls', get() log.warn('player.tech_.hls is deprecated. use player.tech_.vhs instead'); return this.vhs;

var player = videojs('my-video', html5: vhs: overrideNative: !/iPhone

npm install video.js@latest @videojs/http-streaming@latest The exact fix depends on how you are initializing your Video

player.tech_.vhs.on('playlistchange', function() console.log('Playlist changed'); );

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:

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

ngAfterViewInit() this.player = videojs(this.videoElement.nativeElement); this.player.ready(() => const hls = this.player.tech_['hls']; // warning );

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

Common patterns that trigger the warning: ngAfterViewInit() this

Knowing this, I can provide a more tailored fix for your setup.

import videojs from 'video.js'; import 'videojs-contrib-hls'; // ❌ old plugin

A common use case is manually switching between HLS renditions (qualities). Here's how to migrate: