fix autoplay unmuted video when video attachment is added

pull/1381/head
Audric Ackermann 4 years ago
parent f9783be764
commit 184b1984c3
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -92,7 +92,8 @@ exports.makeVideoScreenshot = ({
const image = dataURLToBlobSync(canvas.toDataURL(contentType));
video.removeEventListener('canplay', capture);
video.pause();
video.currentTime = 0;
resolve(image);
}
@ -103,6 +104,7 @@ exports.makeVideoScreenshot = ({
});
video.src = objectUrl;
video.muted = true;
// for some reason, this is to be started, otherwise the generated thumbnail will be empty
video.play();
});

@ -129,6 +129,10 @@ async function copyFromQuotedMessage(
);
copyFromQuotedMessage(msg, quote, attemptCount + 1).ignore();
}, attemptCount * attemptCount * 500);
} else {
window.log.warn(
`We did not found quoted message ${id} after ${attemptCount} attempts.`
);
}
quote.referencedMessageNotFound = true;

Loading…
Cancel
Save