Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead ((hot)) 🎁 Popular
Our video player system has issued a deprecation warning regarding the hls component. This indicates that a specific piece of code used to manage video streaming is outdated and will eventually stop working.
Many HLS events (like loadedplaylist , mediachange , error ) are still emitted by VHS, but they may now be namespaced differently. Refer to the VHS documentation for the exact event list.
or higher is highly recommended, as VHS was integrated directly into the core). Step 2: Remove Direct HLS Plugin References
Common plugins that triggered this warning in older versions include: videojs-contrib-quality-levels videojs-hls-quality-selector Our video player system has issued a deprecation
Change those lines to use player.tech_.vhs .
if (player.tech() && player.tech().vhs) // Your logic here Use code with caution. Copied to clipboard 💡 Summary
It's crucial to understand that (the protocol) and VHS (Video.js's implementation) are not the same thing. HLS is a streaming protocol developed by Apple. VHS is Video.js's internal engine that handles HLS and MPEG-DASH playback. Refer to the VHS documentation for the exact event list
in your options if you require consistent access to the VHS object across all browsers. Late Initialization
VHS replaced the old plugin entirely and comes bundled natively with Video.js (versions 7 and newer). Because the engine is completely new, the old hls object became a legacy wrapper. The underlying technology is now entirely driven by vhs .
The fix is straightforward but requires a careful search of your codebase. if (player
If you are maintaining a web application that relies on Video.js for video playback, you may have recently noticed a persistent warning in your browser’s developer console:
Force errors (e.g., block segments via network tab) and check that VHS retries and recovers gracefully.
Leave a Reply