Comparing version 4.0.3 to 4.0.4
{ | ||
"name": "recordrtc", | ||
"preferGlobal": true, | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"author": { | ||
@@ -35,4 +35,4 @@ "name": "Muaz Khan", | ||
"homepage": "https://www.webrtc-experiment.com/RecordRTC/", | ||
"_id": "recordrtc@4.0.3", | ||
"_id": "recordrtc@4.0.4", | ||
"_from": "recordrtc@" | ||
} |
@@ -1,60 +0,1 @@ | ||
It is experimental repository for RecordRTC.js which means that every single update will be pushed to this repository until RecordRTC current version gets stable. | ||
## Recent Changes? | ||
<ol> | ||
<li> | ||
"save" method now accepts file-name optional parameter: | ||
<pre> | ||
recordRTC.save('file-name'); | ||
// or | ||
mRecordRTC.save({ | ||
audio: 'audio-name', | ||
video: 'video-name', | ||
gif: 'gif-name' | ||
}); | ||
</pre> | ||
</li> | ||
<li> | ||
MRecordRTC is fixed to record audio+video in single stream in Firefox. | ||
<pre> | ||
// MRecordRTC auto sets "mRecordRTC.mediaType.audio=false" | ||
// if MediaStream has both audio and video tracks | ||
// it supports audio+video recording in single file for Firefox | ||
mRecordRTC.mediaType = { | ||
audio: true, | ||
video: true | ||
}; | ||
</pre> | ||
</li> | ||
<li> | ||
"<code>save</code>" method has been added in <a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC/MRecordRTC">MRecordRTC</a>: | ||
<pre> | ||
mRecordRTC.save(); | ||
// or save only audio stream | ||
mRecordRTC.save({ | ||
audio: true | ||
}); | ||
// or save audio and video streams | ||
mRecordRTC.save({ | ||
audio: true, | ||
video: true | ||
}); | ||
</pre> | ||
</li> | ||
<li> | ||
If you're recording GIF, you must link: | ||
<pre> | ||
https://cdn.webrtc-experiment.com/gif-recorder.js | ||
</pre> | ||
</li> | ||
</ol> | ||
= | ||
## [RecordRTC](https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC): [WebRTC](https://www.webrtc-experiment.com/) audio/video recording / [Demo](https://www.webrtc-experiment.com/RecordRTC/) [![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) | ||
@@ -61,0 +2,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Last time updated at August 22, 2014, 08:32:23 | ||
// Last time updated at Sep 07, 2014, 08:32:23 | ||
@@ -6,4 +6,2 @@ // updates? | ||
-. if you're recording GIF, you must link: https://cdn.webrtc-experiment.com/gif-recorder.js | ||
-. "save" method added in MRecordRTC. | ||
-. "save" method accepts file-name. | ||
*/ | ||
@@ -19,3 +17,3 @@ | ||
// Browsers Support:: | ||
// Chrome (all versions) [ audio/video individually ] | ||
// Chrome (all versions) [ audio/video separately ] | ||
// Firefox ( >= 29 ) [ audio/video in single webm/mp4 container or only audio in ogg ] | ||
@@ -668,2 +666,5 @@ // Opera (all versions) [ same as chrome ] | ||
audioInput.disconnect(); | ||
volume.disconnect(); | ||
requestAnimationFrame(function() { | ||
@@ -686,5 +687,5 @@ | ||
// file length | ||
// RIFF chunk length | ||
// view.setUint32(4, 44 + interleaved.length * 2, true); | ||
view.setUint32(4, 8 + interleaved.length * 2, true); | ||
view.setUint32(4, 36 + interleaved.length * 2, true); | ||
@@ -727,17 +728,6 @@ // RIFF type | ||
// write the PCM samples | ||
var lng = interleaved.length; | ||
var index = 44; | ||
volume = 1; | ||
for (var i = 0; i < lng; i++) { | ||
// dataView.setInt16(byteOffset, value, littleEndian); | ||
// The literals 0x7FFF and 32767 are identical to the compiler in every way. | ||
// The maximum that it can hold (signed, positive) is 0x7FFFFFFF. | ||
// 32767 is the positive signed max for 16 bits | ||
// each base 16 digit occupies exactly 4 bits | ||
view.setInt16(index, interleaved[i] * (32767 * volume), true); | ||
index += 2; | ||
var offset = 44; | ||
for (var i = 0; i < interleaved.length; i++, offset+=2){ | ||
var s = Math.max(-1, Math.min(1, interleaved[i])); | ||
view.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true); | ||
} | ||
@@ -805,7 +795,4 @@ | ||
// creates a gain node | ||
if (!Storage.VolumeGainNode) | ||
Storage.VolumeGainNode = context.createGain(); | ||
var volume = context.createGain(); | ||
var volume = Storage.VolumeGainNode; | ||
// creates an audio node from the microphone incoming stream | ||
@@ -865,3 +852,3 @@ var audioInput = context.createMediaStreamSource(mediaStream); | ||
__stereoAudioRecorderJavacriptNode.onaudioprocess = function (e) { | ||
// if MediaStream().stop() or MediaStreamTrack().stop() is invoked. | ||
// if MediaStream().stop() or MediaStreamTrack.stop() is invoked. | ||
if (mediaStream.ended) { | ||
@@ -868,0 +855,0 @@ __stereoAudioRecorderJavacriptNode.onaudioprocess = function () {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68032
1284
494