Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead //top\\ – Genuine & Official

: If you are passing specific options to the HLS engine during player initialization, update the key from hls to vhs . Example (Override Native) : javascript

The fix is straightforward but requires a careful search of your codebase.

VHS is stricter about CORS than the old HLS tech. Ensure your HLS server sends: : If you are passing specific options to

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

Are you using or loading Video.js via a CDN link ? Ensure your HLS server sends: That alias is

<script src="https://vjs.zencdn.net/7.21.0/video.min.js"></script> <!-- Include VHS engine (CDN or local) --> <script src="https://cdn.jsdelivr.net/npm/@videojs/http-streaming@3.8.0/dist/videojs-http-streaming.min.js"></script>

);

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

// Deprecated var player = videojs('my-video', html5: hls: withCredentials: true ); // Correct var player = videojs('my-video', html5: vhs: withCredentials: true ); Use code with caution. Copied to clipboard Quick Troubleshooting // Deprecated var player = videojs('my-video'

"dependencies": "video.js": "^7.21.0", // or ^8.0.0 "@videojs/http-streaming": "^3.8.0"

When the project evolved to support both and MPEG-DASH using a unified code architecture, the core team bundled a new framework named videojs-http-streaming (VHS) starting in Video.js 7. Because the technology now abstracts multiple streaming formats, targeting .hls directly is obsolete. The property has been renamed to reflect the unified engine. How to Fix the Deprecation Warning 1. Update Core API Access Scripts

More information