diff --git a/src/components/content/carousels/InteractivePromotionalCarousel.js b/src/components/content/carousels/InteractivePromotionalCarousel.js index 95b14ff..6951f60 100644 --- a/src/components/content/carousels/InteractivePromotionalCarousel.js +++ b/src/components/content/carousels/InteractivePromotionalCarousel.js @@ -72,7 +72,23 @@ const InteractivePromotionalCarousel = () => { useEffect(() => { if (videoRef.current && selectedPromotion.video) { - videoRef.current.play(); + const playVideo = async () => { + try { + videoRef.current.load(); + await videoRef.current.play(); + } catch (error) { + console.warn('Video playback failed:', error); + setTimeout(async () => { + try { + await videoRef.current?.play(); + } catch (retryError) { + console.warn('Video retry failed:', retryError); + } + }, 100); + } + }; + + playVideo(); } }, [selectedPromotion]); @@ -87,6 +103,7 @@ const InteractivePromotionalCarousel = () => { loop muted playsInline + onError={(e) => console.warn('Video error:', e)} /> ) : ( { ) : ( <>
-
+
{selectedPromotion.category}

{selectedPromotion.title}