From 9835513cb81ecf108743dd805bc7e2fbc4746e50 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 26 May 2024 18:36:29 -0500 Subject: [PATCH] save video dimensions in onLoadedData instead of onLoadedMetadata --- web/src/components/player/MsePlayer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/components/player/MsePlayer.tsx b/web/src/components/player/MsePlayer.tsx index 6a41a93e6c..841b824dbe 100644 --- a/web/src/components/player/MsePlayer.tsx +++ b/web/src/components/player/MsePlayer.tsx @@ -303,8 +303,10 @@ function MSEPlayer({ className={className} playsInline preload="auto" - onLoadedData={onPlaying} - onLoadedMetadata={handleLoadedMetadata} + onLoadedData={() => { + handleLoadedMetadata?.(); + onPlaying?.(); + }} muted={!audioEnabled} onError={() => { if (wsRef.current) {