added fallback function when getusermedia is not available