1
votes

I'm facing really strange problem with my sample WebRTC application. This application just obtains local camera stream using getUserMedia, creates connection using RTCPeerConnection and sends it to remote browser. When trying in Mozilla Nightly, it works fine, but in Google Chrome (25 and 26beta), the onaddstream event is fired, but the remote video remains empty. For attaching remote video stream to video element, I'm using createObjectURL and when I inspect the video element, it seems that the stream blob in src attribute is set (mediastream: in Nightly and blob:http:// in Chrome). Does anybody have some idea where the problem could be? Thanks for any help.

1

1 Answers

0
votes

try:

window.URL = window.webkitURL || window.mozURL || window.URL;
if (moz) video.mozSrcObject = stream;
else {
    video.src = window.URL.createObjectURL(stream) || stream;
}
video.play();

And check onended attribute of stream. It should be false