Merge pull request #292 from AdityasahuX07/patch-14

Video player Ui changes
This commit is contained in:
Nayif 2025-12-25 12:46:25 +05:30 committed by GitHub
commit d2987ce0cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 734 additions and 1374 deletions

View file

@ -1,18 +1,19 @@
import React from 'react'; import React from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet, Platform, useWindowDimensions } from 'react-native'; import { View, Text, TouchableOpacity, ScrollView, useWindowDimensions, StyleSheet, Platform } from 'react-native';
import { MaterialIcons } from '@expo/vector-icons'; import { MaterialIcons } from '@expo/vector-icons';
import Animated, { import Animated, {
FadeIn, FadeIn,
FadeOut, FadeOut,
SlideInRight, SlideInDown,
SlideOutRight, SlideOutDown,
} from 'react-native-reanimated'; } from 'react-native-reanimated';
import { getTrackDisplayName } from '../utils/playerUtils'; import { getTrackDisplayName, DEBUG_MODE } from '../utils/playerUtils';
import { logger } from '../../../utils/logger';
interface AudioTrackModalProps { interface AudioTrackModalProps {
showAudioModal: boolean; showAudioModal: boolean;
setShowAudioModal: (show: boolean) => void; setShowAudioModal: (show: boolean) => void;
ksAudioTracks: Array<{ id: number, name: string, language?: string }>; ksAudioTracks: Array<{id: number, name: string, language?: string}>;
selectedAudioTrack: number | null; selectedAudioTrack: number | null;
selectAudioTrack: (trackId: number) => void; selectAudioTrack: (trackId: number) => void;
} }
@ -24,89 +25,99 @@ export const AudioTrackModal: React.FC<AudioTrackModalProps> = ({
selectedAudioTrack, selectedAudioTrack,
selectAudioTrack, selectAudioTrack,
}) => { }) => {
const { width } = useWindowDimensions(); const { width, height } = useWindowDimensions();
const MENU_WIDTH = Math.min(width * 0.85, 400);
// Size constants matching SubtitleModal aesthetics
const menuWidth = Math.min(width * 0.9, 420);
const menuMaxHeight = height * 0.9;
const handleClose = () => setShowAudioModal(false); const handleClose = () => setShowAudioModal(false);
if (!showAudioModal) return null; if (!showAudioModal) return null;
return ( return (
<View style={[StyleSheet.absoluteFill, { zIndex: 9999 }]}> <View style={StyleSheet.absoluteFill} zIndex={9999}>
<TouchableOpacity style={StyleSheet.absoluteFill} activeOpacity={1} onPress={handleClose}> {/* Backdrop matching SubtitleModal */}
<Animated.View entering={FadeIn.duration(200)} exiting={FadeOut.duration(150)} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }} /> <TouchableOpacity
style={StyleSheet.absoluteFill}
activeOpacity={1}
onPress={handleClose}
>
<Animated.View
entering={FadeIn.duration(200)}
exiting={FadeOut.duration(150)}
style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.4)' }}
/>
</TouchableOpacity> </TouchableOpacity>
<Animated.View {/* Center Alignment Container */}
entering={SlideInRight.duration(300)} <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }} pointerEvents="box-none">
exiting={SlideOutRight.duration(250)} <Animated.View
style={{ entering={SlideInDown.duration(300)}
position: 'absolute', exiting={SlideOutDown.duration(250)}
top: 0, style={{
right: 0, width: menuWidth,
bottom: 0, maxHeight: menuMaxHeight,
width: MENU_WIDTH, backgroundColor: 'rgba(15, 15, 15, 0.98)', // Matches SubtitleModal
backgroundColor: '#0f0f0f', borderRadius: 24,
borderLeftWidth: 1, borderWidth: 1,
borderColor: 'rgba(255,255,255,0.1)', borderColor: 'rgba(255,255,255,0.1)',
}} overflow: 'hidden'
> }}
<View style={{ paddingTop: Platform.OS === 'ios' ? 60 : 15, paddingHorizontal: 20 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
<Text style={{ color: 'white', fontSize: 22, fontWeight: '700' }}>Audio Tracks</Text>
</View>
</View>
<ScrollView
showsVerticalScrollIndicator={false}
contentContainerStyle={{ padding: 15, paddingBottom: 40 }}
> >
<View style={{ gap: 8 }}> {/* Header with shared aesthetics */}
{ksAudioTracks.map((track) => { <View style={{ flexDirection: 'row', alignItems: 'center', padding: 20, position: 'relative' }}>
const isSelected = selectedAudioTrack === track.id; <Text style={{ color: 'white', fontSize: 18, fontWeight: '700' }}>Audio Tracks</Text>
return (
<TouchableOpacity
key={track.id}
onPress={() => {
selectAudioTrack(track.id);
setTimeout(handleClose, 200);
}}
style={{
paddingHorizontal: 16,
paddingVertical: 12,
borderRadius: 12,
backgroundColor: isSelected ? 'white' : 'rgba(255,255,255,0.06)',
borderWidth: 1,
borderColor: isSelected ? 'white' : 'rgba(255,255,255,0.1)',
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
}}
>
<View style={{ flex: 1 }}>
<Text style={{
color: isSelected ? 'black' : 'white',
fontWeight: isSelected ? '700' : '500',
fontSize: 15
}}>
{getTrackDisplayName(track)}
</Text>
</View>
{isSelected && <MaterialIcons name="check" size={18} color="black" />}
</TouchableOpacity>
);
})}
{ksAudioTracks.length === 0 && (
<View style={{ padding: 40, alignItems: 'center', opacity: 0.5 }}>
<MaterialIcons name="volume-off" size={32} color="white" />
<Text style={{ color: 'white', marginTop: 10 }}>No audio tracks available</Text>
</View>
)}
</View> </View>
</ScrollView>
</Animated.View> <ScrollView
showsVerticalScrollIndicator={false}
contentContainerStyle={{ paddingHorizontal: 20, paddingBottom: 20 }}
>
<View style={{ gap: 8 }}>
{ksAudioTracks.map((track) => {
const isSelected = selectedAudioTrack === track.id;
return (
<TouchableOpacity
key={track.id}
onPress={() => {
selectAudioTrack(track.id);
setTimeout(handleClose, 200);
}}
style={{
padding: 10,
borderRadius: 12,
backgroundColor: isSelected ? 'white' : 'rgba(255,255,255,0.05)', // Matches SubtitleModal item colors
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
}}
>
<View style={{ flex: 1 }}>
<Text style={{
color: isSelected ? 'black' : 'white',
fontWeight: isSelected ? '700' : '400',
fontSize: 15
}}>
{getTrackDisplayName(track)}
</Text>
</View>
{isSelected && <MaterialIcons name="check" size={18} color="black" />}
</TouchableOpacity>
);
})}
{ksAudioTracks.length === 0 && (
<View style={{ padding: 40, alignItems: 'center', opacity: 0.5 }}>
<MaterialIcons name="volume-off" size={32} color="white" />
<Text style={{ color: 'white', marginTop: 10 }}>No audio tracks available</Text>
</View>
)}
</View>
</ScrollView>
</Animated.View>
</View>
</View> </View>
); );
}; };

View file

@ -31,34 +31,22 @@ const QualityBadge = ({ quality }: { quality: string | null }) => {
color = '#F59E0B'; color = '#F59E0B';
label = '4K'; label = '4K';
} else if (qualityNum >= 1080) { } else if (qualityNum >= 1080) {
color = '#EF4444'; color = '#3B82F6';
label = 'FHD'; label = '1080p';
} else if (qualityNum >= 720) { } else if (qualityNum >= 720) {
color = '#10B981'; color = '#10B981';
label = 'HD'; label = '720p';
} }
return ( return (
<View <View style={{
style={{ backgroundColor: color,
backgroundColor: `${color}20`, paddingHorizontal: 6,
borderColor: `${color}60`, paddingVertical: 2,
borderWidth: 1, borderRadius: 4,
paddingHorizontal: 8, marginLeft: 8,
paddingVertical: 4, }}>
borderRadius: 8, <Text style={{ color: 'white', fontSize: 10, fontWeight: 'bold' }}>{label}</Text>
flexDirection: 'row',
alignItems: 'center',
}}
>
<Text style={{
color: color,
fontSize: 12,
fontWeight: '700',
letterSpacing: 0.5,
}}>
{label}
</Text>
</View> </View>
); );
}; };
@ -114,7 +102,6 @@ export const EpisodeStreamsModal: React.FC<EpisodeStreamsModalProps> = ({
respondedProviders.add(addonId); respondedProviders.add(addonId);
if (error) { if (error) {
logger.warn(`[EpisodeStreamsModal] Error from ${addonName || addonId}:`, error);
setHasErrors(prev => [...prev, `${addonName || addonId}: ${error.message || 'Unknown error'}`]); setHasErrors(prev => [...prev, `${addonName || addonId}: ${error.message || 'Unknown error'}`]);
} else if (streams && streams.length > 0) { } else if (streams && streams.length > 0) {
setAvailableStreams(prev => ({ setAvailableStreams(prev => ({
@ -124,29 +111,20 @@ export const EpisodeStreamsModal: React.FC<EpisodeStreamsModalProps> = ({
addonName: addonName || addonId addonName: addonName || addonId
} }
})); }));
logger.log(`[EpisodeStreamsModal] Added ${streams.length} streams from ${addonName || addonId}`);
} else {
logger.log(`[EpisodeStreamsModal] No streams from ${addonName || addonId}`);
} }
if (completedProviders >= expectedProviders.size) { if (completedProviders >= expectedProviders.size) {
logger.log(`[EpisodeStreamsModal] All providers completed. Total providers responded: ${respondedProviders.size}`);
setIsLoading(false); setIsLoading(false);
} }
}); });
// Fallback timeout
setTimeout(() => { setTimeout(() => {
if (respondedProviders.size === 0) { if (respondedProviders.size === 0) {
logger.warn(`[EpisodeStreamsModal] Timeout: No providers responded`);
setHasErrors(prev => [...prev, 'Timeout: No providers responded']);
setIsLoading(false); setIsLoading(false);
} }
}, 8000); }, 8000);
} catch (error) { } catch (error) {
logger.error('[EpisodeStreamsModal] Error fetching streams:', error);
setHasErrors(prev => [...prev, `Failed to fetch streams: ${error}`]);
setIsLoading(false); setIsLoading(false);
} }
}; };
@ -162,9 +140,18 @@ export const EpisodeStreamsModal: React.FC<EpisodeStreamsModalProps> = ({
const sortedProviders = Object.entries(availableStreams); const sortedProviders = Object.entries(availableStreams);
return ( return (
<View style={[StyleSheet.absoluteFill, { zIndex: 9999 }]}> <View style={StyleSheet.absoluteFill} zIndex={10000}>
<TouchableOpacity style={StyleSheet.absoluteFill} activeOpacity={1} onPress={onClose}> {/* Backdrop */}
<Animated.View entering={FadeIn.duration(200)} exiting={FadeOut.duration(150)} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }} /> <TouchableOpacity
style={StyleSheet.absoluteFill}
activeOpacity={1}
onPress={onClose}
>
<Animated.View
entering={FadeIn.duration(200)}
exiting={FadeOut.duration(150)}
style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }}
/>
</TouchableOpacity> </TouchableOpacity>
<Animated.View <Animated.View
@ -181,15 +168,20 @@ export const EpisodeStreamsModal: React.FC<EpisodeStreamsModalProps> = ({
borderColor: 'rgba(255,255,255,0.1)', borderColor: 'rgba(255,255,255,0.1)',
}} }}
> >
<View style={{ paddingTop: Platform.OS === 'ios' ? 60 : 15, paddingHorizontal: 20 }}> {/* Header */}
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}> <View style={{
<View style={{ flex: 1 }}> paddingTop: Platform.OS === 'ios' ? 60 : 20,
<Text style={{ color: 'white', fontSize: 22, fontWeight: '700' }} numberOfLines={1}> paddingHorizontal: 20,
{episode?.name || 'Select Stream'} paddingBottom: 20,
}}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start' }}>
<View style={{ flex: 1, marginRight: 10 }}>
<Text style={{ color: 'white', fontSize: 20, fontWeight: '700' }} numberOfLines={1}>
{episode?.name || 'Sources'}
</Text> </Text>
{episode && ( {episode && (
<Text style={{ color: 'rgba(255,255,255,0.6)', fontSize: 13, marginTop: 4 }}> <Text style={{ color: 'rgba(255,255,255,0.5)', fontSize: 13, marginTop: 4 }}>
S{episode.season_number}E{episode.episode_number} S{episode.season_number} E{episode.episode_number}
</Text> </Text>
)} )}
</View> </View>
@ -198,176 +190,82 @@ export const EpisodeStreamsModal: React.FC<EpisodeStreamsModalProps> = ({
<ScrollView <ScrollView
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
contentContainerStyle={{ padding: 15, paddingBottom: 40 }} contentContainerStyle={{ paddingHorizontal: 15, paddingBottom: 40 }}
> >
{isLoading && ( {isLoading && sortedProviders.length === 0 && (
<View style={{ <View style={{ padding: 40, alignItems: 'center' }}>
backgroundColor: 'rgba(255, 255, 255, 0.05)', <ActivityIndicator color="white" />
borderRadius: 16, <Text style={{ color: 'white', marginTop: 15, opacity: 0.6 }}>Finding sources...</Text>
padding: 20,
alignItems: 'center',
}}>
<ActivityIndicator size="large" color="#3B82F6" />
<Text style={{
color: 'rgba(255, 255, 255, 0.6)',
fontSize: 14,
marginTop: 12,
textAlign: 'center',
}}>
Finding available streams...
</Text>
</View> </View>
)} )}
{!isLoading && sortedProviders.length > 0 && ( {sortedProviders.map(([providerId, providerData]) => (
sortedProviders.map(([providerId, providerData]) => ( <View key={providerId} style={{ marginBottom: 20 }}>
<View key={providerId} style={{ marginBottom: 30 }}>
<Text style={{
color: 'rgba(255, 255, 255, 0.7)',
fontSize: 14,
fontWeight: '600',
marginBottom: 15,
textTransform: 'uppercase',
letterSpacing: 0.5,
}}>
{providerData.addonName} ({providerData.streams.length})
</Text>
<View style={{ gap: 8 }}>
{providerData.streams.map((stream, index) => {
const quality = getQualityFromTitle(stream.title) || stream.quality;
return (
<TouchableOpacity
key={`${providerId}-${index}`}
style={{
backgroundColor: 'rgba(255,255,255,0.06)',
borderRadius: 12,
padding: 12,
borderWidth: 1,
borderColor: 'rgba(255,255,255,0.1)',
}}
onPress={() => onSelectStream(stream)}
activeOpacity={0.7}
>
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
<View style={{ flex: 1 }}>
<View style={{
flexDirection: 'row',
alignItems: 'center',
marginBottom: 8,
gap: 8,
}}>
<Text style={{
color: 'white',
fontSize: 15,
fontWeight: '500',
flex: 1,
}}>
{stream.title || stream.name || `Stream ${index + 1}`}
</Text>
{quality && <QualityBadge quality={quality} />}
</View>
{(stream.size || stream.lang) && (
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>
{stream.size && (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<MaterialIcons name="storage" size={14} color="rgba(255,255,255,0.5)" />
<Text style={{
color: 'rgba(255,255,255,0.5)',
fontSize: 12,
fontWeight: '600',
marginLeft: 4,
}}>
{(stream.size / (1024 * 1024 * 1024)).toFixed(1)} GB
</Text>
</View>
)}
{stream.lang && (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<MaterialIcons name="language" size={14} color="rgba(59,130,246,0.8)" />
<Text style={{
color: 'rgba(59,130,246,0.8)',
fontSize: 12,
fontWeight: '600',
marginLeft: 4,
}}>
{stream.lang.toUpperCase()}
</Text>
</View>
)}
</View>
)}
</View>
<View style={{ marginLeft: 12, alignItems: 'center' }}>
<MaterialIcons name="play-arrow" size={20} color="rgba(255,255,255,0.4)" />
</View>
</View>
</TouchableOpacity>
);
})}
</View>
</View>
))
)}
{!isLoading && sortedProviders.length === 0 && hasErrors.length === 0 && (
<View style={{
backgroundColor: 'rgba(255, 255, 255, 0.05)',
borderRadius: 16,
padding: 20,
alignItems: 'center',
}}>
<MaterialIcons name="error-outline" size={48} color="rgba(255,255,255,0.3)" />
<Text style={{
color: 'rgba(255, 255, 255, 0.6)',
fontSize: 16,
marginTop: 16,
textAlign: 'center',
}}>
No sources available
</Text>
<Text style={{ <Text style={{
color: 'rgba(255, 255, 255, 0.4)', color: 'rgba(255, 255, 255, 0.4)',
fontSize: 14, fontSize: 12,
marginTop: 8, fontWeight: '700',
textAlign: 'center', marginBottom: 10,
marginLeft: 5,
textTransform: 'uppercase',
letterSpacing: 1,
}}> }}>
Try searching for different content {providerData.addonName}
</Text> </Text>
<View style={{ gap: 8 }}>
{providerData.streams.map((stream, index) => {
const quality = getQualityFromTitle(stream.title) || stream.quality;
return (
<TouchableOpacity
key={`${providerId}-${index}`}
style={{
padding: 8,
borderRadius: 12,
backgroundColor: 'rgba(255,255,255,0.05)',
borderWidth: 1,
borderColor: 'rgba(255,255,255,0.05)'
}}
onPress={() => {
onSelectStream(stream);
onClose();
}}
activeOpacity={0.7}
>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
<View style={{ flex: 1 }}>
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 4 }}>
<Text style={{ color: 'white', fontWeight: '700', fontSize: 14, flex: 1 }} numberOfLines={1}>
{stream.name || 'Unknown Source'}
</Text>
<QualityBadge quality={quality} />
</View>
{stream.title && (
<Text style={{ color: 'rgba(255,255,255,0.5)', fontSize: 11 }} numberOfLines={2}>
{stream.title}
</Text>
)}
</View>
</View>
</TouchableOpacity>
);
})}
</View>
</View>
))}
{!isLoading && sortedProviders.length === 0 && (
<View style={{ padding: 40, alignItems: 'center', opacity: 0.5 }}>
<MaterialIcons name="cloud-off" size={48} color="white" />
<Text style={{ color: 'white', marginTop: 16, textAlign: 'center', fontWeight: '600' }}>No sources found</Text>
</View> </View>
)} )}
{!isLoading && hasErrors.length > 0 && ( {hasErrors.length > 0 && (
<View style={{ <View style={{ backgroundColor: 'rgba(239, 68, 68, 0.1)', borderRadius: 12, padding: 12, marginTop: 10 }}>
backgroundColor: 'rgba(239, 68, 68, 0.1)', <Text style={{ color: '#EF4444', fontSize: 11 }}>Sources might be limited due to provider errors.</Text>
borderRadius: 16, </View>
padding: 16,
marginBottom: 20,
}}>
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 8 }}>
<MaterialIcons name="error" size={20} color="#EF4444" />
<Text style={{
color: '#EF4444',
fontSize: 14,
fontWeight: '600',
marginLeft: 8,
}}>
Errors occurred
</Text>
</View>
{hasErrors.map((error, index) => (
<Text key={index} style={{
color: '#EF4444',
fontSize: 12,
marginTop: 4,
}}>
{error}
</Text>
))}
</View>
)} )}
</ScrollView> </ScrollView>
</Animated.View> </Animated.View>

View file

@ -43,7 +43,7 @@ export const EpisodesModal: React.FC<EpisodesModalProps> = ({
text: '#FFFFFF', text: '#FFFFFF',
textMuted: 'rgba(255,255,255,0.6)', textMuted: 'rgba(255,255,255,0.6)',
mediumEmphasis: 'rgba(255,255,255,0.7)', mediumEmphasis: 'rgba(255,255,255,0.7)',
primary: '#3B82F6', primary: 'rgba(255,255,255,0.9)',
white: '#FFFFFF', white: '#FFFFFF',
elevation2: 'rgba(255,255,255,0.05)' elevation2: 'rgba(255,255,255,0.05)'
} }
@ -55,22 +55,12 @@ export const EpisodesModal: React.FC<EpisodesModalProps> = ({
if (showEpisodesModal && metadata?.id) { if (showEpisodesModal && metadata?.id) {
setIsLoadingProgress(true); setIsLoadingProgress(true);
try { try {
const allProgress = await storageService.getAllWatchProgress(); const progress = await storageService.getShowProgress(metadata.id);
const progress: { [key: string]: any } = {}; setEpisodeProgress(progress || {});
// Filter progress for current show's episodes
Object.entries(allProgress).forEach(([key, value]) => {
if (key.includes(metadata.id!)) {
progress[key] = value;
}
});
setEpisodeProgress(progress);
// Trakt sync logic preserved // Trakt sync logic preserved
const traktService = TraktService.getInstance(); if (await TraktService.isAuthenticated()) {
if (await traktService.isAuthenticated()) { // Optional: background sync logic
// Optional: background sync logic
} }
} catch (err) { } catch (err) {
logger.error('Failed to fetch episode progress', err); logger.error('Failed to fetch episode progress', err);
@ -94,7 +84,7 @@ export const EpisodesModal: React.FC<EpisodesModalProps> = ({
const currentSeasonEpisodes = groupedEpisodes[selectedSeason] || []; const currentSeasonEpisodes = groupedEpisodes[selectedSeason] || [];
return ( return (
<View style={[StyleSheet.absoluteFill, { zIndex: 9999 }]}> <View style={StyleSheet.absoluteFill} zIndex={9999}>
<TouchableOpacity style={StyleSheet.absoluteFill} activeOpacity={1} onPress={() => setShowEpisodesModal(false)}> <TouchableOpacity style={StyleSheet.absoluteFill} activeOpacity={1} onPress={() => setShowEpisodesModal(false)}>
<Animated.View entering={FadeIn.duration(200)} exiting={FadeOut.duration(150)} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }} /> <Animated.View entering={FadeIn.duration(200)} exiting={FadeOut.duration(150)} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }} />
</TouchableOpacity> </TouchableOpacity>
@ -113,13 +103,18 @@ export const EpisodesModal: React.FC<EpisodesModalProps> = ({
borderColor: 'rgba(255,255,255,0.1)', borderColor: 'rgba(255,255,255,0.1)',
}} }}
> >
<View style={{ paddingTop: Platform.OS === 'ios' ? 60 : 15, paddingHorizontal: 20 }}> <View style={{ paddingTop: Platform.OS === 'ios' ? 60 : 20, paddingHorizontal: 20 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 10 }}>
<Text style={{ color: 'white', fontSize: 22, fontWeight: '700' }}>Episodes</Text> <Text style={{ color: 'white', fontSize: 22, fontWeight: '700' }}>Episodes</Text>
</View> </View>
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingBottom: 15, gap: 8 }}> <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingBottom: 15, gap: 8 }}>
{seasons.map((season) => ( {[...seasons]
.sort((a, b) => {
if (a === 0) return 1;
if (b === 0) return -1;
return a - b;
}).map((season) => (
<TouchableOpacity <TouchableOpacity
key={season} key={season}
onPress={() => setSelectedSeason(season)} onPress={() => setSelectedSeason(season)}
@ -136,14 +131,14 @@ export const EpisodesModal: React.FC<EpisodesModalProps> = ({
color: selectedSeason === season ? 'black' : 'white', color: selectedSeason === season ? 'black' : 'white',
fontWeight: selectedSeason === season ? '700' : '500' fontWeight: selectedSeason === season ? '700' : '500'
}}> }}>
Season {season} {season === 0 ? 'Specials' : `Season ${season}`}
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
))} ))}
</ScrollView> </ScrollView>
</View> </View>
<ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={{ padding: 15, paddingBottom: 40 }}> <ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={{ padding: 18, paddingBottom: 40 }}>
{isLoadingProgress ? ( {isLoadingProgress ? (
<ActivityIndicator color="white" style={{ marginTop: 20 }} /> <ActivityIndicator color="white" style={{ marginTop: 20 }} />
) : ( ) : (

View file

@ -22,41 +22,29 @@ const QualityBadge = ({ quality }: { quality: string | null }) => {
if (!quality) return null; if (!quality) return null;
const qualityNum = parseInt(quality); const qualityNum = parseInt(quality);
let color = '#8B5CF6'; // Default purple let color = '#8B5CF6';
let label = `${quality}p`; let label = `${quality}p`;
if (qualityNum >= 2160) { if (qualityNum >= 2160) {
color = '#F59E0B'; // Gold for 4K color = '#F59E0B';
label = '4K'; label = '4K';
} else if (qualityNum >= 1080) { } else if (qualityNum >= 1080) {
color = '#EF4444'; // Red for 1080p color = '#3B82F6';
label = 'FHD'; label = '1080p';
} else if (qualityNum >= 720) { } else if (qualityNum >= 720) {
color = '#10B981'; // Green for 720p color = '#10B981';
label = 'HD'; label = '720p';
} }
return ( return (
<View <View style={{
style={{ backgroundColor: color,
backgroundColor: `${color}20`, paddingHorizontal: 6,
borderColor: `${color}60`, paddingVertical: 2,
borderWidth: 1, borderRadius: 4,
paddingHorizontal: 8, marginLeft: 8,
paddingVertical: 4, }}>
borderRadius: 8, <Text style={{ color: 'white', fontSize: 10, fontWeight: 'bold' }}>{label}</Text>
flexDirection: 'row',
alignItems: 'center',
}}
>
<Text style={{
color: color,
fontSize: 12,
fontWeight: '700',
letterSpacing: 0.5,
}}>
{label}
</Text>
</View> </View>
); );
}; };
@ -97,9 +85,18 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
}; };
return ( return (
<View style={[StyleSheet.absoluteFill, { zIndex: 9999 }]}> <View style={StyleSheet.absoluteFill} zIndex={10000}>
<TouchableOpacity style={StyleSheet.absoluteFill} activeOpacity={1} onPress={handleClose}> {/* Backdrop */}
<Animated.View entering={FadeIn.duration(200)} exiting={FadeOut.duration(150)} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }} /> <TouchableOpacity
style={StyleSheet.absoluteFill}
activeOpacity={1}
onPress={handleClose}
>
<Animated.View
entering={FadeIn.duration(200)}
exiting={FadeOut.duration(150)}
style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }}
/>
</TouchableOpacity> </TouchableOpacity>
<Animated.View <Animated.View
@ -116,32 +113,35 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
borderColor: 'rgba(255,255,255,0.1)', borderColor: 'rgba(255,255,255,0.1)',
}} }}
> >
<View style={{ paddingTop: Platform.OS === 'ios' ? 60 : 15, paddingHorizontal: 20 }}> {/* Header */}
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}> <View style={{
<Text style={{ color: 'white', fontSize: 22, fontWeight: '700' }}>Change Source</Text> paddingTop: Platform.OS === 'ios' ? 60 : 20,
</View> paddingHorizontal: 20,
paddingBottom: 20,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
}}>
<Text style={{ color: 'white', fontSize: 20, fontWeight: '700' }}>
Change Source
</Text>
</View> </View>
<ScrollView <ScrollView
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
contentContainerStyle={{ padding: 15, paddingBottom: 40 }} contentContainerStyle={{ paddingHorizontal: 15, paddingBottom: 40 }}
> >
{isChangingSource && ( {isChangingSource && (
<View style={{ <View style={{
backgroundColor: 'rgba(34, 197, 94, 0.1)', backgroundColor: 'rgba(34, 197, 94, 0.1)',
borderRadius: 16, borderRadius: 12,
padding: 16, padding: 10,
marginBottom: 20, marginBottom: 15,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
}}> }}>
<ActivityIndicator size="small" color="#22C55E" /> <ActivityIndicator size="small" color="#22C55E" />
<Text style={{ <Text style={{ color: '#22C55E', fontSize: 14, fontWeight: '600', marginLeft: 10 }}>
color: '#22C55E',
fontSize: 14,
fontWeight: '600',
marginLeft: 12,
}}>
Switching source... Switching source...
</Text> </Text>
</View> </View>
@ -149,14 +149,15 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
{sortedProviders.length > 0 ? ( {sortedProviders.length > 0 ? (
sortedProviders.map(([providerId, providerData]) => ( sortedProviders.map(([providerId, providerData]) => (
<View key={providerId} style={{ marginBottom: 30 }}> <View key={providerId} style={{ marginBottom: 20 }}>
<Text style={{ <Text style={{
color: 'rgba(255, 255, 255, 0.7)', color: 'rgba(255, 255, 255, 0.4)',
fontSize: 14, fontSize: 12,
fontWeight: '600', fontWeight: '700',
marginBottom: 15, marginBottom: 10,
marginLeft: 5,
textTransform: 'uppercase', textTransform: 'uppercase',
letterSpacing: 0.5, letterSpacing: 1,
}}> }}>
{providerData.addonName} ({providerData.streams.length}) {providerData.addonName} ({providerData.streams.length})
</Text> </Text>
@ -170,12 +171,12 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
<TouchableOpacity <TouchableOpacity
key={`${providerId}-${index}`} key={`${providerId}-${index}`}
style={{ style={{
backgroundColor: isSelected ? 'white' : 'rgba(255,255,255,0.06)', padding: 8,
borderRadius: 12, borderRadius: 12,
padding: 12, backgroundColor: isSelected ? 'white' : 'rgba(255,255,255,0.05)',
borderWidth: 1, borderWidth: 1,
borderColor: isSelected ? 'white' : 'rgba(255,255,255,0.1)', borderColor: isSelected ? 'white' : 'rgba(255,255,255,0.05)',
opacity: (isChangingSource && !isSelected) ? 0.6 : 1, opacity: (isChangingSource && !isSelected) ? 0.5 : 1,
}} }}
onPress={() => handleStreamSelect(stream)} onPress={() => handleStreamSelect(stream)}
activeOpacity={0.7} activeOpacity={0.7}
@ -183,60 +184,46 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
> >
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<View style={{ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
flexDirection: 'row',
alignItems: 'center',
marginBottom: 8,
gap: 8,
}}>
<Text style={{ <Text style={{
color: isSelected ? 'black' : 'white', color: isSelected ? 'black' : 'white',
fontSize: 15,
fontWeight: isSelected ? '700' : '500', fontWeight: isSelected ? '700' : '500',
fontSize: 14,
flex: 1, flex: 1,
}}> }} numberOfLines={1}>
{stream.title || stream.name || `Stream ${index + 1}`} {stream.title || stream.name || `Stream ${index + 1}`}
</Text> </Text>
{quality && <QualityBadge quality={quality} />} <QualityBadge quality={quality} />
</View> </View>
{(stream.size || stream.lang) && ( {(stream.size || stream.lang) && (
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}> <View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
{stream.size && ( {stream.size && (
<View style={{ flexDirection: 'row', alignItems: 'center' }}> <Text style={{
<MaterialIcons name="storage" size={14} color={isSelected ? 'rgba(0,0,0,0.6)' : 'rgba(255,255,255,0.5)'} /> color: isSelected ? 'rgba(0,0,0,0.5)' : 'rgba(255,255,255,0.5)',
<Text style={{ fontSize: 11,
color: isSelected ? 'rgba(0,0,0,0.6)' : 'rgba(255,255,255,0.5)', }}>
fontSize: 12, {(stream.size / (1024 * 1024 * 1024)).toFixed(1)} GB
fontWeight: '600', </Text>
marginLeft: 4,
}}>
{(stream.size / (1024 * 1024 * 1024)).toFixed(1)} GB
</Text>
</View>
)} )}
{stream.lang && ( {stream.lang && (
<View style={{ flexDirection: 'row', alignItems: 'center' }}> <Text style={{
<MaterialIcons name="language" size={14} color={isSelected ? 'rgba(0,0,0,0.6)' : 'rgba(59,130,246,0.8)'} /> color: isSelected ? 'rgba(59, 130, 246, 1)' : 'rgba(59, 130, 246, 0.8)',
<Text style={{ fontSize: 11,
color: isSelected ? 'rgba(0,0,0,0.6)' : 'rgba(59,130,246,0.8)', fontWeight: '600',
fontSize: 12, }}>
fontWeight: '600', {stream.lang.toUpperCase()}
marginLeft: 4, </Text>
}}>
{stream.lang.toUpperCase()}
</Text>
</View>
)} )}
</View> </View>
)} )}
</View> </View>
<View style={{ marginLeft: 12, alignItems: 'center' }}> <View style={{ marginLeft: 12 }}>
{isSelected ? ( {isSelected ? (
<MaterialIcons name="check" size={18} color="black" /> <MaterialIcons name="check" size={20} color="black" />
) : ( ) : (
<MaterialIcons name="play-arrow" size={20} color="rgba(255,255,255,0.4)" /> <MaterialIcons name="play-arrow" size={20} color="rgba(255,255,255,0.3)" />
)} )}
</View> </View>
</View> </View>
@ -247,28 +234,10 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
</View> </View>
)) ))
) : ( ) : (
<View style={{ <View style={{ padding: 40, alignItems: 'center', opacity: 0.5 }}>
backgroundColor: 'rgba(255, 255, 255, 0.05)', <MaterialIcons name="cloud-off" size={48} color="white" />
borderRadius: 16, <Text style={{ color: 'white', marginTop: 16, textAlign: 'center', fontWeight: '600' }}>
padding: 20, No sources found
alignItems: 'center',
}}>
<MaterialIcons name="error-outline" size={48} color="rgba(255,255,255,0.3)" />
<Text style={{
color: 'rgba(255, 255, 255, 0.6)',
fontSize: 16,
marginTop: 16,
textAlign: 'center',
}}>
No sources available
</Text>
<Text style={{
color: 'rgba(255, 255, 255, 0.4)',
fontSize: 14,
marginTop: 8,
textAlign: 'center',
}}>
Try searching for different content
</Text> </Text>
</View> </View>
)} )}
@ -278,4 +247,4 @@ export const SourcesModal: React.FC<SourcesModalProps> = ({
); );
}; };
export default SourcesModal; export default SourcesModal;

View file

@ -1,11 +1,13 @@
import React from 'react'; import React from 'react';
import { View, Text, TouchableOpacity, Platform, useWindowDimensions, ScrollView, StyleSheet } from 'react-native'; import { View, Text, TouchableOpacity, useWindowDimensions, StyleSheet } from 'react-native';
import { MaterialIcons } from '@expo/vector-icons'; import { MaterialIcons } from '@expo/vector-icons';
import Animated, { import Animated, {
FadeIn, FadeIn,
FadeOut, FadeOut,
SlideInRight, SlideInDown,
SlideOutRight, SlideOutDown,
useAnimatedStyle,
withTiming,
} from 'react-native-reanimated'; } from 'react-native-reanimated';
interface SpeedModalProps { interface SpeedModalProps {
@ -19,7 +21,31 @@ interface SpeedModalProps {
setHoldToSpeedValue: (speed: number) => void; setHoldToSpeedValue: (speed: number) => void;
} }
export const SpeedModal: React.FC<SpeedModalProps> = ({ const MorphingButton = ({ label, isSelected, onPress, isSmall = false }: any) => {
const animatedStyle = useAnimatedStyle(() => {
return {
// Linear transition from 40 (Pill) to 10 (Rectangle)
borderRadius: withTiming(isSelected ? 10 : 40, { duration: 250 }),
backgroundColor: withTiming(isSelected ? (isSmall ? 'rgba(255,255,255,0.2)' : 'white') : 'rgba(255,255,255,0.06)', { duration: 50 }),
};
});
return (
<TouchableOpacity onPress={onPress} activeOpacity={0.8} style={{ flex: isSmall ? 0 : 1 }}>
<Animated.View style={[{ paddingVertical: isSmall ? 6 : 8, paddingHorizontal: isSmall ? 14 : 0, alignItems: 'center', justifyContent: 'center' }, animatedStyle]}>
<Text style={{
color: isSelected && !isSmall ? 'black' : 'white',
fontWeight: isSelected ? '700' : '400',
fontSize: isSmall ? 11 : 13
}}>
{label}
</Text>
</Animated.View>
</TouchableOpacity>
);
};
const SpeedModal: React.FC<SpeedModalProps> = ({
showSpeedModal, showSpeedModal,
setShowSpeedModal, setShowSpeedModal,
currentSpeed, currentSpeed,
@ -30,219 +56,84 @@ export const SpeedModal: React.FC<SpeedModalProps> = ({
setHoldToSpeedValue, setHoldToSpeedValue,
}) => { }) => {
const { width } = useWindowDimensions(); const { width } = useWindowDimensions();
const MENU_WIDTH = Math.min(width * 0.85, 400); const speedPresets = [0.5, 1.0, 1.25, 1.5, 2.0, 2.5];
const holdSpeedOptions = [1.0, 2.0, 3.0];
const speedPresets = [0.5, 1.0, 1.5, 2.0, 2.5];
const holdSpeedOptions = [1.5, 2.0];
const handleClose = () => {
setShowSpeedModal(false);
};
const handleSpeedSelect = (speed: number) => {
setPlaybackSpeed(speed);
};
const handleHoldSpeedSelect = (speed: number) => {
setHoldToSpeedValue(speed);
};
if (!showSpeedModal) return null; if (!showSpeedModal) return null;
return ( return (
<View style={[StyleSheet.absoluteFill, { zIndex: 9999 }]}> <View style={StyleSheet.absoluteFill} zIndex={9999}>
<TouchableOpacity style={StyleSheet.absoluteFill} activeOpacity={1} onPress={handleClose}> <TouchableOpacity
<Animated.View entering={FadeIn.duration(200)} exiting={FadeOut.duration(150)} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }} /> style={StyleSheet.absoluteFill}
activeOpacity={1}
onPress={() => setShowSpeedModal(false)}
>
<Animated.View entering={FadeIn} exiting={FadeOut} style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.2)' }} />
</TouchableOpacity> </TouchableOpacity>
<Animated.View <View pointerEvents="box-none" style={{ ...StyleSheet.absoluteFillObject, justifyContent: 'center', alignItems: 'center', paddingBottom: 20 }}>
entering={SlideInRight.duration(300)} <Animated.View
exiting={SlideOutRight.duration(250)} entering={SlideInDown.duration(300)}
style={{ exiting={SlideOutDown.duration(250)}
position: 'absolute', style={{
top: 0, width: Math.min(width * 0.9, 420),
right: 0, backgroundColor: 'rgba(15, 15, 15, 0.95)',
bottom: 0, borderRadius: 24,
width: MENU_WIDTH, padding: 20,
backgroundColor: '#0f0f0f',
borderLeftWidth: 1,
borderColor: 'rgba(255,255,255,0.1)',
}}
>
<View style={{ paddingTop: Platform.OS === 'ios' ? 60 : 15, paddingHorizontal: 20 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
<Text style={{ color: 'white', fontSize: 22, fontWeight: '700' }}>Playback Speed</Text>
</View>
</View>
<ScrollView
showsVerticalScrollIndicator={false}
contentContainerStyle={{ padding: 15, paddingBottom: 40 }}
>
{/* Current Speed Display */}
<View style={{
backgroundColor: 'rgba(59, 130, 246, 0.15)',
borderRadius: 12,
padding: 12,
marginBottom: 20,
borderWidth: 1, borderWidth: 1,
borderColor: 'rgba(59, 130, 246, 0.3)', borderColor: 'rgba(255,255,255,0.1)'
}}> }}
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}> >
<MaterialIcons name="play-arrow" size={20} color="#3B82F6" /> <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 20, alignItems: 'center' }}>
<Text style={{ <Text style={{ color: 'white', fontSize: 16, fontWeight: '600'}}>Playback Speed</Text>
color: '#3B82F6', </View>
fontSize: 18,
fontWeight: '700', {/* Speed Selection Row */}
marginLeft: 6 <View style={{ flexDirection: 'row', gap: 6, marginBottom: 20 }}>
{speedPresets.map((speed) => (
<MorphingButton
key={speed}
label={`${speed}x`}
isSelected={currentSpeed === speed}
onPress={() => setPlaybackSpeed(speed)}
/>
))}
</View>
<View style={{ height: 1, backgroundColor: 'rgba(255,255,255,0.1)', marginBottom: 14 }} />
{/* On Hold Section */}
<View>
<TouchableOpacity
onPress={() => setHoldToSpeedEnabled(!holdToSpeedEnabled)}
style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: holdToSpeedEnabled ? 15 : 0 }}
>
<Text style={{ color: 'rgba(255,255,255,0.7)', fontSize: 14 }}>On Hold</Text>
<View style={{
width: 34, height: 18, borderRadius: 10,
backgroundColor: holdToSpeedEnabled ? 'white' : 'rgba(255,255,255,0.2)',
padding: 2, alignItems: holdToSpeedEnabled ? 'flex-end' : 'flex-start'
}}> }}>
Current: {currentSpeed}x <View style={{ width: 14, height: 14, borderRadius: 7, backgroundColor: holdToSpeedEnabled ? 'black' : 'white' }} />
</Text> </View>
</View> </TouchableOpacity>
</View>
{/* Speed Presets */}
<View style={{ marginBottom: 20 }}>
<Text style={{
color: 'rgba(255, 255, 255, 0.7)',
fontSize: 14,
fontWeight: '600',
marginBottom: 12,
textTransform: 'uppercase',
letterSpacing: 0.5,
}}>
Speed Presets
</Text>
<View style={{ gap: 8 }}>
{speedPresets.map((speed) => {
const isSelected = currentSpeed === speed;
return (
<TouchableOpacity
key={speed}
onPress={() => handleSpeedSelect(speed)}
style={{
paddingHorizontal: 16,
paddingVertical: 12,
borderRadius: 12,
backgroundColor: isSelected ? 'white' : 'rgba(255,255,255,0.06)',
borderWidth: 1,
borderColor: isSelected ? 'white' : 'rgba(255,255,255,0.1)',
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
}}
activeOpacity={0.7}
>
<Text style={{
color: isSelected ? 'black' : 'white',
fontWeight: isSelected ? '700' : '500',
fontSize: 15
}}>
{speed}x
</Text>
{isSelected && <MaterialIcons name="check" size={18} color="black" />}
</TouchableOpacity>
);
})}
</View>
</View>
{/* Hold-to-Speed Settings */}
<View style={{ backgroundColor: 'rgba(255,255,255,0.06)', borderRadius: 12, padding: 16, borderWidth: 1, borderColor: 'rgba(255,255,255,0.1)' }}>
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 16 }}>
<MaterialIcons name="touch-app" size={18} color="rgba(255,255,255,0.7)" />
<Text style={{ color: 'rgba(255,255,255,0.7)', fontSize: 14, marginLeft: 6, fontWeight: '600', textTransform: 'uppercase', letterSpacing: 0.5 }}>
Hold-to-Speed
</Text>
</View>
{/* Enable Toggle */}
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: 16 }}>
<Text style={{ color: 'white', fontWeight: '600', fontSize: 15 }}>Enable Hold Speed</Text>
<TouchableOpacity
style={{
width: 54,
height: 30,
backgroundColor: holdToSpeedEnabled ? '#22C55E' : 'rgba(255,255,255,0.25)',
borderRadius: 15,
justifyContent: 'center',
alignItems: holdToSpeedEnabled ? 'flex-end' : 'flex-start',
paddingHorizontal: 3
}}
onPress={() => setHoldToSpeedEnabled(!holdToSpeedEnabled)}
>
<View style={{ width: 24, height: 24, backgroundColor: 'white', borderRadius: 12 }} />
</TouchableOpacity>
</View>
{/* Hold Speed Selector */}
{holdToSpeedEnabled && ( {holdToSpeedEnabled && (
<View style={{ marginBottom: 16 }}> <Animated.View entering={FadeIn} style={{ flexDirection: 'row', gap: 8 }}>
<Text style={{ color: 'white', fontWeight: '600', marginBottom: 10, fontSize: 15 }}>Hold Speed</Text> {holdSpeedOptions.map((speed) => (
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ gap: 8 }}> <MorphingButton
{holdSpeedOptions.map((speed) => { key={speed}
const isSelected = holdToSpeedValue === speed; isSmall
return ( label={`${speed}x`}
<TouchableOpacity isSelected={holdToSpeedValue === speed}
key={speed} onPress={() => setHoldToSpeedValue(speed)}
onPress={() => handleHoldSpeedSelect(speed)} />
style={{ ))}
paddingHorizontal: 16, </Animated.View>
paddingVertical: 8,
borderRadius: 20,
backgroundColor: isSelected ? 'white' : 'rgba(255,255,255,0.06)',
borderWidth: 1,
borderColor: isSelected ? 'white' : 'rgba(255,255,255,0.1)',
}}
activeOpacity={0.7}
>
<Text style={{
color: isSelected ? 'black' : 'white',
fontWeight: isSelected ? '700' : '500',
fontSize: 14
}}>
{speed}x
</Text>
</TouchableOpacity>
);
})}
</ScrollView>
</View>
)} )}
{/* Info Text */}
<View style={{
backgroundColor: 'rgba(34, 197, 94, 0.1)',
borderRadius: 10,
padding: 12,
borderWidth: 1,
borderColor: 'rgba(34, 197, 94, 0.3)',
}}>
<View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: 8 }}>
<MaterialIcons name="info" size={16} color="#22C55E" />
<View style={{ flex: 1 }}>
<Text style={{
color: '#22C55E',
fontSize: 13,
fontWeight: '600',
marginBottom: 4,
}}>
Hold left/right sides
</Text>
<Text style={{
color: 'rgba(255, 255, 255, 0.8)',
fontSize: 12,
lineHeight: 16,
}}>
Hold and press the left or right side of the video player to temporarily boost playback speed.
</Text>
</View>
</View>
</View>
</View> </View>
</ScrollView> </Animated.View>
</Animated.View> </View>
</View> </View>
); );
}; };

File diff suppressed because it is too large Load diff