Files
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

55 lines
1.6 KiB
Markdown

## [ConcatenateBlobs.js](https://github.com/muaz-khan/ConcatenateBlobs) [![npm](https://img.shields.io/npm/v/concatenateblobs.svg)](https://npmjs.org/package/concatenateblobs) [![downloads](https://img.shields.io/npm/dm/concatenateblobs.svg)](https://npmjs.org/package/concatenateblobs)
Demo: https://www.WebRTC-Experiment.com/ConcatenateBlobs/
> Simply pass array of blobs.
> This javascript library will concatenate all blobs in single "Blob" object.
It is <a href="https://www.webrtc-experiment.com/licence/">MIT Licenced</a>, which means that you can use it in any commercial/non-commercial product, free of cost.
```
npm install concatenateblobs
# to use in nodejs
var ConcatenateBlobs = require('concatenateblobs');
ConcatenateBlobs(array_of_blobs, blob_type, function(resultingBlob) {
console.log(resultingBlob);
});
```
To use it:
```htm
<script src="./node_modules/concatenateblobs/ConcatenateBlobs.js"></script>
```
## 1. Link The Library
```
https://cdn.webrtc-experiment.com/ConcatenateBlobs.js
// or
https://www.webrtc-experiment.com/ConcatenateBlobs.js
```
## 2. Use it
```javascript
// 2nd argument is type of "resulting-blob"
ConcatenateBlobs([arrayOfBlobs], 'audio/wav', function(resultingBlob) {
POST_to_Server(resultingBlob);
// or preview locally
localVideo.src = URL.createObjectURL(resultingBlob);
});
```
## Credits
* [Muaz Khan](http://www.MuazKhan.com/)
## License
[ConcatenateBlobs.js](https://github.com/muaz-khan/ConcatenateBlobs) is released under [MIT licence](https://www.webrtc-experiment.com/licence/) . Copyright (c) [Muaz Khan](http://www.MuazKhan.com/).