fix handling of inline videos

This commit is contained in:
or-else
2023-01-04 17:52:28 -08:00
parent afee6b5dd9
commit cb64e1f247
22 changed files with 118 additions and 18 deletions
+3 -1
View File
@@ -1013,7 +1013,7 @@ class MessagesView extends React.Component {
if (uploads.length == 0) {
// Both video and preview are small enough to send inband.
Promise.all(blobToBase64(videoBlob), blobToBase64(previewBlob))
Promise.all([blobToBase64(videoBlob), blobToBase64(previewBlob)])
.then(b64s => {
const [v64, i64] = b64s;
let msg = Drafty.insertVideo(null, 0, {
@@ -1313,6 +1313,7 @@ class MessagesView extends React.Component {
content={this.state.videoPreview}
tinode={this.props.tinode}
reply={this.state.reply}
onError={this.props.onError}
onCancelReply={this.handleCancelReply}
onClose={this.handleClosePreview}
onSendMessage={this.sendVideoAttachment} />
@@ -1330,6 +1331,7 @@ class MessagesView extends React.Component {
<VideoPreview
content={this.state.videoPostview}
tinode={this.props.tinode}
onError={this.props.onError}
onClose={this.handleClosePreview} />
);
} else if (this.state.docPreview) {