mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
Update HeroSection.tsx
This commit is contained in:
parent
a2a801d68a
commit
16a9c5c41d
1 changed files with 3 additions and 19 deletions
|
|
@ -1612,29 +1612,13 @@ const HeroSection: React.FC<HeroSectionProps> = memo(({
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Hidden preload trailer player - loads in background */}
|
{/* Single trailer player - starts hidden (opacity 0), fades in when ready */}
|
||||||
{shouldLoadSecondaryData && settings?.showTrailers && trailerUrl && !trailerLoading && !trailerError && !trailerPreloaded && (
|
{shouldLoadSecondaryData && settings?.showTrailers && trailerUrl && !trailerLoading && !trailerError && (
|
||||||
<View style={[staticStyles.absoluteFill, { opacity: 0, pointerEvents: 'none' }]}>
|
|
||||||
<TrailerPlayer
|
|
||||||
key={`preload-${trailerUrl}`}
|
|
||||||
trailerUrl={trailerUrl}
|
|
||||||
autoPlay={false}
|
|
||||||
muted={true}
|
|
||||||
style={staticStyles.absoluteFill}
|
|
||||||
hideLoadingSpinner={true}
|
|
||||||
onLoad={handleTrailerPreloaded}
|
|
||||||
onError={handleTrailerError}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Visible trailer player - rendered on top with fade transition and parallax */}
|
|
||||||
{shouldLoadSecondaryData && settings?.showTrailers && trailerUrl && !trailerLoading && !trailerError && trailerPreloaded && (
|
|
||||||
<Animated.View style={[staticStyles.absoluteFill, {
|
<Animated.View style={[staticStyles.absoluteFill, {
|
||||||
opacity: trailerOpacity
|
opacity: trailerOpacity
|
||||||
}, trailerParallaxStyle]}>
|
}, trailerParallaxStyle]}>
|
||||||
<TrailerPlayer
|
<TrailerPlayer
|
||||||
key={`visible-${trailerUrl}`}
|
key={`trailer-${trailerUrl}`}
|
||||||
ref={trailerVideoRef}
|
ref={trailerVideoRef}
|
||||||
trailerUrl={trailerUrl}
|
trailerUrl={trailerUrl}
|
||||||
autoPlay={globalTrailerPlaying}
|
autoPlay={globalTrailerPlaying}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue