Try to fix safari empty frame

This commit is contained in:
Nick Mowen 2024-01-01 19:06:46 -07:00
parent a0e79e9b7b
commit eb2a2f9e03
2 changed files with 4 additions and 3 deletions

View File

@ -186,8 +186,8 @@ function PreviewContent({
const touchEnd = new Date().getTime(); const touchEnd = new Date().getTime();
// consider tap less than 150 ms // consider tap less than 100 ms
if (touchEnd - touchStart < 150) { if (touchEnd - touchStart < 100) {
onClick(); onClick();
} }
}); });

View File

@ -203,7 +203,7 @@ export default function MobileTimelineView({
<VideoPlayer <VideoPlayer
options={{ options={{
preload: "auto", preload: "auto",
autoplay: false, autoplay: true,
controls: false, controls: false,
muted: true, muted: true,
loadingSpinner: false, loadingSpinner: false,
@ -217,6 +217,7 @@ export default function MobileTimelineView({
seekOptions={{}} seekOptions={{}}
onReady={(player) => { onReady={(player) => {
previewRef.current = player; previewRef.current = player;
player.pause();
player.on("seeked", () => setSeeking(false)); player.on("seeked", () => setSeeking(false));
}} }}
onDispose={() => { onDispose={() => {