summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js21
1 files changed, 15 insertions, 6 deletions
diff --git a/public/bundle.js b/public/bundle.js
index b860674..62ee11b 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -2702,6 +2702,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
// import db from '../db'
+var socket = io(window.location.origin);
+
+socket.on('connect', function (data) {
+ console.log('connected');
+});
+socket.on('worker', function (data) {
+ console.log('worker connected', data);
+});
+socket.on('processed', function (data) {
+ console.log('processed', data);
+});
+
var App = function App() {
return (0, _preact.h)(
'div',
@@ -8947,10 +8959,6 @@ var Files = function (_Component) {
}, {
key: 'handleClick',
value: function handleClick(file) {
- if (file.type === 'audio') {
- (0, _actions.audioPlayFile)(file);
- document.body.style.backgroundImage = 'url(' + pngpath(file) + ')';
- }
this.setState({ selected: file });
}
}, {
@@ -8975,12 +8983,12 @@ var Files = function (_Component) {
(0, _preact.h)(
'span',
{ 'class': 'mime' },
- file.mime
+ file.processed ? file.mime : 'working...'
),
(0, _preact.h)(
'span',
{ 'class': 'duration' },
- file.duration.toFixed(1) + 's'
+ file.duration ? file.duration.toFixed(1) + 's' : ''
),
(0, _preact.h)(
'span',
@@ -9077,6 +9085,7 @@ var audio = document.createElement('audio');
function AudioPlayer(props) {
if (props.file) {
+ document.body.style.backgroundImage = 'url(' + pngpath(file) + ')';
audio.src = mp3path(props.file);
audio.play();
return (0, _preact.h)(