From b515d8ba92f63e3a0485729b9680bd4e7a5ee120 Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 10 Sep 2024 17:56:54 -0700 Subject: [PATCH] temporary hack fix --- src/view/com/util/post-embeds/VideoEmbed.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/view/com/util/post-embeds/VideoEmbed.tsx b/src/view/com/util/post-embeds/VideoEmbed.tsx index 3175266e41..2961505e33 100644 --- a/src/view/com/util/post-embeds/VideoEmbed.tsx +++ b/src/view/com/util/post-embeds/VideoEmbed.tsx @@ -102,9 +102,12 @@ function InnerWrapper({embed}: Props) { setPlayerStatus(status) if (status === 'error') { setError(playerError ?? new Error('Unknown player error')) - } - if (status === 'readyToPlay' && oldStatus !== 'readyToPlay') { + } else if (status === 'readyToPlay' && oldStatus !== 'readyToPlay') { player.play() + // @ts-expect-error This exists! It is a temporary hack fix that we can OTA while pending the native real fix + // for looping with captions + } else if (status === 'playbackBufferEmpty') { + player.replay() } }, )