From ec2543c23f8169d073a1f6b79fd905efbeb38651 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 19 Aug 2025 12:14:14 -0600 Subject: [PATCH] Fix hls not loading video in explore (#19625) --- .../components/player/GenericVideoPlayer.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/web/src/components/player/GenericVideoPlayer.tsx b/web/src/components/player/GenericVideoPlayer.tsx index d64d9a736..4d6cb4ee5 100644 --- a/web/src/components/player/GenericVideoPlayer.tsx +++ b/web/src/components/player/GenericVideoPlayer.tsx @@ -1,4 +1,10 @@ -import React, { useState, useRef, useEffect, useCallback } from "react"; +import React, { + useState, + useRef, + useEffect, + useCallback, + useMemo, +} from "react"; import { useVideoDimensions } from "@/hooks/use-video-dimensions"; import HlsVideoPlayer from "./HlsVideoPlayer"; import ActivityIndicator from "../indicators/activity-indicator"; @@ -89,6 +95,12 @@ export function GenericVideoPlayer({ }, ); + const hlsSource = useMemo(() => { + return { + playlist: source, + }; + }, [source]); + return (
@@ -107,9 +119,7 @@ export function GenericVideoPlayer({ >