Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead -
// Old (Deprecated) var player = videojs('my-video', hls: overrideNative: true ); // New (Recommended) var player = videojs('my-video', vhs: overrideNative: true ); Use code with caution. Copied to clipboard
var player = videojs('my-video'); player.ready(function() // This triggers the warning var hls = player.tech().hls; console.log(hls.playlists.master); ); Use code with caution. javascript // Old (Deprecated) var player = videojs('my-video', hls:
: Replace instances where you directly access the HLS tech. Old : var hls = player.tech().hls; New : var vhs = player.tech().vhs; Old : var hls = player
Video.js is a popular open‑source HTML5 video player framework. For HLS streaming, it relies on a — the underlying playback engine. Historically, Video.js used a tech named hls (provided by the videojs-contrib-hls package). player
player.tech().vhs.playlists.on('change', function() console.log('The resolution has changed!'); ); Use code with caution. Copied to clipboard 3. Checking for VHS Support
If you’ve recently seen the console warning you are encountering a transition that began with the release of Video.js 7 . This warning is part of a move to unify streaming technologies under a single engine. Why is player.tech.hls Deprecated?