diff --git a/src/components/home/AppleTVHero.tsx b/src/components/home/AppleTVHero.tsx
index 59a28b1f..1dc324a7 100644
--- a/src/components/home/AppleTVHero.tsx
+++ b/src/components/home/AppleTVHero.tsx
@@ -14,6 +14,7 @@ import { NavigationProp, useNavigation } from '@react-navigation/native';
import { RootStackParamList } from '../../navigation/AppNavigator';
import { LinearGradient } from 'expo-linear-gradient';
import FastImage from '@d11/react-native-fast-image';
+import { SvgUri } from 'react-native-svg';
import { MaterialIcons } from '@expo/vector-icons';
import Animated, {
FadeIn,
@@ -36,8 +37,6 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
interface AppleTVHeroProps {
featuredContent: StreamingContent | null;
allFeaturedContent?: StreamingContent[];
- isSaved: boolean;
- handleSaveToLibrary: () => void;
loading?: boolean;
onRetry?: () => void;
}
@@ -50,11 +49,37 @@ const STATUS_BAR_HEIGHT = StatusBar.currentHeight || 0;
// Calculate hero height - 65% of screen height
const HERO_HEIGHT = height * 0.75;
+// Animated Pagination Dot Component
+const PaginationDot: React.FC<{ isActive: boolean; onPress: () => void }> = React.memo(
+ ({ isActive, onPress }) => {
+ const animatedStyle = useAnimatedStyle(() => {
+ return {
+ width: withTiming(isActive ? 32 : 8, {
+ duration: 300,
+ easing: Easing.out(Easing.cubic),
+ }),
+ opacity: withTiming(isActive ? 0.9 : 0.3, {
+ duration: 300,
+ easing: Easing.out(Easing.cubic),
+ }),
+ };
+ });
+
+ return (
+
+
+
+ );
+ }
+);
+
const AppleTVHero: React.FC = ({
featuredContent,
allFeaturedContent,
- isSaved,
- handleSaveToLibrary,
loading,
onRetry,
}) => {
@@ -108,7 +133,7 @@ const AppleTVHero: React.FC = ({
// Retry after remaining time
startAutoPlay();
}
- }, 5000); // Auto-advance every 5 seconds
+ }, 25000); // Auto-advance every 25 seconds
}, [items.length]);
useEffect(() => {
@@ -334,7 +359,7 @@ const AppleTVHero: React.FC = ({
{/* Content Overlay */}
-
+
{/* Logo or Title with Fade Animation */}
= ({
>
{currentItem.logo && !logoError[currentIndex] ? (
- setLogoLoaded((prev) => ({ ...prev, [currentIndex]: true }))}
- onError={() => {
- setLogoError((prev) => ({ ...prev, [currentIndex]: true }));
- logger.warn('[AppleTVHero] Logo load failed:', currentItem.logo);
- }}
- />
+ {currentItem.logo.toLowerCase().endsWith('.svg') ? (
+ setLogoLoaded((prev) => ({ ...prev, [currentIndex]: true }))}
+ onError={() => {
+ setLogoError((prev) => ({ ...prev, [currentIndex]: true }));
+ logger.warn('[AppleTVHero] SVG Logo load failed:', currentItem.logo);
+ }}
+ />
+ ) : (
+ setLogoLoaded((prev) => ({ ...prev, [currentIndex]: true }))}
+ onError={() => {
+ setLogoError((prev) => ({ ...prev, [currentIndex]: true }));
+ logger.warn('[AppleTVHero] Logo load failed:', currentItem.logo);
+ }}
+ />
+ )}
) : (
@@ -389,32 +427,19 @@ const AppleTVHero: React.FC = ({
{/* Action Buttons - Always Visible */}
- {/* Play Button */}
+ {/* Info Button */}
{
- navigation.navigate('Streams', {
+ navigation.navigate('Metadata', {
id: currentItem.id,
type: currentItem.type,
});
}}
activeOpacity={0.8}
>
-
- Play
-
-
- {/* Add to List Button */}
-
-
+
+ Info
@@ -422,19 +447,11 @@ const AppleTVHero: React.FC = ({
{items.length > 1 && (
{items.map((_, index) => (
- handleDotPress(index)}
- activeOpacity={0.7}
- hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
- >
-
-
+ />
))}
)}
@@ -549,7 +566,7 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
gap: 12,
- marginBottom: 24,
+ marginBottom: 20,
},
playButton: {
flexDirection: 'row',
@@ -558,7 +575,7 @@ const styles = StyleSheet.create({
backgroundColor: '#fff',
paddingVertical: 14,
paddingHorizontal: 32,
- borderRadius: 8,
+ borderRadius: 24,
gap: 8,
minWidth: 140,
},
@@ -581,15 +598,11 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
gap: 8,
+ marginTop: 12,
},
paginationDot: {
- width: 8,
height: 8,
borderRadius: 4,
- backgroundColor: 'rgba(255,255,255,0.3)',
- },
- paginationDotActive: {
- width: 32,
backgroundColor: 'rgba(255,255,255,0.9)',
},
bottomBlend: {
@@ -597,7 +610,7 @@ const styles = StyleSheet.create({
bottom: 0,
left: 0,
right: 0,
- height: 60,
+ height: 40,
pointerEvents: 'none',
},
// Loading & Empty States
diff --git a/src/screens/HomeScreen.tsx b/src/screens/HomeScreen.tsx
index 8cab2c1d..7f273c06 100644
--- a/src/screens/HomeScreen.tsx
+++ b/src/screens/HomeScreen.tsx
@@ -643,8 +643,6 @@ const HomeScreen = () => {
);