Skip to content

Commit

Permalink
require webmwriter
Browse files Browse the repository at this point in the history
fixes to webmwriter exports

Update webm-writer-0.2.0.js

Update webm-writer-0.2.0.js

Update webm-writer-0.2.0.js

Update webm-writer-0.2.0.js

fixing gif.worker import

fixing workers import

typo fix
  • Loading branch information
amandaghassaei committed Sep 23, 2021
1 parent 98b8046 commit 7ada419
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/CCapture.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
var Tar = require('./tar.js');
var download = require('./download.js');
var GIF = require('./gif.js');
var WebMWriter = require('./webm-writer-0.2.0');
}

"use strict";
Expand Down Expand Up @@ -517,7 +518,7 @@ function CCGIFEncoder( settings ) {
this.encoder = new GIF({
workers: settings.workers,
quality: settings.quality,
workerScript: settings.workersPath + 'gif.worker.js'
workerScript: settings.workersPath,
} );

this.encoder.on( 'progress', function( progress ) {
Expand Down
33 changes: 17 additions & 16 deletions src/webm-writer-0.2.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"use strict";

(function(){
// (function(){
/*
* Create an ArrayBuffer of the given length and present it as a writable stream with methods
* for writing data in different formats.
Expand Down Expand Up @@ -201,12 +201,12 @@
}
};

if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = ArrayBufferDataStream;
} else {
window.ArrayBufferDataStream = ArrayBufferDataStream;
}
}());"use strict";
// if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
// module.exports = ArrayBufferDataStream;
// } else {
// window.ArrayBufferDataStream = ArrayBufferDataStream;
// }
// }());"use strict";

/**
* Allows a series of Blob-convertible objects (ArrayBuffer, Blob, String, etc) to be added to a buffer. Seeking and
Expand All @@ -219,7 +219,7 @@
*
* Released under the WTFPLv2 https://en.wikipedia.org/wiki/WTFPL
*/
(function() {
// (function() {
var BlobBuffer = function(fs) {
return function(destination) {
var
Expand Down Expand Up @@ -425,14 +425,15 @@
return writePromise;
};
};
};

if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = BlobBuffer(require('fs'));
} else {
window.BlobBuffer = BlobBuffer(null);
}
})();/**
}(null);

// if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
// module.exports = BlobBuffer(require('fs'));
// } else {
// window.BlobBuffer = BlobBuffer(null);
// }
// })();
/**
* WebM video encoder for Google Chrome. This implementation is suitable for creating very large video files, because
* it can stream Blobs directly to a FileWriter without buffering the entire video in memory.
*
Expand Down

0 comments on commit 7ada419

Please sign in to comment.