mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
safari hack/fix
This commit is contained in:
parent
948249bb3d
commit
e8c8455f43
@ -124,6 +124,9 @@ async function loadVideoFromBlob(blob) {
|
||||
// seek to the first 1/10s to make sure that drawing the video
|
||||
// on a canvas won't give a blank image
|
||||
const seekPromise = domEventAsPromise(video, "seeked");
|
||||
// needed for safari to reliably fire the seeked event,
|
||||
// somewhat hacky but using raf for example didn't do the trick
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
video.currentTime = 0.1;
|
||||
await seekPromise;
|
||||
return video;
|
||||
|
Loading…
Reference in New Issue
Block a user