Fix iOS empty frame

This commit is contained in:
Nick Mowen 2023-12-18 19:00:42 -07:00
parent 8f83914690
commit a7f4f9919d

View File

@ -88,7 +88,12 @@ export default function PreviewThumbnailPlayer({
onPlayback(false); onPlayback(false);
} }
}, },
{ root: document.getElementById("pageRoot"), threshold: 1.0 } {
threshold: 1.0,
root: document.getElementById("pageRoot"),
// iOS has bug where poster is empty frame until video starts playing so playback needs to begin earlier
rootMargin: isSafari ? "10% 0px 25% 0px" : "0px",
}
); );
if (node) autoPlayObserver.current.observe(node); if (node) autoPlayObserver.current.observe(node);
} catch (e) { } catch (e) {