Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead
The warning is a – your code will still work for now, but you are strongly encouraged to update your code.
var player = videojs('my-video', html5: vhs: overrideNative: true ); Use code with caution. Copied to clipboard Why this changed The warning is a – your code will
The deprecation warning about player.tech--.hls being deprecated in favor of player.tech--.vhs in Video.js is an opportunity to upgrade your video player to a more modern, efficient, and feature-rich streaming solution. By understanding the reasons behind this change and following the steps outlined to migrate to VHS, you can ensure your video player remains compatible, performant, and ready for future developments in video streaming technology. By understanding the reasons behind this change and
player.ready(function() { player.tech_.vhs.xhr.beforeRequest = function(options) { options.headers = options.headers || {}; options.headers['Authorization'] = 'Bearer myToken'; return options; }; }); You have three options:
In this long-form article, we will cover:
Because VHS is now the standard under-the-hood engine for Video.js (versions 7 and 8), the old .hls property has been deprecated in favor of .vhs . How to Fix the Warning
Some third-party Video.js plugins still call .hls internally. You have three options: