-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added [email protected] Fixed tinny bugs in MediaRecorderWrapper.js
- Loading branch information
Showing
11 changed files
with
179 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Last time updated at Nov 18, 2014, 08:32:23 | ||
|
||
// Latest file can be found here: https://cdn.webrtc-experiment.com/ConcatenateBlobs.js | ||
|
||
// Muaz Khan - www.MuazKhan.com | ||
// MIT License - www.WebRTC-Experiment.com/licence | ||
// Source Code - https://github.com/muaz-khan/ConcatenateBlobs | ||
// Demo - https://www.WebRTC-Experiment.com/ConcatenateBlobs/ | ||
|
||
// ___________________ | ||
// ConcatenateBlobs.js | ||
|
||
// Simply pass array of blobs. | ||
// This javascript library will concatenate all blobs in single "Blob" object. | ||
|
||
(function() { | ||
window.ConcatenateBlobs = function(blobs, type, callback) { | ||
var buffers = []; | ||
|
||
var index = 0; | ||
|
||
function readAsArrayBuffer() { | ||
if (!blobs[index]) { | ||
return concatenateBuffers(); | ||
} | ||
var reader = new FileReader(); | ||
reader.onload = function(event) { | ||
buffers.push(event.target.result); | ||
index++; | ||
readAsArrayBuffer(); | ||
}; | ||
reader.readAsArrayBuffer(blobs[index]); | ||
} | ||
|
||
readAsArrayBuffer(); | ||
|
||
function concatenateBuffers() { | ||
var byteLength = 0; | ||
buffers.forEach(function(buffer) { | ||
byteLength += buffer.byteLength; | ||
}); | ||
|
||
var tmp = new Uint16Array(byteLength); | ||
var lastOffset = 0; | ||
buffers.forEach(function(buffer) { | ||
// BYTES_PER_ELEMENT == 2 for Uint16Array | ||
var reusableByteLength = buffer.byteLength; | ||
if (reusableByteLength % 2 != 0) { | ||
buffer = buffer.slice(0, reusableByteLength - 1) | ||
} | ||
tmp.set(new Uint16Array(buffer), lastOffset); | ||
lastOffset += reusableByteLength; | ||
}); | ||
|
||
var blob = new Blob([tmp.buffer], { | ||
type: type | ||
}); | ||
|
||
callback(blob); | ||
} | ||
}; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "msr", | ||
"preferGlobal": false, | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"author": { | ||
"name": "Muaz Khan", | ||
"email": "[email protected]", | ||
|
@@ -68,7 +68,7 @@ | |
"grunt-contrib-concat": "0.5.1", | ||
"grunt-contrib-csslint": "0.4.0", | ||
"grunt-contrib-uglify": "0.9.1", | ||
"grunt-htmlhint": "0.4.1", | ||
"grunt-htmlhint": "0.9.13", | ||
"grunt-jsbeautifier": "0.2.10", | ||
"grunt-bump": "0.3.1" | ||
} | ||
|