diff --git a/RecordRTC/Gruntfile.js b/RecordRTC/Gruntfile.js
index 92e5c2a3..59ef00e9 100644
--- a/RecordRTC/Gruntfile.js
+++ b/RecordRTC/Gruntfile.js
@@ -53,7 +53,7 @@ module.exports = function(grunt) {
'dev/MultiStreamsMixer.js', // github/muaz-khan/MultiStreamsMixer
'dev/MultiStreamRecorder.js',
'dev/RecordRTC.promises.js',
- // 'dev/WebAssemblyRecorder.js' // grunt-contrib-uglify fails; maybe we should use uglify-es instead?
+ 'dev/WebAssemblyRecorder.js' // grunt-contrib-uglify fails; maybe we should use uglify-es instead?
],
dest: './temp/RecordRTC.js',
},
@@ -116,7 +116,9 @@ module.exports = function(grunt) {
JSON: true,
typeof: true,
define: true,
- EBML: true
+ EBML: true,
+ ReadableStream: true,
+ WritableStream: true
},
browser: true,
browserify: true,
@@ -214,6 +216,15 @@ module.exports = function(grunt) {
pushTo: 'upstream',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
}
+ },
+ watch: {
+ scripts: {
+ files: ['dev/*.js'],
+ tasks: ['concat', 'replace', 'jsbeautifier', 'jshint', 'copy', 'uglify', 'clean'],
+ options: {
+ spawn: false,
+ },
+ }
}
});
@@ -222,4 +233,5 @@ module.exports = function(grunt) {
// set default tasks to run when grunt is called without parameters
// http://gruntjs.com/api/grunt.task
grunt.registerTask('default', ['concat', 'replace', 'jsbeautifier', 'jshint', 'copy', 'uglify', 'clean']);
+ grunt.loadNpmTasks('grunt-contrib-watch');
};
diff --git a/RecordRTC/LICENSE b/RecordRTC/LICENSE
index 80cce78d..fbf96549 100644
--- a/RecordRTC/LICENSE
+++ b/RecordRTC/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2017 [Muaz Khan](https://github.com/muaz-khan)
+Copyright (c) 2013-2020 [Muaz Khan](https://github.com/muaz-khan)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/RecordRTC/README.md b/RecordRTC/README.md
index 108ea271..0d49daaa 100644
--- a/RecordRTC/README.md
+++ b/RecordRTC/README.md
@@ -1,225 +1,72 @@
-# RecordRTC: WebRTC JavaScript Library for Audio+Video+Screen Recording
+# RecordRTC.js | [Live Demo](https://www.webrtc-experiment.com/RecordRTC/)
-# Demo: https://www.webrtc-experiment.com/RecordRTC/
+**WebRTC JavaScript Library for Audio+Video+Screen+Canvas (2D+3D animation) Recording**
-# Chrome Extension: [Chrome-Extensions/screen-recording](https://github.com/muaz-khan/Chrome-Extensions/tree/master/screen-recording)
-
-[RecordRTC Documentation](https://RecordRTC.org/) / [RecordRTC Wiki Pages](https://github.com/muaz-khan/RecordRTC/wiki) / [RecordRTC Demo](https://www.webrtc-experiment.com/RecordRTC/) / [WebRTC Experiments](https://www.webrtc-experiment.com/)
+[Chrome Extension](https://github.com/muaz-khan/Chrome-Extensions/tree/master/screen-recording) or [Dozens of Simple-Demos](https://www.webrtc-experiment.com/RecordRTC/simple-demos/) and [it is Open-Sourced](https://github.com/muaz-khan/RecordRTC) and has [API documentation](https://recordrtc.org/)
[![npm](https://img.shields.io/npm/v/recordrtc.svg)](https://npmjs.org/package/recordrtc) [![downloads](https://img.shields.io/npm/dm/recordrtc.svg)](https://npmjs.org/package/recordrtc) [![Build Status: Linux](https://travis-ci.org/muaz-khan/RecordRTC.png?branch=master)](https://travis-ci.org/muaz-khan/RecordRTC)
-> [RecordRTC](https://www.webrtc-experiment.com/RecordRTC/) is a JavaScript-based media-recording library for modern web-browsers (supporting WebRTC getUserMedia API). It is optimized for different devices and browsers to bring all client-side (pluginfree) recording solutions in single place.
-
-
-
-# Check all releases:
-
-* https://github.com/muaz-khan/RecordRTC/releases
-
-Please check [dev](https://github.com/muaz-khan/RecordRTC/tree/master/dev) directory for development files.
-
-1. [RecordRTC API Reference](https://RecordRTC.org/RecordRTC.html)
-2. [MediaStreamRecorder API Reference](https://RecordRTC.org/MediaStreamRecorder.html)
-3. [StereoAudioRecorder API Reference](https://RecordRTC.org/StereoAudioRecorder.html)
-4. [WhammyRecorder API Reference](https://RecordRTC.org/WhammyRecorder.html)
-5. [Whammy API Reference](https://RecordRTC.org/Whammy.html)
-6. [CanvasRecorder API Reference](https://RecordRTC.org/CanvasRecorder.html)
-7. [MultiStreamRecorder API Reference](https://RecordRTC.org/MultiStreamRecorder.html)
-8. [MRecordRTC API Reference](https://RecordRTC.org/MRecordRTC.html)
-9. [RecordRTCPromisesHandler API Reference](https://RecordRTC.org/RecordRTCPromisesHandler.html)
-10. [GifRecorder API Reference](https://RecordRTC.org/GifRecorder.html)
-11. [Global API Reference](https://RecordRTC.org/global.html)
-12 [RecordRTC and Upload to PHP Server](http://www.muazkhan.com/2017/08/recordrtc-and-upload-to-php-server.html)
-
-## Browsers Support:
-
-| Browser | Support | Features |
-| ------------- |-------------|-------------|
-| Firefox | [Stable](http://www.mozilla.org/en-US/firefox/new/) / [Aurora](http://www.mozilla.org/en-US/firefox/aurora/) / [Nightly](http://nightly.mozilla.org/) | Audio+Video (Both local/remote) |
-| Google Chrome | [Stable](https://www.google.com/intl/en_uk/chrome/browser/) / [Canary](https://www.google.com/intl/en/chrome/browser/canary.html) / [Beta](https://www.google.com/intl/en/chrome/browser/beta.html) / [Dev](https://www.google.com/intl/en/chrome/browser/index.html?extra=devchannel#eula) | Audio+Video (Both local/remote) |
-| Opera | [Stable](http://www.opera.com/) / [NEXT](http://www.opera.com/computer/next) | Audio+Video (Both local/remote) |
-| Android | [Chrome](https://play.google.com/store/apps/details?id=com.chrome.beta&hl=en) / [Firefox](https://play.google.com/store/apps/details?id=org.mozilla.firefox) / [Opera](https://play.google.com/store/apps/details?id=com.opera.browser) | Audio+Video (Both local/remote) |
-| Microsoft Edge | [Normal Build](https://www.microsoft.com/en-us/windows/microsoft-edge) | **Only Audio** - No Video - No Canvas - No Screen |
-| Safari | iOS / MacOSX | Audio+Video (video requires "Safari Preview") |
-
-## Frameworks
-
-1. Angular2 - [check article](https://medium.com/@SumanthShankar/integrate-recordrtc-with-angular-2-typescript-942c9c4ca93f#.7x5yf2nr5) and [demo github repository](https://github.com/ShankarSumanth/Angular2-RecordRTC) - via [#186](https://github.com/muaz-khan/RecordRTC/issues/186)
-2. React.js - [check this article](http://suzannewang.com/recordrtc/) and [demo github repository](https://github.com/szwang/recordrtc-react)
-3. Video.js - [check this github repository](https://github.com/collab-project/videojs-record)
-4. meteor - [check an old github repository](https://github.com/launchbricklabs/recordrtc-meteor-demo)
-
-> Want to add more? Please make a pull-request to update [`README.md`](https://github.com/muaz-khan/RecordRTC/blob/master/README.md)
-
-## Tests?
-
-* https://travis-ci.org/muaz-khan/RecordRTC
-
-Tests source code:
-
-* https://github.com/muaz-khan/RecordRTC/tree/master/test
-
-## Free?
-
-It is MIT Licenced, which means that you can use it in any commercial/non-commercial product, free of cost.
-
-## RecordRTC Containers Format
-
-> RecordRTC supports vp9, vp8, h264, mkv, opus/vorbis, and pcm (mono/stereo).
-
-#### vp9
-
-```javascript
-var options = {
- recorderType: MediaStreamRecorder,
- mimeType: 'video/webm\;codecs=vp9'
-};
-var recordRTC = RecordRTC(stream, options);
-```
-
-
-
-#### vp8
-
-```javascript
-var options = {
- recorderType: MediaStreamRecorder,
- mimeType: 'video/webm\;codecs=vp8'
-};
-var recordRTC = RecordRTC(stream, options);
-```
-
-
-
-#### h264
+**A demo using promises:**
```javascript
-var options = {
- recorderType: MediaStreamRecorder,
- mimeType: 'video/webm\;codecs=h264'
-};
-var recordRTC = RecordRTC(stream, options);
-```
-
-
+let stream = await navigator.mediaDevices.getUserMedia({video: true, audio: true});
+let recorder = new RecordRTCPromisesHandler(stream, {
+ type: 'video'
+});
+recorder.startRecording();
-#### pcm
+const sleep = m => new Promise(r => setTimeout(r, m));
+await sleep(3000);
-```javascript
-var options = {
- recorderType: StereoAudioRecorder,
- mimeType: 'audio/wav'
-};
-var recordRTC = RecordRTC(stream, options);
+await recorder.stopRecording();
+let blob = await recorder.getBlob();
+invokeSaveAsDialog(blob);
```
-
-
-#### opus
+**A demo using normal coding:**
```javascript
-var options = {
- recorderType: MediaStreamRecorder,
- mimeType: 'audio/webm' // Firefox also supports: "audio/ogg"
-};
-var recordRTC = RecordRTC(stream, options);
-```
-
-
-
-|Media File|Bitrate/Framerate|encoders|Framesize|additional info|
-| ------------- |-------------|-------------|-------------|-------------|
-|Audio File (WAV) | 1411 kbps | pcm_s16le |44100 Hz|stereo, s16|
-|Video File (WebM)|60 kb/s | (whammy) vp8 codec yuv420p|--|SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)|
-
-**Safari:**
-
-
-
-## RecordRTC Demos
-
-1. [RecordRTC to Node.js](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-to-Nodejs)
-2. [RecordRTC to PHP](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-to-PHP)
-3. [RecordRTC to ASP.NET MVC](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-to-ASPNETMVC)
-4. [RecordRTC & HTML-2-Canvas i.e. Canvas/HTML Recording!](https://github.com/muaz-khan/RecordRTC/tree/master/Canvas-Recording)
-5. [MRecordRTC i.e. Multi-RecordRTC!](https://github.com/muaz-khan/RecordRTC/tree/master/MRecordRTC)
-6. [RecordRTC on Ruby!](https://github.com/cbetta/record-rtc-experiment)
-7. [RecordRTC over Socket.io](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-over-Socketio)
-8. [ffmpeg-asm.js and RecordRTC! Audio/Video Merging & Transcoding!](https://github.com/muaz-khan/WebRTC-Experiment/tree/master/ffmpeg)
-9. [RecordRTC / PHP / FFmpeg](https://github.com/muaz-khan/RecordRTC/tree/master/PHP-and-FFmpeg)
-10. [Record Audio and upload to Nodejs server](https://www.npmjs.org/package/record-audio)
-11. [ConcatenateBlobs.js](https://github.com/muaz-khan/ConcatenateBlobs) - Concatenate multiple recordings in single Blob!
-12. [Remote audio-stream recording](https://www.webrtc-experiment.com/demos/remote-stream-recording.html) or [a real p2p demo](https://www.webrtc-experiment.com/RTCMultiConnection/RecordRTC-and-RTCMultiConnection.html)
-13. [Mp3 or Wav Recording](https://www.webrtc-experiment.com/RecordRTC/Record-Mp3-or-Wav.html)
-14. [Record entire DIV including video, image, textarea, input, drag/move/resize, everything](https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/)
-15. [Record canvas 2D drawings, lines, shapes, texts, images, drag/resize/enlarge/move via a huge drawing tool!](https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/record-canvas-drawings.html)
-16. [Record Canvas2D Animation](https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/Canvas-Animation-Recording.html)
-17. [WebGL animation recording](https://www.webrtc-experiment.com/RecordRTC/webgl/)
-18. [Plotly - WebGL animation recording](https://www.webrtc-experiment.com/RecordRTC/plotly.html)
-
-You can also try a chrome extension for screen recording:
-
-* https://chrome.google.com/webstore/detail/recordrtc/ndcljioonkecdnaaihodjgiliohngojp
-
-# How to link?
-
-## [NPM](https://www.npmjs.com/package/recordrtc) install
-
-```
-npm install recordrtc
+navigator.mediaDevices.getUserMedia({
+ video: true,
+ audio: true
+}).then(async function(stream) {
+ let recorder = RecordRTC(stream, {
+ type: 'video'
+ });
+ recorder.startRecording();
-# you can use with "require" (browserify/nodejs)
-var RecordRTC = require('recordrtc');
+ const sleep = m => new Promise(r => setTimeout(r, m));
+ await sleep(3000);
-var recorder = RecordRTC({}, {
- type: 'video',
- recorderType: RecordRTC.WhammyRecorder
+ recorder.stopRecording(function() {
+ let blob = recorder.getBlob();
+ invokeSaveAsDialog(blob);
+ });
});
-
-console.log('\n--------\nRecordRTC\n--------\n');
-console.log(recorder);
-
-console.log('\n--------\nstartRecording\n--------\n');
-recorder.startRecording();
-console.log('\n--------\nprocess.exit()\n--------\n');
-
-process.exit()
```
-* https://tonicdev.com/npm/recordrtc
+* [Watch a YouTube video presentation/tutorial](https://www.youtube.com/watch?v=YrLzTgdJ-Kg)
-Here is how to use `require`:
+## Browsers Support
-```javascript
-var RecordRTC = require('recordrtc');
-var Whammy = RecordRTC.Whammy;
-var WhammyRecorder = RecordRTC.WhammyRecorder;
-var StereoAudioRecorder = RecordRTC.StereoAudioRecorder;
-// and so on
-
-var video = new Whammy.Video(100);
-var recorder = new StereoAudioRecorder(stream, options);
-```
+| Browser | Operating System | Features |
+| ------------- |------------- |------------ |
+| Google Chrome | Windows + MacOSX + Ubuntu + Android | audo + video |
+| Firefox | Windows + MacOSX + Ubuntu + Android | audo + video |
+| Opera | Windows + MacOSX + Ubuntu + Android | audo + video |
+| Edge | Windows 10 | only audio |
+| Safari | MacOSX + iOS (iphone/ipad) | audo + video |
-```html
-
-
-```
-
-There are some other NPM packages regarding RecordRTC:
+## Codecs Support
-* [https://www.npmjs.org/search?q=RecordRTC](https://www.npmjs.org/search?q=RecordRTC)
+| Browser | Video | Audio |
+| ------------- |------------- |------------- |
+| Chrome | VP8, VP9, H264, MKV | OPUS/VORBIS, PCM |
+| Firefox | VP8, H264 | OPUS/VORBIS, PCM |
+| Safari | VP8 | OPUS/VORBIS, PCM |
+| Opera | VP8 | OPUS/VORBIS, PCM |
+| Edge | None | PCM |
-## [bower](http://bower.io) install
-
-```
-bower install recordrtc
-```
-
-```html
-
-
-```
## CDN
@@ -227,1005 +74,255 @@ bower install recordrtc
-
-
-```
-
-Otherwise check cdnjs below.
-
-## Releases
-
-You can even link specific [releases](https://github.com/muaz-khan/RecordRTC/releases):
-
-```html
-
-
-```
-
-Note: You can use `RecordRTC.min.js` as well. (on webrtc-experiment or cdnjs)
+
+
-## How to capture stream?
+
+
-```html
-
-
-
+
+
```
-## Record audio+video
-
-You'll be recording both audio/video in single WebM or Mp4 container.
+## Configuration
```javascript
-var recordRTC;
-
-function successCallback(stream) {
- // RecordRTC usage goes here
-
- var options = {
- mimeType: 'video/webm', // or video/webm\;codecs=h264 or video/webm\;codecs=vp9
- audioBitsPerSecond: 128000,
- videoBitsPerSecond: 128000,
- bitsPerSecond: 128000 // if this line is provided, skip above two
- };
- recordRTC = RecordRTC(stream, options);
- recordRTC.startRecording();
-}
-
-function errorCallback(error) {
- // maybe another application is using the device
-}
-
-var mediaConstraints = { video: true, audio: true };
-
-navigator.mediaDevices.getUserMedia(mediaConstraints).then(successCallback).catch(errorCallback);
-
-btnStopRecording.onclick = function () {
- recordRTC.stopRecording(function (audioVideoWebMURL) {
- video.src = audioVideoWebMURL;
-
- var recordedBlob = recordRTC.getBlob();
- recordRTC.getDataURL(function(dataURL) { });
- });
-};
-```
-
-## Record only Audio
-
-```javascript
-var recordRTC = RecordRTC(audioStream, { type: 'audio' });
-recordRTC.startRecording();
-recordRTC.stopRecording(function(audioURL) {
- audio.src = audioURL;
-
- var recordedBlob = recordRTC.getBlob();
- recordRTC.getDataURL(function(dataURL) { });
-});
-```
-
-## `options`
-
-RecordRTC requires a second parameter named as `options` or `configuration` or `hints` or `preferences`:
-
-```javascript
-var options = {
- recorderType: MediaStreamRecorder,
- mimeType: 'video/webm\;codecs=vp9'
-};
-var recordRTC = RecordRTC(stream, options);
-```
-
-You can pass `options` object over `startRecording` method as well:
-
-```javascript
-var recordRTC = RecordRTC(stream);
-
-var options = {
- recorderType: MediaStreamRecorder,
- mimeType: 'video/webm\;codecs=vp9'
-};
-recordRTC.startRecording(options);
-```
-
-* `type` accepts `video` or `audio` or `canvas` or `gif`
-* `mimeType` accepts [all these values](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/mimeType)
-* `recorderType` accepts `MediaStreamRecorder` or `StereoAudioRecorder` or `WhammyRecorder` or `GifRecorder` or any recorder type from [this page](https://github.com/muaz-khan/RecordRTC/tree/master/dev)
-* `timeSlice` accepts numbers in milliseconds; use this to force intervals-based blobs
-* `ondataavailable` pass this function along with `timeSlice` to get intervals based blobs
-* `checkForInactiveTracks` accepts `true` or `false`; use this to disable default inactive-stream-checker functions
-* `onTimeStamp` it is a function that is called-back by the MediaStreamRecorder; `timeSlice` parameter is required for this function
-* `bitsPerSecond` accepts numbers in bits; applies both to audio and video tracks
-* `audioBitsPerSecond` accepts numbers in bits; applies only to audio tracks
-* `videoBitsPerSecond` accepts numbers in bits; applies only to video tracks
-* `disableLogs` accepts `true` or `false`; use this to disable console logs
-* `frameInterval` accepts numbers in milliseconds; use this with MultiStreamRecorder, CanvasRecorder and WhammyRecorder
-* `previewStream` it is a function that is called-back by the MultiStreamRecorder
-* `video` accepts object similar to this: `{width: 320, height: 240}`; pass this parameter for MultiStreamRecorder, CanvasRecorder and WhammyRecorder
-* `canvas` accepts object similar to this: `{width: 320, height: 240}`; pass this parameter for MultiStreamRecorder, CanvasRecorder and WhammyRecorder
-* `sampleRate` used only by the StereoAudioRecorder
-* `bufferSize` used only by the StereoAudioRecorder
-* `numberOfAudioChannels` used only by the StereoAudioRecorder
-
-## Record Multiple Videos
-
-Demos:
-
-1. [Record all your cameras](https://github.com/muaz-khan/RecordRTC/blob/master/simple-demos/multi-cameras-recording.html)
-2. [Record screen as well as your video!](https://github.com/muaz-khan/RecordRTC/blob/master/simple-demos/video-plus-screen-recording.html)
-
-You can record many videos/streams in single WebM/Mp4 file (**WebRTC Conference Recording**):
-
-```javascript
-var arrayOfStreams = [localStream, remoteStream1, remoteStream2, remoteStream3];
-
-var recordRTC = RecordRTC(arrayOfStreams, {
- type: 'video',
- mimeType: 'video/webm', // or video/webm\;codecs=h264 or video/webm\;codecs=vp9
- previewStream: function(stream) {
- // it is optional
- // it allows you preview the recording video
- }
-});
-recordRTC.startRecording();
-recordRTC.stopRecording(function(singleWebM) {
- video.src = singleWebM;
-
- var recordedBlob = recordRTC.getBlob();
- recordRTC.getDataURL(function(dataURL) { });
-});
-```
-
-Points:
-
-1. Instead of passing single `MediaStream`, you are passing array of `MediaStreams`
-2. You will get single webm or mp4 according to your `mimeType`
-
-`MultiStreamRecorder.js` supports two extra methods:
-
-1. `addStreams`
-2. `resetVideoStreams`
-
-```javascript
-var msRecorder = recorder.getInternalRecorder();
-if (msRecorder instanceof MultiStreamRecorder) {
- msRecorder.addStreams([newAudioStream]);
- msRecorder.resetVideoStreams([screenStream]);
-}
-```
-
-Usecases:
-
-1. You can add more audio and/or video streams during live recording (using `addStreams` method)
-2. You can reset/remove/replace old videos using `resetVideoStreams`
-
-`resetVideoStreams` can be used to recorded screenStream in full-screen mode e.g.
-
-```javascript
-if (yourScreen.isScreen === true) {
- yourScreen.fullcanvas = true;
- yourScreen.width = window.screen.width;
- yourScreen.height = window.screen.height;
-
- // now it will record all audios + only_this_screen
- internalRecorder.resetVideoStreams([yourScreen]);
-}
-```
-
-As soon as [screen is stopped](https://www.webrtc-experiment.com/webrtcpedia/#stream-ended-listener):
-
-```javascript
-addStreamStopListener(yourScreen, function() {
- var cameraStreams = getSingleOrMultipleCameraStreams();
-
- // now it will record all audios + all_your_cameras
- internalRecorder.resetVideoStreams(cameraStreams);
-});
-```
-
-## `getInternalRecorder`
-
-You can get access to internal recorders e.g. MultiStreamRecorder, MediaStreamRecorder, StereoAudioRecorder, WhammyRecorder etc.
-
-> Use `getInternalRecorder` only after `startRecording`. It may return `NULL` according to RecordRTC current state.
-
-```javascript
-// if RecordRTC recording in-progress
-if (recorder.state === 'recording') {
- // get MediaStreamRecorder
- var msRecorder = recorder.getInternalRecorder();
-
- // always check for NULL or verify the recorder type
- if (msRecorder instanceof MultiStreamRecorder) {
- // it is NOT NULL
- // also it is MultiStreamRecorder instance
- // now we can use these extra methods
- msRecorder.addStreams([newAudioStream]);
- msRecorder.resetVideoStreams([screenStream]);
- }
-}
-```
-
-Internal recorders can add extra methods. Same as MultiStreamRecorder which is supporting two extra methods:
-
-1. `addStreams`
-2. `resetVideoStreams`
-
-## `onStateChanged`
-
-Use this method to detect status of the recording:
-
-```javascript
-recorder = RecordRTC(stream, {
+let recorder = RecordRTC(stream, {
+ // audio, video, canvas, gif
type: 'video',
- onStateChanged: function(state) {
- alert('Current recorder status: ' + state);
- }
-});
-
-recorder.startRecording();
-```
-## `state`
-
-Use this property to detect status of the recording:
-
-```javascript
-recorder = RecordRTC(stream, {
- type: 'video'
-});
+ // video/webm;codecs=vp9
+ // video/webm;codecs=vp8
+ // video/webm;codecs=h264
+ // video/x-matroska;codecs=avc1
+ // video/mpeg -- NOT supported by any browser, yet
+ // audio/wav
+ // audio/webm
+ // audio/ogg
+ mimeType: 'video/webm',
+
+ // MediaStreamRecorder, StereoAudioRecorder, WebAssemblyRecorder
+ // CanvasRecorder, GifRecorder, WhammyRecorder
+ recorderType: MediaStreamRecorder,
-alert('Current recorder status: ' + recorder.state);
+ // disable logs
+ disableLogs: true,
-recorder.startRecording();
+ // get intervals based blobs
+ // value in milliseconds
+ timeSlice: 1000,
-alert('Current recorder status: ' + recorder.state);
+ // requires timeSlice above
+ // returns blob via callback function
+ ondataavailable: function(blob) {},
-recorder.stopRecording(function() {
- alert('Current recorder status: ' + recorder.state);
-});
-```
+ // auto stop recording if camera stops
+ checkForInactiveTracks: false,
-You can even use `getState` method:
+ // requires timeSlice above
+ onTimeStamp: functiom(timestamp) {},
-```javascript
-alert('Current recorder status: ' + recorder.getState());
-```
+ // both for audio and video tracks
+ bitsPerSecond: 128000,
-## `version`
+ // only for audio track
+ audioBitsPerSecond: 128000,
-Detect current RecordRTC version:
+ // only for video track
+ videoBitsPerSecond: 128000
-```javascript
-recorder = RecordRTC(stream, {
- type: 'video'
-});
+ // used by CanvasRecorder and WhammyRecorder
+ // it is kind of a "frameRate"
+ frameInterval: 90,
-alert('Current recorder version: ' + recorder.version);
-```
+ // if you are recording multiple streams into single file
+ // this helps you see what is being recorded
+ previewStream: function(stream) {},
-You can even use `RecordRTC.version`:
-
-```javascript
-alert('Current recorder version: ' + RecordRTC.version);
-```
+ // used by CanvasRecorder and WhammyRecorder
+ // you can pass {width:640, height: 480} as well
+ video: HTMLVideoElement,
-## Echo Issues
-
-Simply set `volume=0` or `muted=true` over `