Closed dsteinman closed 2 years ago
Basically I've established a WebRTC connection to a WebRTC server (UV4L) and am trying to extract the audio from the stream.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStream
The MediaStream class provided by node-webrtc does not appear to be implemented as it is documented there, is that right?
node-webrtc
Although a MediaStream object is emitted by RTCPeerConnection.ontrack() it appears to be an empty/fake EventEmitter object.
let pc = new RTCPeerConnection(...) pc.ontrack = function(event) { let mediaStream = event.streams[0]; console.log(mediaStream.toString()); // [object MediaStream] console.log(MediaStream prototype); // undefined for (let key in mediaStream) { console.log(key, mediaStream) } // addEventListener MediaStream {} // dispatchEvent MediaStream {} // removeEventListener MediaStream {} }
Maybe I'm missing something here, is there any way to decode the audio/video from a WebRTC server using this library?
Basically I've established a WebRTC connection to a WebRTC server (UV4L) and am trying to extract the audio from the stream.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStream
The MediaStream class provided by
node-webrtc
does not appear to be implemented as it is documented there, is that right?Although a MediaStream object is emitted by RTCPeerConnection.ontrack() it appears to be an empty/fake EventEmitter object.
Maybe I'm missing something here, is there any way to decode the audio/video from a WebRTC server using this library?