Videojs Warn Player.tech--.hls Is Deprecated. Use Player.tech--.vhs Instead Online

Here’s a short, interesting story built around that technical warning.

// 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 Here’s a short, interesting story built around that

Change those lines to use player.tech_.vhs . New pattern (use VHS): var player = videojs('my-player',

8. Testing That the Warning Is Gone

It is built directly into Video.js (v7+) so you no longer need to include external HLS plugins manually. Consistency: html5: vhs: overrideNative: true

);
  • New pattern (use VHS):
    var player = videojs('my-player', 
      techOrder: ['html5'],
      html5: 
        vhs: 
          overrideNative: true,
          // mapped options for VHS
    

    "VIDEOJS: WARN: player.tech().hls is deprecated. Use player.tech().vhs instead,"

    If you are seeing the warning it is because your code is still using the older videojs-contrib-hls naming convention.

    // old techOrder: ['html5', 'hls']

    Step 3 — Update player initialization