Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead Now
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
Fortunately, migrating from videojs-tech-*.hls to videojs-tech-*.vhs is relatively straightforward. Here's a step-by-step guide:
// This uses the updated, unified engine syntax var currentPlaylist = player.tech().vhs.playlists.media(); Use code with caution. 2. Update Initialization Options indicates that your code or a plugin 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>
var player = videojs('my-video', techOrder: ['html5', 'hls'] ); Here's a step-by-step guide: // This uses the
// Use vhs instead of hls var vhsEngine = player.tech_.vhs; console.log(vhsEngine.playlists.master); Use code with caution. 2. Update Event Listeners
A common issue when updating is finding that player.tech().vhs returns undefined or null . As noted in Stack Overflow discussions, the VHS object is only populated the player has initialized and begun using a streaming technology. This message comes from Video.js
This message comes from Video.js, one of the most popular open-source HTML5 video players. While your video stream might still play fine for now, this warning indicates an underlying architectural shift. Ignoring it could cause your player to break in a future update.