When you receive the Stream object in Events like incomingStreammediaAccessSuccessgetUserMedia() callback success and shareScreen() callback success, you may record the raw bitstreams in Firefox currently (Firefox 25 and above) and Chrome (47 and above) using the MediaRecorder API.


The full API documentation for MediaRecorder is here: https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API.


However, currently it's not supported in Opera / Safari & IE (Temasys Plugin supported).  You may use polyfills for Chrome and Opera using a work-around demo with Muaz Khan's experimental polyfill in here: https://github.com/muaz-khan/WebRTC-Experiment/tree/master/MediaStreamRecorder, but do note that the resulting recording of the data is not in the form of raw bitstreams.