-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to stream audio/video over data channels? #156
Comments
@modeswitch Yes, see the MediaSource API and this example. Splitting a pre-recording file into chunks and sending them down over the data channel should be doable. Reconstructing them in a <video> element in the browser would look roughly like var mediaSource = new MediaSource();
var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
// Then, for each chunk of your file...
sourceBuffer.appendBuffer(new Uint8Array(data)); |
Very cool. This looks like an acceptable workaround for media streams using the current native codebase. |
Do you also have a workaround for receiving and sending MediaStreams generated with getUserMedia? |
I know but this library doesn't support them so I can't handle them server-side. |
+1 for the media streams support. Maybe that could be a compilation time switch? |
+1 what library has mediastreams? |
Not actually handling media stuff in the node module makes alot of sense, but wouldn't it be sufficient to just have it expose it as callbacks so that can be used to implement the actual media stream? |
I am not really getting relation between this package and simple-peer, but it seems simple-peer support media streams? |
@mitar I dont think so, simple-peer just take advantage of this project. And media stream API is only available on the browser |
You can provide MediaStream to media-recorder-stream, pipe the recording into the datachannel, then reassemble a MediaSource with media-source-stream. Note that you will need to receive the entire recorder stream from start or the MediaSource won't be able to reassemble the video. (You can't start midway like a normal MediaConnection). But that shouldn't be a problem if you're careful with when you start recording. |
for audio/video streaming you could use
|
https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC
https://github.com/streamproc/MediaStreamRecorder
Seems like it might be possible.
The text was updated successfully, but these errors were encountered: