getUserMedia is resolving before the document knows it is capturing