4

ここに画像の説明を入力

localStreamsremoteStreamsはどちらも「<strong>MediaStreamList」タイプです。 localStreamsには「<strong>LocalMediaStream」オブジェクトが含まれています

ただし、remoteStreamsには「<strong>MediaStream」オブジェクトが含まれています

なぜそんなに違うのですか?

「<strong>localStreams」を使用すると、うまくいきます。

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

しかし、「<strong>remoteStreams」を使用しようとすると、機能しません。

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

「<strong>remoteStreams」と「<strong>localStreams」のブロブは、スタイルが同じに見えます。

「<strong>remoteStreams」が機能しないのはなぜですか (「<strong>onaddstream」イベントまたは直接) ???

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

ライブデモ:--- https://muazkh.appspot.com/?page=WebRTC

4

1 に答える 1

0

LocalMediaStream は MediaStream インターフェイスに置き換えられています。

simpl.info/pcで、Chrome Stable と Canary のコンソールからこれを試してください

localPeerConnection.getLocalStreams()[0];
remotePeerConnection.getRemoteStreams()[0];
于 2013-05-24T14:56:42.563 に答える