Cannot find name ‘BarcodeDetector’

I’m trying to create a new BarcodeDetector class as the example shows on MDN but I’m getting the above error.

let barcodeDetector = new BarcodeDetector({ formats: ['qr_code'] });

here is a link to a Stackblitz showing the error using angular 12.

any idea why?