diff --git a/sample_bbf_face.html b/sample_bbf_face.html index d0185e3..32d4af3 100755 --- a/sample_bbf_face.html +++ b/sample_bbf_face.html @@ -70,10 +70,14 @@ video.addEventListener('loadeddata', readyListener); compatibility.getUserMedia({video: true}, function(stream) { - try { - video.src = compatibility.URL.createObjectURL(stream); - } catch (error) { - video.src = stream; + if(video.srcObject !== undefined){ + video.srcObject = stream + } else { + try { + video.src = compatibility.URL.createObjectURL(stream); + } catch (error) { + video.src = stream; + } } setTimeout(function() { video.play();