added getUserMedia check