diff --git a/package.json b/package.json index bf0ce157..1e1a1a78 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "node": ">=14.6.0" }, "scripts": { - "start": "webpack serve --config ./webpack.dev.js", + "start": "webpack serve --config ./webpack.dev.js --open", "build": "webpack --config ./webpack.prod.js" }, "keywords": [], diff --git a/src/app/organisms/room/AttachmentUis/AttachmentFrame.jsx b/src/app/organisms/room/AttachmentUis/AttachmentFrame.jsx index 348106e7..7174162c 100644 --- a/src/app/organisms/room/AttachmentUis/AttachmentFrame.jsx +++ b/src/app/organisms/room/AttachmentUis/AttachmentFrame.jsx @@ -80,9 +80,9 @@ function AttachmentFrame({ } AttachmentFrame.propTypes = { - attachmentOrUi: PropTypes.node.isRequired, + attachmentOrUi: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired, fileSetter: PropTypes.func.isRequired, - uploadProgressRef: PropTypes.node.isRequired, + uploadProgressRef: PropTypes.shape().isRequired, cancelNeedle: PropTypes.func.isRequired, }; diff --git a/src/app/organisms/room/AttachmentUis/VoiceMailRecorder.jsx b/src/app/organisms/room/AttachmentUis/VoiceMailRecorder.jsx index bb5fc08f..8d3d5a07 100644 --- a/src/app/organisms/room/AttachmentUis/VoiceMailRecorder.jsx +++ b/src/app/organisms/room/AttachmentUis/VoiceMailRecorder.jsx @@ -45,6 +45,8 @@ function pauseRec() { } } function startOrResumeRec() { + if (!_mediaRecorder) return; + if (_mediaRecorder.state === 'paused') { _mediaRecorder.resume(); console.log('resume'); @@ -58,9 +60,8 @@ function restartRec() { if (_mediaRecorder.state !== 'inactive') _mediaRecorder.stop(); _mediaRecorder = null; - init(); - - startOrResumeRec(); + init() + .then(startOrResumeRec()); } // TODO: Handle turning off the recorder to remove the browser indicator @@ -106,7 +107,7 @@ function VoiceMailRecorder({ fnCancel, fnRequestResult, fnHowToSubmit }) {