javascript - Feature Detection With Modernizr Not Working? -


i'm trying use modernizr detect if browser supports audio codecs, , doesn't seem doing expected.

i ran following

if(modernizr.audio.mp4){       //do  } 

but when tested on safari (which supports mp4), logic inside brackets not hit. perhaps have logic wrong, or i'm not understanding modernizr does?

all want test if browser supports mp4 audio or not. modernizr seemed consensus this.

any insights?

thanks!

you're looking modernizr.audio.m4a.

on browser, modernizr.audio.m4a "maybe" (true), while modernizr.audio.mp4 "undefined" (false).

refer documentation more details.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -