Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modernizr getusermedia undefined

I am confused why

Modernizr.getusermedia

is undefined, but when I type in

!!navigator.webkitGetUserMedia

it returns true. I am using Chrome and I know webrtc is supported... so why does Modernizr say its undefined.

The Modernizr that I downloaded with bower has the getusermedia.js file in it with the line:

Modernizr.addTest('getusermedia', !!Modernizr.prefixed('getUserMedia', navigator));

like image 974
Jupiter Avatar asked Jan 29 '14 15:01

Jupiter


1 Answers

getUserMedia isn't a core test in Modernizr so it is not included by default. When you setup your own download on the Modernizr website you can select it to include it but Bower loads the default. Bower just clones the Git repo to you local machine so when you want none core tests you'll have to do some extra work.

To add that test also include the file feature-detects/webrtc/getusermedia.js in your page or add the contents of that script to another script on the page.

like image 127
PM5544 Avatar answered Nov 03 '22 19:11

PM5544