summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js30
1 files changed, 7 insertions, 23 deletions
diff --git a/public/bundle.js b/public/bundle.js
index 577af1c..be12c49 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -2444,6 +2444,7 @@ var FileUpload = function (_Component) {
),
(0, _preact.h)('input', {
type: 'file',
+ accept: this.props.accept || '*/*',
multiple: this.props.multiple,
onChange: this.handleChange
}),
@@ -7756,7 +7757,7 @@ var SpectrogramUpload = function (_Component) {
datasetName: "",
frames: [],
frame_start: 0,
- max: 3000,
+ max: 1000,
frame_step: wav2pixActions.FRAME_STEP
};
var audioElement = document.createElement('audio');
@@ -7765,7 +7766,7 @@ var SpectrogramUpload = function (_Component) {
var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / _this.state.frame_step);
_this.setState({
duration: duration,
- max: Math.min(_this.state.max, total_frame_count)
+ max: Math.min(_this.state.max, total_frame_count, 1000)
});
});
_this.audioElement = audioElement;
@@ -7784,12 +7785,9 @@ var SpectrogramUpload = function (_Component) {
datasetName: name,
pcm: ''
}, function () {
- if (file.size < 2 << 20) {
- _this2.rebuildFrames();
- }
+ _this2.rebuildFrames();
});
this.audioElement.src = URL.createObjectURL(file);
- console.log(file.size);
}
}, {
key: 'rebuildFrames',
@@ -7858,16 +7856,11 @@ var SpectrogramUpload = function (_Component) {
'p',
null,
"Convert your sounds into spectrograms. ",
- "Sound files can be WAV, MP3, AIFF, or FLAC. ",
- (0, _preact.h)(
- 'b',
- null,
- '2 minutes max.'
- )
+ "Sound files can be WAV, MP3, AIFF, or FLAC. "
),
(0, _preact.h)(_common.FileUpload, {
title: 'Choose a sound file',
- mime: 'image.*',
+ accept: 'audio/*',
onUpload: function onUpload(file) {
return _this5.pickFile(file);
}
@@ -7894,15 +7887,6 @@ var SpectrogramUpload = function (_Component) {
return (0, _preact.h)(
'div',
{ className: 'fileMetadata' },
- file.size > 2 << 20 && (0, _preact.h)(
- 'p',
- null,
- (0, _preact.h)(
- 'i',
- null,
- 'Careful, your file is larger than 2 MB.'
- )
- ),
(0, _preact.h)(
_common.Group,
{ title: 'Metadata' },
@@ -8019,7 +8003,7 @@ var SpectrogramUpload = function (_Component) {
return _this6.buildZip();
}
},
- 'Build Zip'
+ 'Upload Frames'
)
),
(0, _preact.h)(_common.Progress, null)