Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
JodusNodus committed Oct 6, 2018
1 parent 2b7d9e7 commit 8cde8c3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 16 deletions.
22 changes: 22 additions & 0 deletions lib/createBlob.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"use strict";

/**
* From https://gist.github.com/nolanlawson/10340255
*/
module.exports = function createBlob(parts, properties) {
parts = parts || [];
properties = properties || {};
try {
return new Blob(parts, properties);
} catch (e) {
if (e.name !== "TypeError") {
throw e;
}
var BlobBuilder = window.BlobBuilder || window.MSBlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder;
var builder = new BlobBuilder();
for (var i = 0; i < parts.length; i += 1) {
builder.append(parts[i]);
}
return builder.getBlob(properties.type);
}
};
39 changes: 23 additions & 16 deletions lib/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions stories/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Wrapper extends Component {
maxImageSize={1000}
delay={this.state.delay}
className="reader-container"
constraints={{ deviceId: 2 }}
/>
{
legacyMode && (
Expand Down

0 comments on commit 8cde8c3

Please sign in to comment.