diff --git a/js/main.js b/js/main.js index 709dbb8..b3c6ec2 100755 --- a/js/main.js +++ b/js/main.js @@ -142,7 +142,15 @@ function pipeVideo(c) { video: true, }, function(stream) { var video = document.getElementById('user-video'); - video.src = window.URL.createObjectURL(stream); + if(video.srcObject !== undefined){ + video.srcObject = stream + } else { + try { + video.src = compatibility.URL.createObjectURL(stream); + } catch (error) { + video.src = stream; + } + } video.addEventListener('play', function() { setInterval(function() { if (video.paused || video.ended) {