Skip to main content

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

To resolve this warning and future-proof your code, simply replace the deprecated property in your JavaScript:

player.ready(() => // Ensure the underlying tech is ready if (player.tech_ && player.tech_.vhs) setupVHSEvents(player.tech_.vhs); else player.on('techready', () => setupVHSEvents(player.tech_.vhs); );

She had never seen anything like it. It was as if the player was talking to a dead version of itself. To resolve this warning and future-proof your code,

. Always check if the object exists before accessing its properties: javascript tech = player.tech(); (tech.vhs) { // Apply VHS-specific logic here Use code with caution. Copied to clipboard If you'd like, I can help you: a specific plugin that is causing this warning. xhr.beforeRequest hooks to the new VHS format.

If you are passing options to the player during initialization, update the key from hls to vhs within the html5 object. javascript Always check if the object exists before accessing

That alias is what triggers the warning. The code inside VHS does something like:

<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet" /> <script src="https://unpkg.com/video.js/dist/video.min.js"></script> <script src="https://unpkg.com/videojs-http-streaming/dist/videojs-http-streaming.min.js"></script> If you are passing options to the player

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