Why does localStreams contain LocalMediaStream and remoteStreams contains MediaStream?

enter image description here

localStreams and remote_pages are both of type " MediaStreamList ". localStreams contains LocalMediaStream objects

However, deleted_pages contains MediaStream objects

Why is there such a difference?

When I use " localStreams ", it works for me:

localVideo.src = URL.createObjectURL(localStreams[0]); 

But if I try to use " remoteStreams " - it does not work:

 remoteVideo.src = URL.createObjectURL(remoteStreams[0]) 

Blobs for remote_pages "and" localStreams "look the same in style.

Why " remoteStreams " doesn't work for me (in the " onaddstream " event).

 remoteVideo.src = URL.createObjectURL(secondPeer.remoteStreams[0]) "blob:http%3A//localhost%3A8082/78e8821f-90b8-4703-b56d-918ec505e5bf" 

Live Demo : --- https://muazkh.appspot.com/?page=WebRTC

+4
source share
1 answer

LocalMediaStream is being replaced by the MediaStream interface.

In simpl.info/pc, try this from the console in Chrome Stable and Canary:

 localPeerConnection.getLocalStreams()[0]; remotePeerConnection.getRemoteStreams()[0]; 
0
source

All Articles