save video dimensions in onLoadedData instead of onLoadedMetadata

This commit is contained in:
Josh Hawkins 2024-05-26 18:36:29 -05:00
parent c2eac10925
commit 9835513cb8

View File

@ -303,8 +303,10 @@ function MSEPlayer({
className={className} className={className}
playsInline playsInline
preload="auto" preload="auto"
onLoadedData={onPlaying} onLoadedData={() => {
onLoadedMetadata={handleLoadedMetadata} handleLoadedMetadata?.();
onPlaying?.();
}}
muted={!audioEnabled} muted={!audioEnabled}
onError={() => { onError={() => {
if (wsRef.current) { if (wsRef.current) {